Skip to content

fix: (regen) route think/models to env.agentRest#59

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

fix: (regen) route think/models to env.agentRest#59
GregHolmes merged 4 commits into
mainfrom
gh/sdk-gen-2026-05-15

Conversation

@GregHolmes
Copy link
Copy Markdown
Contributor

@GregHolmes GregHolmes commented May 15, 2026

Summary

SDK regeneration 2026-05-15. Both temporarily frozen files reviewed; both patches re-applied (no patches dropped this cycle).

Patches re-applied

  • src/main/java/com/deepgram/core/ClientOptions.java — restored correct User-Agent / X-Fern-SDK-Name (com.deepgram:deepgram-java-sdk, version 0.4.0) and the // x-release-please-version markers. Generator regen still rewrites these to the wrong artifact id (com.deepgram:deepgram-sdk / com.deepgram.fern:api-sdk) and strips the markers.
  • src/main/java/com/deepgram/core/ReconnectingWebSocketListener.java — restored applyOptionsOverride(...) runtime hook (used by TransportWebSocketFactory to apply DeepgramTransportFactory.reconnectOptions() without editing generated WS clients), volatile qualifier on option-derived fields, configurable connectionTimeoutMs on ReconnectOptions (was hardcoded 4000ms), and the maxRetries(0) "connect once, don't retry" semantics (retryCount > maxRetries, not >=).

Generator changes worth flagging

  • Environment constructor signature changed from 3-arg to 4-arg with a new agentRest field, plus getAgentRestURL() and Environment.Builder#agentRest(...).
  • resources/agent/v1/settings/think/models/{Raw,AsyncRaw}ModelsClient.java now route via environment().getAgentRestURL() instead of getAgentURL().
  • .fern/metadata.json bumped sdkVersion: 0.4.1.

Environment change — intentional fix, not a break

The regen drops Environment.AGENT and adds a new agentRest slot to Environment (with a 4-arg constructor and corresponding builder method). 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 agentRest slot is the dedicated REST host for agent-served endpoints.

Equivalent fix in Python SDK: deepgram/deepgram-python-sdk#715. JS SDK equivalent (deepgram-js-sdk#499) additionally needed a src/Client.ts patch because client.fetch() passthrough started defaulting to agentRest instead of base. The Java SDK has no equivalent passthrough in the hand-maintained DeepgramClient/DeepgramClientBuilder, so no analogous patch is needed here.

Hand-maintained tests that referenced Environment.AGENT (EnvironmentTest's AGENT environment nested class and ClientBuilderTest#testAgentEnvironment) were updated to build an agent-shaped environment via Environment.custom().agentRest(...).

Validation

  • ./gradlew test compileExamples → BUILD SUCCESSFUL
  • ReconnectingWebSocketListenerTest covers the re-applied patches: applyOptionsOverride, maxRetries(0) initial-attempt allowance, connectionTimeoutMs configurability — all green
  • All .bak files deleted; .fernignore paths restored to originals for both still-patched files

Test plan

  • Re-apply manual patches after regen.
  • Restore .fernignore originals; drop .bak shadow paths.
  • Delete all .bak files.
  • ./gradlew test compileExamples validated.

@GregHolmes GregHolmes requested a review from lukeocodes as a code owner May 15, 2026 16:09
fern-api Bot and others added 2 commits May 15, 2026 16:13
Re-apply patches that Fern's regen reverted, and adapt hand-maintained
tests to the new generator output.

ClientOptions.java: restore correct User-Agent/X-Fern-SDK-* headers
(com.deepgram:deepgram-java-sdk, version 0.4.0) and the
// x-release-please-version markers. Fern regen still rewrites these
to the wrong artifact id and strips the version markers.

ReconnectingWebSocketListener.java: restore applyOptionsOverride()
hook, volatile option-derived fields, configurable connectionTimeoutMs
on ReconnectOptions, and the maxRetries(0) "connect once, don't retry"
semantics (retryCount > maxRetries, not >=). Generator regen still
reverts all of these.

Environment.AGENT was removed by the generator (4-arg constructor with
new agentRest field). Hand-maintained tests that referenced
Environment.AGENT now build an equivalent agent-shaped environment via
Environment.custom().agentRest(...).
@GregHolmes GregHolmes changed the title chore: SDK regeneration 2026-05-15 feat!: (regen) Environment.agentRest split, drop Environment.AGENT May 15, 2026
@GregHolmes GregHolmes changed the title feat!: (regen) Environment.agentRest split, drop Environment.AGENT fix: (regen) route think/models to env.agentRest May 15, 2026
@GregHolmes GregHolmes self-assigned this May 18, 2026
@GregHolmes GregHolmes merged commit f6fd3af into main May 18, 2026
10 of 12 checks passed
GregHolmes pushed a commit 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 to deepgram/deepgram-js-sdk 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