revert: listen v2 force-end-turn + diarize/word-confidence regen (#89) - #91
Conversation
…reverted knob APIs)
dg-coreylweathers
left a comment
There was a problem hiding this comment.
Approving.
Verified the revert is a clean inverse of 5b6323a — the pre-README-fix tree is byte-identical to the 0.7.1 release commit 8b3c605 — and that 0.7.1's hand patches all survive: the additionalProperties streaming escape hatch, the forward-compat unknown-frame no-op, the fields-less hashCode() set, the ReconnectingWebSocketListener fixes, and the ClientOptions version-marker freeze (plus its release-please generic entry, which is what keeps X-Fern-SDK-Version bumpable with no wire-version drift).
All four review findings actioned:
- B1 — #90 closed, and the body no longer claims release-please will regenerate its own release notes.
- B2 — #93 filed and closed; the body now has a "Forfeited by this revert" section naming all three items and stating plainly that an unreleased fix is forfeited while released behaviour is restored. The
defaultImpl = V2Valuefix is re-applied on all three provider unions in #92, withAgentSettingsProviderDefaultTestrestored.AgentV1UpdateListenShimTestis correctly not restored — it guarded the shim #92 deliberately drops. - S1 —
78c4601restores the accurate retry-behavior prose, keeping only the genuinely-removed tuning knobs out. - S2 — the body now discloses the non-spec scope (Fern toolchain downgrade, freeze-block bookkeeping, README change).
Merge this before #92 — verified git merge-tree is clean in both directions and that the merged tree retains 78c4601's prose.
One heads-up: release-please.yml triggers on push to main, so merging this will open a fresh 0.7.2 release PR whose changelog still advertises the reverted #89 features — 5b6323a remains in range since the v0.7.1 tag and release-please cannot cancel a feat with a revert. Don't merge that release PR; close it as with #90, or park it until #92 lands and hand-delete the 5b6323a Features line before cutting 0.8.0.
…provider + google version (#92) Regenerates the SDK against the latest Fern generator (`4.10.1` → `4.16.0`) and API spec (`ff8fd2b` → `03f0677`), reconciles the hand-maintained patches, and documents the resulting breaking changes with a migration guide. Supersedes the reverted #89. ## Base Stacked on the revert branch (#91). Until that merges, this PR's diff includes the revert commit; merge #91 first (or it rides along). ## ⛔ Blocked / do not merge yet Regenerated from an **unmerged spec branch**: `.fern/metadata.json` `originGitCommit` `03f0677` lives only on `origin/jherlihy/flux-tts-ga`, not on `deepgram-docs` `main`. The launch surface here (`breaks_applied`, `ConfigureFailure`, `expressivity`, `speed`, `redact`) exists only on that branch. Kept as a **draft** until it lands. - **Blocked-on:** `deepgram-docs#1094` (Flux TTS copy) + the `jherlihy/flux-tts-ga` spec branch merging to `deepgram-docs` `main`. ## Breaking changes (pre-1.0, source/compile-time only) All three follow the API definition; on-the-wire payloads for existing requests are unchanged. Full before/after in [`docs/Migrating-v0.7-to-v0.8.md`](./docs/Migrating-v0.7-to-v0.8.md). 1. **`AgentV1UpdateListenListen.provider`** retyped `DeepgramListenProviderV2` → `AgentV1UpdateListenListenProvider` (V1/V2 union). Wrap with `AgentV1UpdateListenListenProvider.v2(...)`; read via `getV2()`. 2. **`Google.version`** retyped `Optional<String>` → `Optional<GoogleThinkProviderVersion>`. Use the enum constants (`V1BETA`, `AI_STUDIO_V1BETA`, `GEMINI_ENTERPRISE_AGENT_V1`). 3. **`SpeakV2SpeechMetadataControlsApplied`** gains a required `breaksApplied` field (new builder step; new `getBreaksApplied()`). Read paths unaffected. Origin verified: #2 and #3 are new in the latest spec; #1's union shape existed in #89 but was previously hidden behind an in-SDK shim we intentionally did not carry forward. ## Reconciliation (post-regen review) Diffed each of the 17 `.bak` patches against the freshly generated originals — **all 17 still needed**, none dropped. `.fernignore` restored to its pre-prep state; all `.bak` files deleted. - **13 restored verbatim** (generator produced no other changes): the 11 fields-less `hashCode()` types, `ReconnectingWebSocketListener` (override hook / `connectionTimeoutMs` / `maxRetries(0)` semantics), and the `listen/v1` + `speak/v1` websocket clients (query-param repeats + `additionalProperties`). - **2 surgically merged** (`listen/v2` + `speak/v2` websocket clients): re-applied `QueryStringMapper` array-param serialization, the `additionalProperties` escape hatch, and the forward-compat unknown-message no-op, **while keeping the generator's new features** (speak/v2 `sendInterrupt`/`sendConfigure` + `onSpeechInterrupted`/`onConfigureSuccess`/`onConfigureFailure`; listen/v2 `redact`). - **`ClientOptions`**: kept the new retry-tuning options + `ResponseDecompressionInterceptor`; re-applied only the two `// x-release-please-version` header lines (colon SDK-name form), removed the generator's `getSdkVersion()` helper (build does not stamp the JAR manifest, so it would drift). ## Additive highlights Speak V2 interrupt/configure, Listen V2 `redact`, Speak V2 `speed`/`expressivity`, new Deepgram Flux TTS voices, client retry tuning, automatic response decompression. ## Tests added - `ListenV2ConnectWireTest`: new `redact` connect param (present as wire `numbers`, omitted when absent). - `RegenTypesTest` → "2026-08-11 regen type shapes": the three breaking shapes (provider union v2 factory/`getV2`/serialization, `Google.version` enum wire value, `ListenV2Redact` wire values). ## Verification - `./gradlew unitTest` ✅ · `spotlessCheck` ✅ · `compileExamples` ✅ - `./gradlew integrationTest` ✅ (Tier 1 + Tier 2 against a live key); opt-in Speak V2 WS integration ✅ (returned audio over the new v2 WS path) - Ran all non-`manage` examples: 19 pass, 7 long-running streaming/agent examples connected and worked, 4 environmental (proxy / file-arg / callback URL / SageMaker) — no SDK regressions. ## Post-review additions (from #91 review) - **Re-applied the union default-variant fix** the #89 revert forfeited (issue #93): `defaultImpl = V2Value` on `AgentV1UpdateListenListenProvider`, `AgentV1SettingsAgentListenProvider`, `AgentV1SettingsAgentContextListenProvider`, so a provider payload omitting the optional `version` discriminator (what 0.7.x emits) deserializes as V2 instead of dropping to `{"provider":null}`. Frozen in `.fernignore` + `AGENTS.md`, guarded by the re-added `AgentSettingsProviderDefaultTest`. The `getProvider()` return-type shim is intentionally **not** re-applied — that retype is a deliberate breaking change (see the migration guide). ## Core behavior changes (generator 4.10.1 → 4.16.0) Beyond the spec features, the generator upgrade changes core HTTP-client behavior worth calling out in the release notes: - **Automatic response decompression** is now installed by default (`ResponseDecompressionInterceptor`): gzip/deflate-encoded HTTP responses are transparently decoded. No API change; transparent to callers. - **New optional retry tuning** on `ClientOptions.Builder`: `initialRetryDelayMillis`, `maxRetryDelayMillis`, `retryJitterFactor`. All defaulted — existing behavior is unchanged unless set. ## Follow-ups - Once this lands, release-please cuts a fresh release at **0.8.0** (breaking `feat!`). - **Changelog needs a manual edit before releasing.** `5b6323a` (#89 `feat(regen)`) is still in release-please's range since `v0.7.1`, and release-please can't pair a revert with the commit it reverts — so the generated 0.8.0 notes will re-list the reverted #89 features (`diarize_info`, force-end-turn) under Features. Hand-edit the release PR's `CHANGELOG.md` to drop them before merging it. BREAKING CHANGE: `AgentV1UpdateListenListen.provider` is now `AgentV1UpdateListenListenProvider` (V1/V2 union); `Google.version` is now `Optional<GoogleThinkProviderVersion>`; `SpeakV2SpeechMetadataControlsApplied` has a new required `breaksApplied` field. See docs/Migrating-v0.7-to-v0.8.md. --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
Reverts the listen v2 regen (
5b6323a, originally #89: Flux force-end-turn, listen v1 diarize metadata + arch, word speaker confidence,AgentV1UpdateListenprovider retype,ListenV2Redact) offmain.Mirrors the equivalent revert on deepgram-python-sdk: deepgram/deepgram-python-sdk#757
Why
This work isn't ready to ship yet, and other priorities need to release from
mainwithout it. Since the regen is already onmain, any release cut frommain(including the pending release-please 0.7.2, #90) would publish it. Reverting removes it from the release line cleanly, without rewriting history.Redoing the regen
The regen commit
5b6323astays reachable in history (and on the #89 branch), and the next regen branchgh/sdk-gen-2026-08-11(#92) is stacked on this revert. Caveat: re-landing is a fresh 4.16.0 regen, not a replay of #89's hand-patches — see "Forfeited by this revert" below.Also reverted (not spec features)
Beyond the five spec features, this 184-file revert also rolls back:
.fern/metadata.json):cliVersion5.89.0 → 5.44.6,generatorVersion4.16.0 → 4.10.1,runtime-versiondropped. This is what makes most of the rest follow.ClientOptions.java.fernignorefreeze block + its release-pleasegenericextra-file entry (both dropped by feat(regen): add diarize_info, Flux force-end-turn, update-listen, word speaker confidence #89) — this is what keepsX-Fern-SDK-Versionrelease-please-bumpable (no wire-version drift).ListenV2ForceEndTurnhashCode()entry from.fernignoreandAGENTS.md.README.md: removes the 4.16.0 retry-knob docs (retry-behavior prose that remains accurate has been restored — see the diff).Forfeited by this revert (tracked in #93)
The revert also drops patches #89 carried that are not preserved on
gh/sdk-gen-2026-08-11and not among #92's 17 reconciled patches (verified: all three unions readdefaultImpl = _UnknownValue.classon #92, both tests absent):defaultImpl = V2Value) onAgentV1UpdateListenListenProvider,AgentV1SettingsAgentListenProvider,AgentV1SettingsAgentContextListenProvider. The two Settings unions carry this bug in released 0.7.1 (pre-existing, not a regression), so the revert restores released behavior — it forfeits an unreleased fix.AgentV1UpdateListenListen.getProvider()additive return-type shim.AgentV1UpdateListenShimTest.java,AgentSettingsProviderDefaultTest.java.Whether to re-apply the
defaultImplfix on #92 is a deliberate decision tracked in #93.Verification
./gradlew compileJava compileExamples unitTest— build successful, all unit tests pass.git diff 5b6323a^ HEADover the pre-README-fix tree is empty (byte-identical to the 0.7.1 release commit8b3c605). Restores pre-regen.fern/metadata.json(sdkVersion 0.7.1, generator 4.10.1), the.fernignorefreeze blocks, and therelease-please-config.jsonClientOptions.javageneric entry.additionalProperties), forward-compat no-op, and fields-lesshashCode()patches from 0.7.1 all survive.