@@ -78,12 +78,12 @@ def extract(
7878 self ,
7979 * ,
8080 urls : SequenceNotStr [str ],
81- betas : List [ParallelBetaParam ],
8281 excerpts : beta_extract_params .Excerpts | Omit = omit ,
8382 fetch_policy : Optional [FetchPolicyParam ] | Omit = omit ,
8483 full_content : beta_extract_params .FullContent | Omit = omit ,
8584 objective : Optional [str ] | Omit = omit ,
8685 search_queries : Optional [SequenceNotStr [str ]] | Omit = omit ,
86+ betas : List [ParallelBetaParam ] | Omit = omit ,
8787 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8888 # The extra values given here take precedence over values defined on the client or passed to this method.
8989 extra_headers : Headers | None = None ,
@@ -98,8 +98,6 @@ def extract(
9898 `search-extract-2025-10-10`.
9999
100100 Args:
101- betas: Optional header to specify the beta version(s) to enable.
102-
103101 excerpts: Include excerpts from each URL relevant to the search objective and queries.
104102 Note that if neither objective nor search_queries is provided, excerpts are
105103 redundant with full content.
@@ -117,6 +115,8 @@ def extract(
117115
118116 search_queries: If provided, focuses extracted content on the specified keyword search queries.
119117
118+ betas: Optional header to specify the beta version(s) to enable.
119+
120120 extra_headers: Send extra headers
121121
122122 extra_query: Add additional query parameters to the request
@@ -126,10 +126,16 @@ def extract(
126126 timeout: Override the client-level default timeout for this request, in seconds
127127 """
128128 extra_headers = {
129- "parallel-beta" : "," .join (chain ((str (e ) for e in betas ), ["search-extract-2025-10-10" ])),
129+ ** strip_not_given (
130+ {
131+ "parallel-beta" : "," .join (chain ((str (e ) for e in betas ), ["search-extract-2025-10-10" ]))
132+ if is_given (betas )
133+ else not_given
134+ }
135+ ),
130136 ** (extra_headers or {}),
131137 }
132- extra_headers . update ( {"parallel-beta" : "search-extract-2025-10-10" })
138+ extra_headers = {"parallel-beta" : "search-extract-2025-10-10" , ** ( extra_headers or {})}
133139 return self ._post (
134140 "/v1beta/extract" ,
135141 body = maybe_transform (
@@ -284,12 +290,12 @@ async def extract(
284290 self ,
285291 * ,
286292 urls : SequenceNotStr [str ],
287- betas : List [ParallelBetaParam ],
288293 excerpts : beta_extract_params .Excerpts | Omit = omit ,
289294 fetch_policy : Optional [FetchPolicyParam ] | Omit = omit ,
290295 full_content : beta_extract_params .FullContent | Omit = omit ,
291296 objective : Optional [str ] | Omit = omit ,
292297 search_queries : Optional [SequenceNotStr [str ]] | Omit = omit ,
298+ betas : List [ParallelBetaParam ] | Omit = omit ,
293299 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
294300 # The extra values given here take precedence over values defined on the client or passed to this method.
295301 extra_headers : Headers | None = None ,
@@ -304,8 +310,6 @@ async def extract(
304310 `search-extract-2025-10-10`.
305311
306312 Args:
307- betas: Optional header to specify the beta version(s) to enable.
308-
309313 excerpts: Include excerpts from each URL relevant to the search objective and queries.
310314 Note that if neither objective nor search_queries is provided, excerpts are
311315 redundant with full content.
@@ -323,6 +327,8 @@ async def extract(
323327
324328 search_queries: If provided, focuses extracted content on the specified keyword search queries.
325329
330+ betas: Optional header to specify the beta version(s) to enable.
331+
326332 extra_headers: Send extra headers
327333
328334 extra_query: Add additional query parameters to the request
@@ -332,10 +338,16 @@ async def extract(
332338 timeout: Override the client-level default timeout for this request, in seconds
333339 """
334340 extra_headers = {
335- "parallel-beta" : "," .join (chain ((str (e ) for e in betas ), ["search-extract-2025-10-10" ])),
341+ ** strip_not_given (
342+ {
343+ "parallel-beta" : "," .join (chain ((str (e ) for e in betas ), ["search-extract-2025-10-10" ]))
344+ if is_given (betas )
345+ else not_given
346+ }
347+ ),
336348 ** (extra_headers or {}),
337349 }
338- extra_headers . update ( {"parallel-beta" : "search-extract-2025-10-10" })
350+ extra_headers = {"parallel-beta" : "search-extract-2025-10-10" , ** ( extra_headers or {})}
339351 return await self ._post (
340352 "/v1beta/extract" ,
341353 body = await async_maybe_transform (
0 commit comments