Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 135
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: deepgram/deepgram-python-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.1.1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: deepgram/deepgram-python-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.2.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 3 commits
- 49 files changed
- 3 contributors
Commits on May 15, 2026
-
feat: (regen) diarization v2 batch GA, listen-provider dedup, think/m…
…odels route fix (#714) ## Summary Fern SDK regeneration on 2026-05-14, with manual patches re-applied. ### What's in this PR 1. **Generator output** (commit `7b085e8`, `fern-api[bot]`): new generated files from the spec at `0052a02`. `pyproject.toml` bumped `7.1.1` → `7.1.2`. Fern generator unchanged (`5.8.3`). 2. **Re-applied manual patches** (commit `2179f61`): 20 patched files, none became obsolete after this regen. 3. **New listen-provider compat aliases** (same commit): the spec deduplicated 5 PascalCase listen-provider types into 3 top-level `DeepgramListenProvider*` names. To preserve backward compat over a minor version bump, 10 hand-written alias files re-export from the new names. ### Patch categories re-applied - 4 socket clients (`agent/v1`, `listen/v1`, `listen/v2`, `speak/v1`): broad `except Exception`, optional control-message defaults, `_sanitize_numeric_types` (agent), `send_configure` raw shim + `typing.Any` response (listen/v2). - 6 agent-settings files: callable `AgentV1SettingsAgent(...)` wrapper, broadened `agent` union (accepts wrapper + context + agent-id string), legacy `messages=` validator + read-side property, legacy TypedDict shapes. - `agent_v1settings_audio_output.container`: kept as `Optional[str]` instead of the enum alias. - `core/query_encoder`: bool → lowercase coercion before `urlencode`. - Wire test: restored `CreateKeyV1RequestOneParams` alias coverage. - 7 package `__init__.py` files: legacy alias re-exports for `CreateKeyV1RequestOne[Params]`, `AgentV1HistoryContent[Params]`, `AgentV1HistoryFunctionCalls[Params]`, and `AgentV1SettingsAgentContextMessagesItem*[Params]`. ### New compat aliases (listen-provider rename) 10 alias files added under `src/deepgram/agent/v1/{types,requests}/`, each a one-line `from ....{types,requests}.deepgram_listen_provider_* import DeepgramListenProvider*` re-export. All 10 added to `.fernignore` as permanently frozen. `AGENTS.md` updated. Regression tests in `tests/custom/test_compat_aliases.py` confirm each alias resolves to the matching `DeepgramListenProvider*` target. ## Test plan - [x] Fern regen output landed cleanly on the branch - [x] All 20 `.bak` patches diffed against new gen; categorized via subagent (all still needed) - [x] Patches re-applied; new `DeepgramListenProvider*` exports kept - [x] 10 listen-provider compat aliases created + re-exported from 4 `__init__.py` files - [x] `.fernignore` reconciled (paths swapped back, 10 new entries added) - [x] All `.bak` files deleted - [x] `ruff check src` clean - [x] `mypy src` clean (801 files) - [x] `pytest .` — 199 passed / 4 skipped (the skipped are aiohttp/client autodetect cases, not regen-related) --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 9d9a43d - Browse repository at this point
Copy the full SHA 9d9a43dView commit details
Commits on May 18, 2026
-
fix: (regen) route think/models to env.agent_rest (#715)
## Summary SDK regeneration 2026-05-15. All 20 temporarily frozen files reviewed; all 20 patches re-applied (no patches dropped this cycle — see "near-miss" note below). ## Patches re-applied - `core/query_encoder.py` — bool→lowercase coercion for websocket query strings (7.1.1 fix). - `tests/wire/test_manage_v1_projects_keys.py` — wire test for legacy `CreateKeyV1RequestOneParams` alias. - 4 socket clients (`speak/v1`, `listen/v1`, `listen/v2`, `agent/v1`) — broad `except Exception` (custom transports), optional `message=` defaults on control sends. - `agent/v1/socket_client.py` — additionally restored `_sanitize_numeric_types` (float→int sanitizer). - `listen/v2/socket_client.py` — additionally kept `send_configure` as `typing.Any`/raw `_send` shim and `typing.Any` in response Union (generator now emits `ListenV2Configure`/`ListenV2ConfigureSuccess` but we don't yet have evidence the new typed models are wire-correct). - 7 agent-settings types/requests preserving callable `AgentV1SettingsAgent(...)`, `AgentV1Settings.agent` accepting both wrapper and `agent_id` strings, legacy `messages=[...]` migration, `.messages` read-side property, and `audio.output.container` as `str`. - 7 package `__init__.py` files restoring compat re-exports: `CreateKeyV1RequestOne(+Params)`, `AgentV1HistoryContent(+Params)`, `AgentV1HistoryFunctionCalls(+Params)`, `AgentV1SettingsAgentContextMessagesItem*(+Params)`, `AgentV1SettingsAgent[Context]ListenProviderV1/V2/V2LanguageHint(+Params)`. ## Generator changes worth flagging - `AgentV1SettingsAgent` is now a Union alias (`Union[AgentV1SettingsAgentContext, str]`) in fresh generator output — callable usage would break. We continue to patch back to a class with `model_validator` for backward compat. - `audio_output.container` regenerated as `AgentV1SettingsAudioOutputContainer` enum; we keep `str`. - `messages` field removed from `AgentV1SettingsAgentContext(Params)`; canonical shape is `context.messages`. - `agent/v1/settings/think/models/raw_client.py` route now hits `environment.agent_rest`. ## `DeepgramClientEnvironment` change — intentional fix, not a break The regen drops `DeepgramClientEnvironment.AGENT` and adds a required `agent_rest` kwarg to `DeepgramClientEnvironment.__init__`. This is fixing the previously broken `agent.v1.settings.think.models.list()` route: the old `.AGENT` env routed REST traffic to the wrong host, so any caller of that endpoint was already broken. The new `agent_rest` slot is the dedicated REST host for agent-served endpoints. JS SDK equivalent (deepgram-js-sdk#499 → `56b8ce5`) also needed a `src/Client.ts` patch because `client.fetch()` passthrough started defaulting to `agentRest` instead of `base`. The Python SDK has no equivalent passthrough in the hand-maintained `client.py`, so no analogous patch is needed here. ## Near miss Initial review classified `agent/v1/types/agent_v1settings.py` and `agent/v1/requests/agent_v1settings.py` as droppable (new generator declares `agent: AgentV1SettingsAgent` and the new `AgentV1SettingsAgent` is 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` covers this regression. ## Validation - `uv run pytest -q` → 199 passed, 4 skipped - `uv run mypy src` → clean (801 files) - `uv run ruff check src tests` → 57 errors, all pre-existing on main in `tests/manual/` (untouched by regen) ## Test plan - [x] Re-apply manual patches after regen. - [x] Restore `.fernignore` originals; drop `.bak` shadow paths. - [x] Delete all `.bak` files. - [x] `pytest`, `ruff check`, `mypy` validated (with caveats above). --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for ffd2e7d - Browse repository at this point
Copy the full SHA ffd2e7dView commit details
Commits on May 19, 2026
-
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>
Configuration menu - View commit details
-
Copy full SHA for e169f63 - Browse repository at this point
Copy the full SHA e169f63View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v7.1.1...v7.2.0
You can’t perform that action at this time.
