feat(regen): listen v2 force-end-turn and redaction, listen v1 diarize metadata - #750
Merged
Conversation
GregHolmes
requested review from
deepgram-kiley and
dg-coreylweathers
as code owners
July 31, 2026 09:13
GregHolmes
force-pushed
the
gh/sdk-gen-2026-07-31
branch
from
July 31, 2026 09:53
a573777 to
057f69a
Compare
Re-applied still-needed patches (broad WS except catch, optional control-message params, agent _sanitize_numeric_types, query_encoder bool coercion, Agent Settings back-compat, language_hint->language_hints validators, __init__ legacy alias re-exports, legacy create-key wire test). Dropped patches the generator now covers: client_wrapper release-please version annotations (generator reads the version dynamically via importlib.metadata) and the AgentV1LatencyReport stt_latency shim (the spec re-added the field natively). Both files unfrozen. Added compat aliases for the provider/model type renames (AnthropicModel, GoogleModel, GroqReasoningMode, CartesiaModelId, CartesiaVoice, DeepgramModel). Preserved back-compat for two generator-introduced breaks: listen/v2 send_configure still accepts a raw dict verbatim, and AgentV1UpdateListen still accepts a legacy DeepgramListenProviderV1/V2 (coerced into the new versioned provider union). Repointed 3 shims whose double-Context targets were removed to the new canonical types; updated the compat test's obsolete double-Context assertions accordingly. Verified: pytest 337 passed, ruff (src) clean, mypy clean.
client_wrapper.py no longer carries x-release-please-version annotations (the generator now derives the wire version dynamically via importlib.metadata), so the generic extra-file entry was a no-op. Remove it.
…aking) Recreate the 6 public names the 2026-07-31 regen removed without a replacement (AgentV1HistoryContentRole, AgentV1HistoryFunctionCallsFunctionCallsItem +Params, and the double-Context ...ContentRole / ...FunctionCallsFunctionCallsItem +Params) as hand-written alias shims re-exporting the new canonical ConversationHistoryMessageRole / FunctionCallHistoryMessageFunctionCallsItem types. Restore the original compat test assertions and freeze the new shims. Public export surface now has zero removals vs 7.6.0 — the regen is fully non-breaking on imports.
…configure in reference.md
dg-coreylweathers
approved these changes
Jul 31, 2026
dg-coreylweathers
left a comment
There was a problem hiding this comment.
Approved. Regen verified: gate reproduced green (337 passed/1 skipped, ruff + mypy clean), zero export removals, all renames aliased, stt_latency restored natively, all manual patches survived. Docs gap resolved in ada1eb3 (reference.md now covers redact/send_force_end_turn/send_configure, redact values live-verified as numbers|aggressive_numbers). Non-blocking follow-ups:
- Test: add an assertion that the AgentV1UpdateListen coercion injects version:"v2" (currently unasserted).
- Parity: confirm the type renames + update-listen legacy coercion are mirrored in the JS/Java siblings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fern SDK regeneration for 2026-07-31.
Status: reconciled & verified —
pytest337 passed / 1 skipped ·ruff check src/deepgramclean ·mypyclean (879 files). No breaking changes — the public export surface has zero removals vs 7.6.0 (net +25 names).New in this regen
send_force_end_turn()+ListenV2ForceEndTurn, plus properly-typedsend_configure(ListenV2Configure)and aListenV2ConfigureSuccessresponse.ListenV2Redact.ListenV1ResponseMetadataDiarizeInfo/ListenV1ResultsMetadataDiarizeInfo(+Arch).AgentV1UpdateListenListenProvider(_V1/_V2, discriminated onversion); newConversationHistoryMessageRole/FunctionCallHistoryMessageFunctionCallsItem.stream_reconnection_enabled/max_stream_reconnection_attemptson the client wrapper.User-Agent/X-Fern-SDK-Versionis now read from installed package metadata (importlib.metadata) instead of a hard-coded literal.Backward compatibility (all preserved — non-breaking)
AnthropicThinkProviderModel→AnthropicModel,GoogleThinkProviderModel→GoogleModel,GroqThinkProviderReasoningMode→GroqReasoningMode,CartesiaSpeakProviderModelId→CartesiaModelId,CartesiaSpeakProviderVoice→CartesiaVoice,DeepgramSpeakProviderModel→DeepgramModel.AgentV1HistoryContentRole,AgentV1HistoryFunctionCallsFunctionCallsItem(+Params), and the double-Context...ContentRole/...FunctionCallsFunctionCallsItem(+Params)) are recreated as hand-written aliases to the new canonical types, so every old import path still resolves.send_configurestill accepts a raw dict (sent verbatim) alongside the typed model.AgentV1UpdateListenstill accepts a legacyDeepgramListenProviderV1/V2— coerced into the new versioned provider union via amodel_validator.send_keep_alive()/send_close()etc. no-arg control-message calls, callableAgentV1SettingsAgent(...), legacymessages=/.messages, andlanguage_hint=continue to work.Maintenance
Patches re-applied (generator still needs them): WS broad
except, optional control-message params, agent_sanitize_numeric_types,query_encoderbool coercion, Agent Settings back-compat,language_hint→language_hintsvalidators, legacy alias re-exports merged into 10__init__.py, legacy create-key wire test.Patches dropped — generator now covers them (files unfrozen):
core/client_wrapper.py— dynamic version (above) replaces the# x-release-please-versionannotation hack. Also removed the now-deadclient_wrapper.pygenericentry fromrelease-please-config.json.agent_v1latency_report.py(types + requests) — spec re-addedstt_latencynatively.send_configuretyped model +ListenV2ConfigureSuccessresponse Union now come from the generator.Repointed shims: the single-
Context...ContentRole/...FunctionCallsFunctionCallsItemshims whose underlying generated modules were removed now re-export the new canonical types.