Skip to content

Commit 86c7d33

Browse files
feat(api): manual updates
OpenAPI updates
1 parent cfc5fb3 commit 86c7d33

6 files changed

Lines changed: 42 additions & 6 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 24
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-3283d0ed1520a152928edc5dee967f6ee0ee70d434d5ea96dbfc60202672417d.yml
3-
openapi_spec_hash: 9cd5bd74222a21612086b1ca0ad6725d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-66ee13c3475d2c76f0956f258f0469903155b83ef02e839641be94cdc2014cf3.yml
3+
openapi_spec_hash: 88af7b88725bead1f8ccdcaeb436fadb
44
config_hash: e17d82e9cb35004e5f9a9d3c4cf51aeb

src/parallel/resources/beta/beta.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ def extract(
121121
self,
122122
*,
123123
urls: SequenceNotStr[str],
124+
client_model: Optional[str] | Omit = omit,
124125
excerpts: beta_extract_params.Excerpts | Omit = omit,
125126
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
126127
full_content: beta_extract_params.FullContent | Omit = omit,
@@ -142,6 +143,9 @@ def extract(
142143
`search-extract-2025-10-10`.
143144
144145
Args:
146+
client_model: The model generating this request and consuming the results. Enables
147+
optimizations and tailors default settings for the model's capabilities.
148+
145149
excerpts: Include excerpts from each URL relevant to the search objective and queries.
146150
Note that if neither objective nor search_queries is provided, excerpts are
147151
redundant with full content.
@@ -185,6 +189,7 @@ def extract(
185189
body=maybe_transform(
186190
{
187191
"urls": urls,
192+
"client_model": client_model,
188193
"excerpts": excerpts,
189194
"fetch_policy": fetch_policy,
190195
"full_content": full_content,
@@ -206,6 +211,7 @@ def extract(
206211
def search(
207212
self,
208213
*,
214+
client_model: Optional[str] | Omit = omit,
209215
excerpts: ExcerptSettingsParam | Omit = omit,
210216
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
211217
location: Optional[str] | Omit = omit,
@@ -229,6 +235,9 @@ def search(
229235
Searches the web.
230236
231237
Args:
238+
client_model: The model generating this request and consuming the results. Enables
239+
optimizations and tailors default settings for the model's capabilities.
240+
232241
excerpts: Optional settings to configure excerpt generation.
233242
234243
fetch_policy: Policy for live fetching web results.
@@ -291,6 +300,7 @@ def search(
291300
"/v1beta/search",
292301
body=maybe_transform(
293302
{
303+
"client_model": client_model,
294304
"excerpts": excerpts,
295305
"fetch_policy": fetch_policy,
296306
"location": location,
@@ -378,6 +388,7 @@ async def extract(
378388
self,
379389
*,
380390
urls: SequenceNotStr[str],
391+
client_model: Optional[str] | Omit = omit,
381392
excerpts: beta_extract_params.Excerpts | Omit = omit,
382393
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
383394
full_content: beta_extract_params.FullContent | Omit = omit,
@@ -399,6 +410,9 @@ async def extract(
399410
`search-extract-2025-10-10`.
400411
401412
Args:
413+
client_model: The model generating this request and consuming the results. Enables
414+
optimizations and tailors default settings for the model's capabilities.
415+
402416
excerpts: Include excerpts from each URL relevant to the search objective and queries.
403417
Note that if neither objective nor search_queries is provided, excerpts are
404418
redundant with full content.
@@ -442,6 +456,7 @@ async def extract(
442456
body=await async_maybe_transform(
443457
{
444458
"urls": urls,
459+
"client_model": client_model,
445460
"excerpts": excerpts,
446461
"fetch_policy": fetch_policy,
447462
"full_content": full_content,
@@ -463,6 +478,7 @@ async def extract(
463478
async def search(
464479
self,
465480
*,
481+
client_model: Optional[str] | Omit = omit,
466482
excerpts: ExcerptSettingsParam | Omit = omit,
467483
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
468484
location: Optional[str] | Omit = omit,
@@ -486,6 +502,9 @@ async def search(
486502
Searches the web.
487503
488504
Args:
505+
client_model: The model generating this request and consuming the results. Enables
506+
optimizations and tailors default settings for the model's capabilities.
507+
489508
excerpts: Optional settings to configure excerpt generation.
490509
491510
fetch_policy: Policy for live fetching web results.
@@ -548,6 +567,7 @@ async def search(
548567
"/v1beta/search",
549568
body=await async_maybe_transform(
550569
{
570+
"client_model": client_model,
551571
"excerpts": excerpts,
552572
"fetch_policy": fetch_policy,
553573
"location": location,

src/parallel/types/beta/beta_extract_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
class BetaExtractParams(TypedDict, total=False):
1818
urls: Required[SequenceNotStr[str]]
1919

20+
client_model: Optional[str]
21+
"""The model generating this request and consuming the results.
22+
23+
Enables optimizations and tailors default settings for the model's capabilities.
24+
"""
25+
2026
excerpts: Excerpts
2127
"""Include excerpts from each URL relevant to the search objective and queries.
2228

src/parallel/types/beta/beta_search_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717

1818
class BetaSearchParams(TypedDict, total=False):
19+
client_model: Optional[str]
20+
"""The model generating this request and consuming the results.
21+
22+
Enables optimizations and tailors default settings for the model's capabilities.
23+
"""
24+
1925
excerpts: ExcerptSettingsParam
2026
"""Optional settings to configure excerpt generation."""
2127

tests/api_resources/test_beta.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_method_extract_with_all_params(self, client: Parallel) -> None:
3434
with pytest.warns(DeprecationWarning):
3535
beta = client.beta.extract(
3636
urls=["string"],
37+
client_model="claude-opus-4-7",
3738
excerpts=True,
3839
fetch_policy={
3940
"disable_cache_fallback": True,
@@ -86,6 +87,7 @@ def test_method_search(self, client: Parallel) -> None:
8687
def test_method_search_with_all_params(self, client: Parallel) -> None:
8788
with pytest.warns(DeprecationWarning):
8889
beta = client.beta.search(
90+
client_model="claude-opus-4-7",
8991
excerpts={
9092
"max_chars_per_result": 0,
9193
"max_chars_total": 0,
@@ -155,6 +157,7 @@ async def test_method_extract_with_all_params(self, async_client: AsyncParallel)
155157
with pytest.warns(DeprecationWarning):
156158
beta = await async_client.beta.extract(
157159
urls=["string"],
160+
client_model="claude-opus-4-7",
158161
excerpts=True,
159162
fetch_policy={
160163
"disable_cache_fallback": True,
@@ -207,6 +210,7 @@ async def test_method_search(self, async_client: AsyncParallel) -> None:
207210
async def test_method_search_with_all_params(self, async_client: AsyncParallel) -> None:
208211
with pytest.warns(DeprecationWarning):
209212
beta = await async_client.beta.search(
213+
client_model="claude-opus-4-7",
210214
excerpts={
211215
"max_chars_per_result": 0,
212216
"max_chars_total": 0,

tests/api_resources/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_method_extract_with_all_params(self, client: Parallel) -> None:
4141
},
4242
"full_content": {"max_chars_per_result": 0},
4343
},
44-
client_model="claude-sonnet-4-6-20260401",
44+
client_model="claude-opus-4-7",
4545
max_chars_total=0,
4646
objective="objective",
4747
search_queries=["string"],
@@ -99,7 +99,7 @@ def test_method_search_with_all_params(self, client: Parallel) -> None:
9999
"include_domains": ["wikipedia.org", "usa.gov", ".edu"],
100100
},
101101
},
102-
client_model="claude-sonnet-4-6-20260401",
102+
client_model="claude-opus-4-7",
103103
max_chars_total=0,
104104
mode="basic",
105105
objective="objective",
@@ -157,7 +157,7 @@ async def test_method_extract_with_all_params(self, async_client: AsyncParallel)
157157
},
158158
"full_content": {"max_chars_per_result": 0},
159159
},
160-
client_model="claude-sonnet-4-6-20260401",
160+
client_model="claude-opus-4-7",
161161
max_chars_total=0,
162162
objective="objective",
163163
search_queries=["string"],
@@ -215,7 +215,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncParallel)
215215
"include_domains": ["wikipedia.org", "usa.gov", ".edu"],
216216
},
217217
},
218-
client_model="claude-sonnet-4-6-20260401",
218+
client_model="claude-opus-4-7",
219219
max_chars_total=0,
220220
mode="basic",
221221
objective="objective",

0 commit comments

Comments
 (0)