feat: (regen) diarization v2 batch GA, listen-provider dedup, think/models route fix#499
Merged
Conversation
…t nested namespace
lukeocodes
approved these changes
May 15, 2026
This was referenced May 18, 2026
GregHolmes
pushed a commit
to deepgram/deepgram-java-sdk
that referenced
this pull request
May 19, 2026
🤖 I have created a release *beep* *boop* ## 0.5.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: [`v0.4.0...v0.5.0`](v0.4.0...v0.5.0). ### ⚠ Breaking changes **[`Environment`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java) constructor signature changed (3-arg → 4-arg) — #57 + #59** - New `agentRest` field, [`getAgentRestURL()`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java) getter, and [`Environment.Builder#agentRest(...)`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java) builder method. - [`Environment.AGENT`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java) was dropped in favor of the dedicated `agentRest` REST host. - This fixes a previously broken route: [`agent.v1.settings.think.models.list()`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/RawModelsClient.java) now correctly targets `env.agentRest` instead of [`getAgentURL()`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java). Any caller of that endpoint was already broken before; this is a corrective break. - Callers building a custom [`Environment`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java) must add the new `agentRest(...)` slot via [`Environment.custom()`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java). **Listen-provider type refactor — #57** - `AgentV1SettingsAgentContextListenProvider{V1, V2, V2LanguageHint}` deleted in favor of canonical top-level types [`DeepgramListenProviderV1`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/types/DeepgramListenProviderV1.java), [`DeepgramListenProviderV2`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/types/DeepgramListenProviderV2.java), [`DeepgramListenProviderV2LanguageHint`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/types/DeepgramListenProviderV2LanguageHint.java). - `AgentV1SettingsAgentListenProvider{V1, V2}` subtypes also deleted (~958 lines removed across the two wrapper hierarchies, deduped against the canonical top-level types). The sealed-type wrappers [`AgentV1SettingsAgentContextListenProvider`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentContextListenProvider.java) and [`AgentV1SettingsAgentListenProvider`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/agent/v1/types/AgentV1SettingsAgentListenProvider.java) remain. ### Features **Diarization v2 batch GA — #57** - New listen/media request types: [`ListenV1RequestUrl`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/listen/v1/media/requests/ListenV1RequestUrl.java), [`MediaTranscribeRequestOctetStream`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/listen/v1/media/requests/MediaTranscribeRequestOctetStream.java), [`MediaTranscribeRequestDiarizeModel`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/listen/v1/media/types/MediaTranscribeRequestDiarizeModel.java). - [`AsyncRawMediaClient`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/listen/v1/media/AsyncRawMediaClient.java) / [`RawMediaClient`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/listen/v1/media/RawMediaClient.java) updated to surface the new diarize-model and octet-stream request paths. ### Bug fixes **think/models routed to `agentRest` — #59** - [`RawModelsClient`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/RawModelsClient.java) and [`AsyncRawModelsClient`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/resources/agent/v1/settings/think/models/AsyncRawModelsClient.java) (under `agent/v1/settings/think/models/`) now resolve their base URL via [`environment().getAgentRestURL()`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java) instead of [`getAgentURL()`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java). (Same root cause as the breaking change above.) ### Patches preserved through regen Both regens re-applied the same hand-maintained patches (still listed in `.fernignore`): - [`ClientOptions`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/ClientOptions.java) — restored SDK identity headers (`User-Agent`, `X-Fern-SDK-Name`, `X-Fern-SDK-Version`) to the `com.deepgram:deepgram-java-sdk` values and re-added `// x-release-please-version` markers. Generator still overwrites these to the wrong artifact id (`com.deepgram:deepgram-sdk` / `com.deepgram.fern:api-sdk`) and strips the markers. - [`ReconnectingWebSocketListener`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/ReconnectingWebSocketListener.java) — re-applied the three fixes originally landed in #45: 1. `maxRetries(0)` semantics: `retryCount > maxRetries` (initial connect attempt always proceeds; the cap applies only to retries). 2. Configurable `connectionTimeoutMs` on [`ReconnectOptions`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/ReconnectingWebSocketListener.java) (nested in the same file; default 4000 ms, previously hardcoded). 3. [`applyOptionsOverride(...)`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/ReconnectingWebSocketListener.java) runtime hook used by [`TransportWebSocketFactory`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/transport/TransportWebSocketFactory.java) to apply per-transport reconnect policy from [`DeepgramTransportFactory`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/transport/DeepgramTransportFactory.java) without editing generated WS clients. 4. `volatile` qualifier on option-derived fields. No patches were dropped this cycle — the generator has not caught up on any of the above. ### Validation - `./gradlew test compileExamples` — BUILD SUCCESSFUL on both regen PRs. - [`ReconnectingWebSocketListenerTest`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/test/java/com/deepgram/core/ReconnectingWebSocketListenerTest.java) covers the re-applied WS patches. - [`EnvironmentTest`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/test/java/com/deepgram/core/EnvironmentTest.java) and [`ClientBuilderTest`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/test/java/com/deepgram/ClientBuilderTest.java) updated to build agent-shaped environments via [`Environment.custom().agentRest(...)`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/core/Environment.java). ### Cross-SDK reference The `agentRest` env fix has equivalents in deepgram/deepgram-python-sdk#715 and deepgram/deepgram-js-sdk#499. The JS SDK additionally needed a `client.fetch()` passthrough patch; Java has no equivalent passthrough in [`DeepgramClient`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/DeepgramClient.java) / [`DeepgramClientBuilder`](https://github.com/deepgram/deepgram-java-sdk/blob/main/src/main/java/com/deepgram/DeepgramClientBuilder.java), 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>
GregHolmes
pushed a commit
to deepgram/deepgram-python-sdk
that referenced
this pull request
May 19, 2026
🤖 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>
GregHolmes
added a commit
that referenced
this pull request
May 19, 2026
🤖 I have created a release *beep* *boop* ## 5.3.0 — what's in this release This release bundles the 2026-05-14 Fern SDK regeneration plus two follow-up commits on top of #499. See the full changelog: [`v5.2.0...v5.3.0`](v5.2.0...v5.3.0). ### Features **Diarization v2 batch GA + listen-provider dedup + think/models route fix — #499** [`DeepgramEnvironment`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/environments.ts) reshape (intentional upstream fix, not a runtime break): - [`DeepgramEnvironment.Agent`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/environments.ts) removed; [`Production`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/environments.ts) gained an `agentRest` slot. - The [`agent.v1.settings.think.models`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/agent/resources/v1/resources/settings/resources/think/resources/models/client/Client.ts) endpoint now routes via HTTPS instead of WSS. - Not a breaking change in practice — the old `DeepgramEnvironment.Agent` would have routed every REST client at `https://agent.deepgram.com` (404 on `/v1/listen`, etc.) and `think/models` was misrouted over WSS, so no consumer could have had a working flow through it. Driven by [deepgram-docs#886](deepgram/deepgram-docs#886) + [#887](deepgram/deepgram-docs#887). Diarization v2 batch GA (purely additive): - New optional `diarize_model` field on [`ListenV1RequestUrl`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/listen/resources/v1/resources/media/client/requests/ListenV1RequestUrl.ts) and [`MediaTranscribeRequestOctetStream`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/listen/resources/v1/resources/media/client/requests/MediaTranscribeRequestOctetStream.ts); new [`MediaTranscribeRequestDiarizeModel`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestDiarizeModel.ts) enum. Listen-provider dedup: - New top-level exports [`DeepgramListenProviderV1`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/types/DeepgramListenProviderV1.ts) / [`DeepgramListenProviderV2`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/types/DeepgramListenProviderV2.ts). **Restore `AgentV1SettingsAgentContextListenProviderV2.LanguageHint` nested namespace ([`ace680a`](ace680ae192d85dcb5f54268984ccf0866aa62e9))** - The dedup collapsed the nested `AgentV1SettingsAgentContextListenProviderV2.LanguageHint` namespace path. Restored as a one-line alias `type LanguageHint = DeepgramListenProviderV2.LanguageHint` inside [`AgentV1SettingsAgentContextListenProvider.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentContextListenProvider.ts) so existing consumers of the nested path keep working. - Regression coverage in [`tests/unit/compat-aliases.test.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/tests/unit/compat-aliases.test.ts). ### Bug fixes **Restore [`client.fetch()`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/Client.ts) default `baseUrl` to `api.deepgram.com` ([`56b8ce5`](56b8ce555c09842e6021fcb889e4aff9e87b151d))** - After the upstream spec introduced the new `agentRest` slot, the generator switched the [`client.fetch()`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/Client.ts) passthrough helper's default `baseUrl` from `env.base` (api.deepgram.com) to `env.agentRest` (agent.deepgram.com). Reverted locally in [`src/Client.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/Client.ts) — passthrough should default to the canonical Deepgram REST host. Likely a Fern generator artifact; this freeze gets dropped once the upstream fix lands. ### Patches preserved through regen (re-applied in #499) No prior patches dropped — every existing freeze still addresses surface the new regen misses. - [`package.json`](https://github.com/deepgram/deepgram-js-sdk/blob/main/package.json) — kept `@types/node ^20.17.57` pin, re-added `@commitlint/cli`, `@commitlint/config-conventional`, `tsx`, `playwright`, `vite`, `terser` (generator's `5.2.1` version bump kept). - [`src/api/resources/manage/.../keys/client/Client.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.ts) — restored optional `request?` parameter to `manage.v1.projects.keys.create` (3 spots). - [`src/api/types/CreateKeyV1Request.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/types/CreateKeyV1Request.ts) — restored legacy `CreateKeyV1RequestOne` alias. - [`src/api/resources/agent/resources/v1/types/AgentV1Settings.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/agent/resources/v1/types/AgentV1Settings.ts) — restored interface form of `Agent` with named sub-types + `AgentReference = Agent | string` opt-in alias. - [`src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.ts) — restored one-line alias to [`AgentV1SettingsAgentContextListenProvider`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentContextListenProvider.ts). ### New freezes added this cycle (in #499) - [`biome.json`](https://github.com/deepgram/deepgram-js-sdk/blob/main/biome.json) — generator emits `"vcs": { "enabled": false }`, which caused biome lint to scan the gitignored `examples/browser/deepgram.js` bundle. Restored `useIgnoreFile: true` and added to `.fernignore` so this patch survives the next regen. - [`AgentV1SettingsAgentContextListenProvider.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentContextListenProvider.ts) — see the `LanguageHint` follow-up commit above. - [`src/Client.ts`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/Client.ts) — see the `client.fetch()` bug-fix commit above. ### Validation - `make build` — passes (CJS + ESM + ESM validation). - `make test` — passes (535 unit tests + 132 wire tests, including 2 new regression cases for the `LanguageHint` shim). - `make test-esm` — passes (5 tests). - `make lint` — passes (warnings only, no errors). - `make examples` — 30/36 pass against the real API; remaining 6 failures are env-config (missing `DEEPGRAM_PROJECT_ID`) or transient network, not regen-related. - Example 9 (Voice Agent) exercises the rerouted `agent.v1.settings.think.models.list()` endpoint end-to-end. ### Cross-SDK reference The `agentRest` env fix has equivalents in deepgram/deepgram-python-sdk#715 and deepgram/deepgram-java-sdk#59. JS is the only SDK that additionally needed the [`client.fetch()`](https://github.com/deepgram/deepgram-js-sdk/blob/main/src/Client.ts) passthrough patch — Python's [`client.py`](https://github.com/deepgram/deepgram-python-sdk/blob/main/src/deepgram/client.py) and Java's `DeepgramClient`/`DeepgramClientBuilder` have no equivalent passthrough. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Regenerate the SDK from the 2026-05-14 Fern build and reconcile the temporarily-frozen patches against the new generator output.
Re-applied patches (existing freezes)
package.json— kept@types/node ^20.17.57pin, re-added@commitlint/cli,@commitlint/config-conventional,tsx,playwright,vite,terser(generator's5.2.1version bump kept).src/api/.../keys/client/Client.ts— restored optionalrequest?parameter tomanage.v1.projects.keys.create(3 spots).src/api/types/CreateKeyV1Request.ts— restored legacyCreateKeyV1RequestOnealias.src/api/.../AgentV1Settings.ts— restored interface form ofAgentwith named sub-types +AgentReference = Agent | stringopt-in alias.src/api/.../AgentV1SettingsAgentListenProvider.ts— restored one-line alias toAgentV1SettingsAgentContextListenProvider.New freezes added this cycle
biome.json— generator emits"vcs": { "enabled": false }, which caused biome lint to scan the gitignoredexamples/browser/deepgram.jsbundle. RestoreduseIgnoreFile: trueand added to.fernignoreso this patch survives the next regen. Documented inAGENTS.md.src/api/.../AgentV1SettingsAgentContextListenProvider.ts— the 2026-05-14 regen dedup'd listen-provider sub-types into top-levelDeepgramListenProviderV1/DeepgramListenProviderV2and dropped the nestedAgentV1SettingsAgentContextListenProviderV2.LanguageHintnamespace path. Restored the nested namespace as a one-line aliastype LanguageHint = DeepgramListenProviderV2.LanguageHint. Regression coverage added intests/unit/compat-aliases.test.ts.src/Client.ts— generator switched theclient.fetch()passthrough helper's defaultbaseUrlfromenv.base(api.deepgram.com) toenv.agentRest(agent.deepgram.com) after the upstream spec introduced the newagentRestslot for the think-models endpoint. The passthrough should default to the canonical Deepgram REST host. Reverted locally; likely a Fern generator artifact — drop this freeze when the upstream fix lands.Patches dropped
None — every prior patch still addresses surface the new regen misses.
Notable generator changes
DeepgramEnvironment.Agentremoved;Productiongained anagentRestslot; theagent.v1.settings.think.modelsendpoint now routes via HTTPS instead of WSS. Not a breaking change in practice — the oldDeepgramEnvironment.Agentwould have routed every REST client athttps://agent.deepgram.com(404 on/v1/listen, etc.) andthink/modelswas misrouted over WSS, so no consumer could have had a working flow through it.diarize_modelfield onListenV1RequestUrl+MediaTranscribeRequestOctetStream(purely additive); newMediaTranscribeRequestDiarizeModelenum.DeepgramListenProviderV1/DeepgramListenProviderV2exports.5.2.1.pnpm-lock.yamlrebuilt after thepackage.jsonreconciliation.Test plan
make buildpasses (CJS + ESM + ESM validation)make testpasses (535 unit tests + 132 wire tests, including 2 new regression cases for theLanguageHintshim)make test-esmpasses (5 tests)make lintpasses (warnings only, no errors)make examples— 30/36 pass against the real API; remaining 6 failures are env-config (missingDEEPGRAM_PROJECT_ID) or transient network, not regen-relatedagent.v1.settings.think.models.list()endpoint and passes end-to-end.bakfiles removed;.fernignorepaths restored from.bakback to originals (plus 2 new freezes forbiome.jsonandAgentV1SettingsAgentContextListenProvider.ts, plus 1 local-patch freeze forClient.ts)