Skip to content

feat: (regen) diarization v2 batch GA, listen-provider dedup, think/models route fix#499

Merged
GregHolmes merged 7 commits into
mainfrom
gh/sdk-gen-2026-05-14
May 15, 2026
Merged

feat: (regen) diarization v2 batch GA, listen-provider dedup, think/models route fix#499
GregHolmes merged 7 commits into
mainfrom
gh/sdk-gen-2026-05-14

Conversation

@GregHolmes

@GregHolmes GregHolmes commented May 14, 2026

Copy link
Copy Markdown
Contributor

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.57 pin, re-added @commitlint/cli, @commitlint/config-conventional, tsx, playwright, vite, terser (generator's 5.2.1 version bump kept).
  • src/api/.../keys/client/Client.ts — restored optional request? parameter to manage.v1.projects.keys.create (3 spots).
  • src/api/types/CreateKeyV1Request.ts — restored legacy CreateKeyV1RequestOne alias.
  • src/api/.../AgentV1Settings.ts — restored interface form of Agent with named sub-types + AgentReference = Agent | string opt-in alias.
  • src/api/.../AgentV1SettingsAgentListenProvider.ts — restored one-line alias to AgentV1SettingsAgentContextListenProvider.

New freezes added this cycle

  • 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. Documented in AGENTS.md.
  • src/api/.../AgentV1SettingsAgentContextListenProvider.ts — the 2026-05-14 regen dedup'd listen-provider sub-types into top-level DeepgramListenProviderV1 / DeepgramListenProviderV2 and dropped the nested AgentV1SettingsAgentContextListenProviderV2.LanguageHint namespace path. Restored the nested namespace as a one-line alias type LanguageHint = DeepgramListenProviderV2.LanguageHint. Regression coverage added in tests/unit/compat-aliases.test.ts.
  • src/Client.ts — generator switched the client.fetch() passthrough helper's default baseUrl from env.base (api.deepgram.com) to env.agentRest (agent.deepgram.com) after the upstream spec introduced the new agentRest slot 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

  • Intentional fix from deepgram-docs#886 + #887: DeepgramEnvironment.Agent removed; Production gained an agentRest slot; the agent.v1.settings.think.models 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.
  • New optional diarize_model field on ListenV1RequestUrl + MediaTranscribeRequestOctetStream (purely additive); new MediaTranscribeRequestDiarizeModel enum.
  • New top-level DeepgramListenProviderV1 / DeepgramListenProviderV2 exports.
  • Generator version bumped to 5.2.1.
  • pnpm-lock.yaml rebuilt after the package.json reconciliation.

Test plan

  • 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 and passes end-to-end
  • All .bak files removed; .fernignore paths restored from .bak back to originals (plus 2 new freezes for biome.json and AgentV1SettingsAgentContextListenProvider.ts, plus 1 local-patch freeze for Client.ts)

@GregHolmes GregHolmes requested a review from lukeocodes as a code owner May 14, 2026 15:33
@GregHolmes GregHolmes changed the title chore: SDK regeneration 2026-05-14 feat: (regen) diarization v2 batch GA, listen-provider dedup, think/models route fix May 15, 2026
@GregHolmes GregHolmes self-assigned this May 15, 2026
@GregHolmes GregHolmes merged commit b015e1f into main May 15, 2026
8 of 10 checks passed
@GregHolmes GregHolmes deleted the gh/sdk-gen-2026-05-14 branch May 15, 2026 14:17
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants