Commit b015e1f
authored
feat: (regen) diarization v2 batch GA, listen-provider dedup, think/models route fix (#499)
## 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](deepgram/deepgram-docs#886)
+ [#887](deepgram/deepgram-docs#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
- [x] `make build` passes (CJS + ESM + ESM validation)
- [x] `make test` passes (535 unit tests + 132 wire tests, including 2
new regression cases for the `LanguageHint` shim)
- [x] `make test-esm` passes (5 tests)
- [x] `make lint` passes (warnings only, no errors)
- [x] `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
- [x] Example 9 (Voice Agent) exercises the rerouted
`agent.v1.settings.think.models.list()` endpoint and passes end-to-end
- [x] 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`)43 files changed
Lines changed: 856 additions & 305 deletions
File tree
- .fern
- src
- api
- resources
- agent/resources/v1
- resources/settings/resources/think/resources/models/client
- types
- listen/resources/v1/resources/media
- client
- requests
- types
- types
- tests
- unit
- wire
- agent/v1/settings/think
- auth/v1
- listen/v1
- manage/v1
- projects
- billing
- members
- usage
- read/v1
- selfHosted/v1
- voiceAgent
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments