Skip to content

Commit 5b21460

Browse files
feat: SDK regeneration (21 Oct 2025) (#609)
* feat: SDK regeneration - Added mip_opt_out parameter to Listen V1 Media endpoints (transcribe_url and transcribe_file) allowing users to opt out of the Deepgram Model Improvement Program ([docs](https://dpgr.am/deepgram-mip)) - Updated parameter documentation across sync and async clients to reflect this new field. - Changed ttl_seconds type from int → float in Auth V1 Tokens clients for more precise expiry values. - Simplified Listen V1 WebSocket clients by removing the unused filler_words parameter. - Made encoding and sample_rate optional in Listen V2 clients for improved flexibility. - Standard regeneration from latest Fern API definitions. * test: add tag parameter to read client test assertions The Fern-generated code now includes a 'tag' parameter in the Read API's analyze method. This commit updates all test mock assertions to include tag=None to match the actual method signature. Fixes 6 failing tests in test_read_client.py: - test_text_client_analyze_url - test_text_client_analyze_text_with_all_features - test_text_client_analyze_with_callback - test_text_client_analyze_with_request_options - test_async_text_client_analyze_url - test_async_text_client_analyze_with_all_features --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Luke Oliff <[email protected]>
1 parent b85b3cc commit 5b21460

File tree

62 files changed

+287
-220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+287
-220
lines changed

reference.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ client.auth.v1.tokens.grant()
109109
<dl>
110110
<dd>
111111

112-
**ttl_seconds:** `typing.Optional[int]` — Time to live in seconds for the token. Defaults to 30 seconds.
112+
**ttl_seconds:** `typing.Optional[float]` — Time to live in seconds for the token. Defaults to 30 seconds.
113113

114114
</dd>
115115
</dl>
@@ -468,6 +468,14 @@ client.listen.v1.media.transcribe_url(
468468
<dl>
469469
<dd>
470470

471+
**mip_opt_out:** `typing.Optional[bool]` — Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
472+
473+
</dd>
474+
</dl>
475+
476+
<dl>
477+
<dd>
478+
471479
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
472480

473481
</dd>
@@ -816,6 +824,14 @@ client.listen.v1.media.transcribe_file()
816824
<dl>
817825
<dd>
818826

827+
**mip_opt_out:** `typing.Optional[bool]` — Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
828+
829+
</dd>
830+
</dl>
831+
832+
<dl>
833+
<dd>
834+
819835
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
820836

821837
</dd>
@@ -1086,15 +1102,15 @@ client.manage.v1.projects.get(
10861102
<dl>
10871103
<dd>
10881104

1089-
**limit:** `typing.Optional[int]` — Number of results to return per page. Default 10. Range [1,1000]
1105+
**limit:** `typing.Optional[float]` — Number of results to return per page. Default 10. Range [1,1000]
10901106

10911107
</dd>
10921108
</dl>
10931109

10941110
<dl>
10951111
<dd>
10961112

1097-
**page:** `typing.Optional[int]` — Navigate and return the results to retrieve specific portions of information of the response
1113+
**page:** `typing.Optional[float]` — Navigate and return the results to retrieve specific portions of information of the response
10981114

10991115
</dd>
11001116
</dl>
@@ -2033,15 +2049,15 @@ client.manage.v1.projects.requests.list(
20332049
<dl>
20342050
<dd>
20352051

2036-
**limit:** `typing.Optional[int]` — Number of results to return per page. Default 10. Range [1,1000]
2052+
**limit:** `typing.Optional[float]` — Number of results to return per page. Default 10. Range [1,1000]
20372053

20382054
</dd>
20392055
</dl>
20402056

20412057
<dl>
20422058
<dd>
20432059

2044-
**page:** `typing.Optional[int]` — Navigate and return the results to retrieve specific portions of information of the response
2060+
**page:** `typing.Optional[float]` — Navigate and return the results to retrieve specific portions of information of the response
20452061

20462062
</dd>
20472063
</dl>
@@ -2959,7 +2975,7 @@ client.manage.v1.projects.billing.purchases.list(
29592975
<dl>
29602976
<dd>
29612977

2962-
**limit:** `typing.Optional[int]` — Number of results to return per page. Default 10. Range [1,1000]
2978+
**limit:** `typing.Optional[float]` — Number of results to return per page. Default 10. Range [1,1000]
29632979

29642980
</dd>
29652981
</dl>
@@ -3998,6 +4014,14 @@ client.read.v1.text.analyze(
39984014
<dl>
39994015
<dd>
40004016

4017+
**tag:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Label your requests for the purpose of identification during usage reporting
4018+
4019+
</dd>
4020+
</dl>
4021+
4022+
<dl>
4023+
<dd>
4024+
40014025
**topics:** `typing.Optional[bool]` — Detect topics throughout a transcript or text
40024026

40034027
</dd>
@@ -4477,7 +4501,15 @@ client.speak.v1.audio.generate(
44774501
<dl>
44784502
<dd>
44794503

4480-
**bit_rate:** `typing.Optional[int]` — The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
4504+
**tag:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Label your requests for the purpose of identification during usage reporting
4505+
4506+
</dd>
4507+
</dl>
4508+
4509+
<dl>
4510+
<dd>
4511+
4512+
**bit_rate:** `typing.Optional[float]` — The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
44814513

44824514
</dd>
44834515
</dl>
@@ -4509,7 +4541,7 @@ client.speak.v1.audio.generate(
45094541
<dl>
45104542
<dd>
45114543

4512-
**sample_rate:** `typing.Optional[int]` — Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable
4544+
**sample_rate:** `typing.Optional[float]` — Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable
45134545

45144546
</dd>
45154547
</dl>

src/deepgram/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
ListenV1Encoding,
8585
ListenV1Endpointing,
8686
ListenV1Extra,
87-
ListenV1FillerWords,
8887
ListenV1InterimResults,
8988
ListenV1Keyterm,
9089
ListenV1Keywords,
@@ -458,7 +457,6 @@
458457
"ListenV1Encoding": ".types",
459458
"ListenV1Endpointing": ".types",
460459
"ListenV1Extra": ".types",
461-
"ListenV1FillerWords": ".types",
462460
"ListenV1InterimResults": ".types",
463461
"ListenV1Keyterm": ".types",
464462
"ListenV1Keywords": ".types",
@@ -792,7 +790,6 @@ def __dir__():
792790
"ListenV1Encoding",
793791
"ListenV1Endpointing",
794792
"ListenV1Extra",
795-
"ListenV1FillerWords",
796793
"ListenV1InterimResults",
797794
"ListenV1Keyterm",
798795
"ListenV1Keywords",

src/deepgram/auth/v1/tokens/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ def with_raw_response(self) -> RawTokensClient:
2727
return self._raw_client
2828

2929
def grant(
30-
self, *, ttl_seconds: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None
30+
self, *, ttl_seconds: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None
3131
) -> GrantV1Response:
3232
"""
3333
Generates a temporary JSON Web Token (JWT) with a 30-second (by default) TTL and usage::write permission for core voice APIs, requiring an API key with Member or higher authorization. Tokens created with this endpoint will not work with the Manage APIs.
3434
3535
Parameters
3636
----------
37-
ttl_seconds : typing.Optional[int]
37+
ttl_seconds : typing.Optional[float]
3838
Time to live in seconds for the token. Defaults to 30 seconds.
3939
4040
request_options : typing.Optional[RequestOptions]
@@ -74,14 +74,14 @@ def with_raw_response(self) -> AsyncRawTokensClient:
7474
return self._raw_client
7575

7676
async def grant(
77-
self, *, ttl_seconds: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None
77+
self, *, ttl_seconds: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None
7878
) -> GrantV1Response:
7979
"""
8080
Generates a temporary JSON Web Token (JWT) with a 30-second (by default) TTL and usage::write permission for core voice APIs, requiring an API key with Member or higher authorization. Tokens created with this endpoint will not work with the Manage APIs.
8181
8282
Parameters
8383
----------
84-
ttl_seconds : typing.Optional[int]
84+
ttl_seconds : typing.Optional[float]
8585
Time to live in seconds for the token. Defaults to 30 seconds.
8686
8787
request_options : typing.Optional[RequestOptions]

src/deepgram/auth/v1/tokens/raw_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
2020
self._client_wrapper = client_wrapper
2121

2222
def grant(
23-
self, *, ttl_seconds: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None
23+
self, *, ttl_seconds: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None
2424
) -> HttpResponse[GrantV1Response]:
2525
"""
2626
Generates a temporary JSON Web Token (JWT) with a 30-second (by default) TTL and usage::write permission for core voice APIs, requiring an API key with Member or higher authorization. Tokens created with this endpoint will not work with the Manage APIs.
2727
2828
Parameters
2929
----------
30-
ttl_seconds : typing.Optional[int]
30+
ttl_seconds : typing.Optional[float]
3131
Time to live in seconds for the token. Defaults to 30 seconds.
3232
3333
request_options : typing.Optional[RequestOptions]
@@ -83,14 +83,14 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
8383
self._client_wrapper = client_wrapper
8484

8585
async def grant(
86-
self, *, ttl_seconds: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None
86+
self, *, ttl_seconds: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None
8787
) -> AsyncHttpResponse[GrantV1Response]:
8888
"""
8989
Generates a temporary JSON Web Token (JWT) with a 30-second (by default) TTL and usage::write permission for core voice APIs, requiring an API key with Member or higher authorization. Tokens created with this endpoint will not work with the Manage APIs.
9090
9191
Parameters
9292
----------
93-
ttl_seconds : typing.Optional[int]
93+
ttl_seconds : typing.Optional[float]
9494
Time to live in seconds for the token. Defaults to 30 seconds.
9595
9696
request_options : typing.Optional[RequestOptions]

src/deepgram/listen/v1/client.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def connect(
5252
encoding: typing.Optional[str] = None,
5353
endpointing: typing.Optional[str] = None,
5454
extra: typing.Optional[str] = None,
55-
filler_words: typing.Optional[str] = None,
5655
interim_results: typing.Optional[str] = None,
5756
keyterm: typing.Optional[str] = None,
5857
keywords: typing.Optional[str] = None,
@@ -96,8 +95,6 @@ def connect(
9695
9796
extra : typing.Optional[str]
9897
99-
filler_words : typing.Optional[str]
100-
10198
interim_results : typing.Optional[str]
10299
103100
keyterm : typing.Optional[str]
@@ -167,8 +164,6 @@ def connect(
167164
query_params = query_params.add("endpointing", endpointing)
168165
if extra is not None:
169166
query_params = query_params.add("extra", extra)
170-
if filler_words is not None:
171-
query_params = query_params.add("filler_words", filler_words)
172167
if interim_results is not None:
173168
query_params = query_params.add("interim_results", interim_results)
174169
if keyterm is not None:
@@ -268,7 +263,6 @@ async def connect(
268263
encoding: typing.Optional[str] = None,
269264
endpointing: typing.Optional[str] = None,
270265
extra: typing.Optional[str] = None,
271-
filler_words: typing.Optional[str] = None,
272266
interim_results: typing.Optional[str] = None,
273267
keyterm: typing.Optional[str] = None,
274268
keywords: typing.Optional[str] = None,
@@ -312,8 +306,6 @@ async def connect(
312306
313307
extra : typing.Optional[str]
314308
315-
filler_words : typing.Optional[str]
316-
317309
interim_results : typing.Optional[str]
318310
319311
keyterm : typing.Optional[str]
@@ -383,8 +375,6 @@ async def connect(
383375
query_params = query_params.add("endpointing", endpointing)
384376
if extra is not None:
385377
query_params = query_params.add("extra", extra)
386-
if filler_words is not None:
387-
query_params = query_params.add("filler_words", filler_words)
388378
if interim_results is not None:
389379
query_params = query_params.add("interim_results", interim_results)
390380
if keyterm is not None:

src/deepgram/listen/v1/media/client.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def transcribe_url(
7272
utterances: typing.Optional[bool] = None,
7373
utt_split: typing.Optional[float] = None,
7474
version: typing.Optional[MediaTranscribeRequestVersion] = None,
75+
mip_opt_out: typing.Optional[bool] = None,
7576
request_options: typing.Optional[RequestOptions] = None,
7677
) -> MediaTranscribeResponse:
7778
"""
@@ -186,6 +187,9 @@ def transcribe_url(
186187
version : typing.Optional[MediaTranscribeRequestVersion]
187188
Version of an AI model to use
188189
190+
mip_opt_out : typing.Optional[bool]
191+
Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
192+
189193
request_options : typing.Optional[RequestOptions]
190194
Request-specific configuration.
191195
@@ -242,6 +246,7 @@ def transcribe_url(
242246
utterances=utterances,
243247
utt_split=utt_split,
244248
version=version,
249+
mip_opt_out=mip_opt_out,
245250
request_options=request_options,
246251
)
247252
return _response.data
@@ -285,6 +290,7 @@ def transcribe_file(
285290
utterances: typing.Optional[bool] = None,
286291
utt_split: typing.Optional[float] = None,
287292
version: typing.Optional[MediaTranscribeRequestVersion] = None,
293+
mip_opt_out: typing.Optional[bool] = None,
288294
request_options: typing.Optional[RequestOptions] = None,
289295
) -> MediaTranscribeResponse:
290296
"""
@@ -399,6 +405,9 @@ def transcribe_file(
399405
version : typing.Optional[MediaTranscribeRequestVersion]
400406
Version of an AI model to use
401407
408+
mip_opt_out : typing.Optional[bool]
409+
Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
410+
402411
request_options : typing.Optional[RequestOptions]
403412
Request-specific configuration.
404413
@@ -453,6 +462,7 @@ def transcribe_file(
453462
utterances=utterances,
454463
utt_split=utt_split,
455464
version=version,
465+
mip_opt_out=mip_opt_out,
456466
request_options=request_options,
457467
)
458468
return _response.data
@@ -512,6 +522,7 @@ async def transcribe_url(
512522
utterances: typing.Optional[bool] = None,
513523
utt_split: typing.Optional[float] = None,
514524
version: typing.Optional[MediaTranscribeRequestVersion] = None,
525+
mip_opt_out: typing.Optional[bool] = None,
515526
request_options: typing.Optional[RequestOptions] = None,
516527
) -> MediaTranscribeResponse:
517528
"""
@@ -626,6 +637,9 @@ async def transcribe_url(
626637
version : typing.Optional[MediaTranscribeRequestVersion]
627638
Version of an AI model to use
628639
640+
mip_opt_out : typing.Optional[bool]
641+
Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
642+
629643
request_options : typing.Optional[RequestOptions]
630644
Request-specific configuration.
631645
@@ -690,6 +704,7 @@ async def main() -> None:
690704
utterances=utterances,
691705
utt_split=utt_split,
692706
version=version,
707+
mip_opt_out=mip_opt_out,
693708
request_options=request_options,
694709
)
695710
return _response.data
@@ -733,6 +748,7 @@ async def transcribe_file(
733748
utterances: typing.Optional[bool] = None,
734749
utt_split: typing.Optional[float] = None,
735750
version: typing.Optional[MediaTranscribeRequestVersion] = None,
751+
mip_opt_out: typing.Optional[bool] = None,
736752
request_options: typing.Optional[RequestOptions] = None,
737753
) -> MediaTranscribeResponse:
738754
"""
@@ -847,6 +863,9 @@ async def transcribe_file(
847863
version : typing.Optional[MediaTranscribeRequestVersion]
848864
Version of an AI model to use
849865
866+
mip_opt_out : typing.Optional[bool]
867+
Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
868+
850869
request_options : typing.Optional[RequestOptions]
851870
Request-specific configuration.
852871
@@ -909,6 +928,7 @@ async def main() -> None:
909928
utterances=utterances,
910929
utt_split=utt_split,
911930
version=version,
931+
mip_opt_out=mip_opt_out,
912932
request_options=request_options,
913933
)
914934
return _response.data

0 commit comments

Comments
 (0)