Skip to content

v5.3.0

Choose a tag to compare

@github-actions github-actions released this 19 May 09:55
bcffba7
chore(main): release 5.3.0 (#500)

:robot: 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`](https://github.com/deepgram/deepgram-js-sdk/compare/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](https://github.com/deepgram/deepgram-docs/pull/886)
+ [#887](https://github.com/deepgram/deepgram-docs/pull/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`](https://github.com/deepgram/deepgram-js-sdk/commit/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`](https://github.com/deepgram/deepgram-js-sdk/commit/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).