Tags: deepgram/deepgram-python-sdk
Tags
chore(main): release 7.3.1 (#725) 🤖 I have created a release *beep* *boop* --- ## [7.3.1](v7.3.0...v7.3.1) (2026-06-03) ### Bug Fixes * widen pydantic-core bound via fern 5.14.8 regen (closes [#701](#701)) ([#724](#724)) ([5c1e845](5c1e845)) --- ### What's in this release This release ships a single PR ([#724](#724)), an SDK regeneration that bumped the Fern Python generator `5.8.3 → 5.14.8`. #### Dependency fix (closes #701) * `pydantic-core` bound widened from `>=2.18.2,<2.44.0` to `>=2.18.2,<3.0.0` in `pyproject.toml` and `requirements.txt`, resolving the resolver conflict with `pydantic>=2.13`. `poetry.lock` now resolves `pydantic-core 2.46.4`. #### New: client-level `max_retries` parameter (generator feature) * The sync and async client constructors now accept a `max_retries` parameter, with a per-request override via `request_options` that takes precedence over the client-level value. * This is additive and **does not change default behavior**: the SDK already retried up to 2 times (on HTTP 408/429/5xx and connection errors, with backoff) in 7.3.0 — that default of `2` is unchanged. The only new capability is that retries are now configurable from the client constructor (e.g. pass `max_retries=0` to disable). * Files touched (all fully generated): `base_client.py`, `core/client_wrapper.py`, plus generated coverage in `tests/utils/test_http_client.py`. #### Verification (from #724) * `poetry run mypy src/` — clean (801 files) * `poetry run pytest -rP .` — 222 passed, 4 skipped (incl. all custom back-compat regression tests) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(main): release 7.3.0 (#722) 🤖 I have created a release *beep* *boop* --- ## [7.3.0](v7.2.0...v7.3.0) (2026-06-01) ### Features * **client:** add a declarative `reconnect` flag with transport-factory auto-disable. `DeepgramClient` / `AsyncDeepgramClient` now accept `reconnect: bool = True` (exposed read-only as `client.reconnect`). When a custom `transport_factory` is supplied, `reconnect` auto-sets to `False` to signal that the transport owns its own retry/reconnect lifecycle — e.g. the SageMaker transport's jittered backoff + replay buffers — so SDK-level retries don't stack on top and cause storm-on-storm under burst load. Pass `reconnect=True` explicitly to opt back in. Declarative only for now (the Python SDK has no wrapper reconnect layer; `websockets` doesn't auto-reconnect), fully backwards-compatible, and parity with the same flag in the JS ([#492](deepgram/deepgram-js-sdk#492)) and Java SDKs ([#720](#720)) ([b5d5905](b5d5905)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Greg Holmes <greg.holmes@deepgram.com>
chore(main): release 7.2.0 (#716) 🤖 I have created a release *beep* *boop* ## 7.2.0 — what's in this release This release bundles two Fern SDK regenerations (2026-05-14 and 2026-05-15) plus the manual patches re-applied on top of each. See the full changelog: [`v7.1.1...v7.2.0`](v7.1.1...v7.2.0). ### Features **Diarization v2 batch GA — #714** - Listen-provider rename: spec deduplicated 5 PascalCase types into 3 canonical top-level names [`DeepgramListenProviderV1`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/types/deepgram_listen_provider_v1.py), [`DeepgramListenProviderV2`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/types/deepgram_listen_provider_v2.py), [`DeepgramListenProviderV2LanguageHint`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/types/deepgram_listen_provider_v2language_hint.py) (plus matching TypedDicts under [`src/deepgram/requests/`](https://github.com/deepgram/deepgram-python-sdk/tree/main/src/deepgram/requests)). - 10 hand-written compat alias files preserve the old names — re-exports under [`src/deepgram/agent/v1/types/`](https://github.com/deepgram/deepgram-python-sdk/tree/main/src/deepgram/agent/v1/types) and [`src/deepgram/agent/v1/requests/`](https://github.com/deepgram/deepgram-python-sdk/tree/main/src/deepgram/agent/v1/requests) for both [`AgentV1SettingsAgentContextListenProvider{V1,V2,V2LanguageHint}`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider.py) and [`AgentV1SettingsAgentListenProvider{V1,V2}`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/types/agent_v1settings_agent_listen_provider.py), so the rename is fully backward-compatible. All 10 added to `.fernignore` as permanently frozen; regression coverage in [`tests/custom/test_compat_aliases.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/tests/custom/test_compat_aliases.py). ### Bug fixes **think/models routed to `agent_rest` — #715** - [`agent/v1/settings/think/models/raw_client.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/settings/think/models/raw_client.py) now resolves the base URL via `environment.agent_rest`. - [`DeepgramClientEnvironment`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/environment.py) reshape supports this: [`DeepgramClientEnvironment.AGENT`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/environment.py) was dropped and a new `agent_rest` kwarg was added to [`DeepgramClientEnvironment.__init__`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/environment.py). This is corrective rather than breaking — the old `.AGENT` env routed REST traffic to the wrong host, so [`agent.v1.settings.think.models.list()`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/settings/think/models/raw_client.py) and any other caller of that endpoint was already broken. Callers building a custom environment should pass the new `agent_rest=` slot. ### Patches preserved through regen Both regens re-applied 20 hand-maintained patches (still listed in `.fernignore`). No patches dropped this cycle. **Socket clients** — broad `except Exception` for custom transports, optional `message=` defaults on control sends: - [`agent/v1/socket_client.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/socket_client.py) — also restored `_sanitize_numeric_types` (float→int sanitizer). - [`listen/v1/socket_client.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/listen/v1/socket_client.py). - [`listen/v2/socket_client.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/listen/v2/socket_client.py) — also kept `send_configure` as a raw `typing.Any` shim and `typing.Any` in the response Union (generator now emits `ListenV2Configure`/`ListenV2ConfigureSuccess` but we don't yet have evidence the new typed models are wire-correct). - [`speak/v1/socket_client.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/speak/v1/socket_client.py). **Agent settings** — callable [`AgentV1SettingsAgent(...)`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/types/agent_v1settings.py) wrapper (generator now emits a `Union[AgentV1SettingsAgentContext, str]` alias, which would break callable usage), broadened [`AgentV1Settings.agent`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/types/agent_v1settings.py) union (accepts wrapper + context + agent-id string), legacy `messages=` validator + read-side property, legacy TypedDict shapes in [`agent/v1/requests/agent_v1settings.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/requests/agent_v1settings.py). [`agent_v1settings_audio_output.container`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/types/agent_v1settings_audio_output.py) kept as `Optional[str]` instead of the regenerated `AgentV1SettingsAudioOutputContainer` enum. **Misc** — [`core/query_encoder.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/core/query_encoder.py) bool → lowercase coercion before `urlencode`; wire test [`tests/wire/test_manage_v1_projects_keys.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/tests/wire/test_manage_v1_projects_keys.py) restored `CreateKeyV1RequestOneParams` alias coverage; 7 package `__init__.py` files restored compat re-exports for `CreateKeyV1RequestOne(+Params)`, `AgentV1HistoryContent(+Params)`, `AgentV1HistoryFunctionCalls(+Params)`, `AgentV1SettingsAgentContextMessagesItem*(+Params)`. ### Near miss (from #715) Initial review classified [`agent/v1/types/agent_v1settings.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/types/agent_v1settings.py) and [`agent/v1/requests/agent_v1settings.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/agent/v1/requests/agent_v1settings.py) as droppable (the new generator declares `agent: AgentV1SettingsAgent` and `AgentV1SettingsAgent` is now itself `Union[AgentV1SettingsAgentContext, str]`, structurally equivalent). Pytest caught the issue: because we patch `AgentV1SettingsAgent` back to a class for callable backward compat, the bare `agent: AgentV1SettingsAgent` field rejects string values. Both patches restored to broaden to `Union[AgentV1SettingsAgent, AgentV1SettingsAgentContext, str]`. [`tests/custom/test_compat_aliases.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/tests/custom/test_compat_aliases.py) covers this regression. ### Validation - `uv run pytest -q` — 199 passed / 4 skipped (aiohttp/client autodetect cases, not regen-related). - `uv run mypy src` — clean (801 files). - `uv run ruff check src` — clean (the 57 pre-existing errors live in `tests/manual/`, untouched by regen). ### Cross-SDK reference The `agent_rest` env fix has equivalents in deepgram/deepgram-js-sdk#499 and deepgram/deepgram-java-sdk#59. The JS SDK additionally needed a `src/Client.ts` patch because `client.fetch()` passthrough started defaulting to `agentRest` instead of `base`. Python has no equivalent passthrough in the hand-maintained [`client.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/client.py), so no analogous patch was required here. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(main): release 7.1.1 (#713) 🤖 I have created a release *beep* *boop* --- ## [7.1.1](v7.1.0...v7.1.1) (2026-05-12) ### Bug Fixes * lowercase bool query params on websocket connect ([#712](#712)) ([8899609](8899609)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(main): release 7.1.0 (#700) 🤖 I have created a release *beep* *boop* --- ## [7.1.0](v7.0.0...v7.1.0) (2026-05-06) ### Features * update generated SDK models and restore agent settings compatibility ([#705](#705)) ([0b820c9](0b820c9)) ### Documentation * target Context7 benchmark gaps in Python skills [no-ci] ([#699](#699)) ([a232eb8](a232eb8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(main): release 7.0.0 (#691) 🤖 I have created a release *beep* *boop* --- ## [7.0.0](v6.1.1...v7.0.0) (2026-04-27) ### ⚠ BREAKING CHANGES * sdk regeneration 2026-04-24 ([#696](#696)) * sdk regeneration 2026-04-14 ([#690](#690)) ### Features * sdk regeneration 2026-04-14 ([#690](#690)) ([d4d129f](d4d129f)) * sdk regeneration 2026-04-24 ([#696](#696)) ([4714207](4714207)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(main): release 6.1.1 (#681) 🤖 I have created a release *beep* *boop* --- ## [6.1.1](v6.1.0...v6.1.1) (2026-03-27) ### Bug Fixes * **websockets:** restore optional message param on control send_ methods ([#680](#680)) ([0018fc4](0018fc4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(main): release 6.1.0 (#678) 🤖 I have created a release *beep* *boop* --- ## [6.1.0](v6.0.1...v6.1.0) (2026-03-26) ### Features * **agent:** support multi-provider speak/think configuration and typed listen parameters ([#676](#676)) ([5dfb1aa](5dfb1aa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chore(main): release 6.0.1 (#670) 🤖 I have created a release *beep* *boop* --- ## [6.0.1](v6.0.0...v6.0.1) (2026-02-24) ### Bug Fixes * 🌿 skip_validation:true to allow unknown messages back from the API ([#669](#669)) ([48354d2](48354d2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
PreviousNext