Skip to content

feat(regen): listen v2 force-end-turn and redaction, listen v1 diarize metadata - #750

Merged
GregHolmes merged 7 commits into
mainfrom
gh/sdk-gen-2026-07-31
Jul 31, 2026
Merged

feat(regen): listen v2 force-end-turn and redaction, listen v1 diarize metadata#750
GregHolmes merged 7 commits into
mainfrom
gh/sdk-gen-2026-07-31

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fern SDK regeneration for 2026-07-31.

Status: reconciled & verified — pytest 337 passed / 1 skipped · ruff check src/deepgram clean · mypy clean (879 files). No breaking changes — the public export surface has zero removals vs 7.6.0 (net +25 names).

New in this regen

  • Listen V2 force-end-turnsend_force_end_turn() + ListenV2ForceEndTurn, plus properly-typed send_configure(ListenV2Configure) and a ListenV2ConfigureSuccess response.
  • Listen V2 redactionListenV2Redact.
  • Listen V1 diarize metadataListenV1ResponseMetadataDiarizeInfo / ListenV1ResultsMetadataDiarizeInfo (+Arch).
  • Agent update-listen provider versioningAgentV1UpdateListenListenProvider (_V1/_V2, discriminated on version); new ConversationHistoryMessageRole / FunctionCallHistoryMessageFunctionCallsItem.
  • Client stream-reconnection configstream_reconnection_enabled / max_stream_reconnection_attempts on the client wrapper.
  • Dynamic wire version — the SDK version reported in User-Agent / X-Fern-SDK-Version is now read from installed package metadata (importlib.metadata) instead of a hard-coded literal.

Backward compatibility (all preserved — non-breaking)

  • Type renames aliased (old import paths kept): AnthropicThinkProviderModelAnthropicModel, GoogleThinkProviderModelGoogleModel, GroqThinkProviderReasoningModeGroqReasoningMode, CartesiaSpeakProviderModelIdCartesiaModelId, CartesiaSpeakProviderVoiceCartesiaVoice, DeepgramSpeakProviderModelDeepgramModel.
  • Transitional agent-history names shimmed — the 6 names the generator removed (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_configure still accepts a raw dict (sent verbatim) alongside the typed model.
  • AgentV1UpdateListen still accepts a legacy DeepgramListenProviderV1/V2 — coerced into the new versioned provider union via a model_validator.
  • Existing send_keep_alive() / send_close() etc. no-arg control-message calls, callable AgentV1SettingsAgent(...), legacy messages= / .messages, and language_hint= continue to work.

Maintenance

Patches re-applied (generator still needs them): WS broad except, optional control-message params, agent _sanitize_numeric_types, query_encoder bool coercion, Agent Settings back-compat, language_hintlanguage_hints validators, 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-version annotation hack. Also removed the now-dead client_wrapper.py generic entry from release-please-config.json.
  • agent_v1latency_report.py (types + requests) — spec re-added stt_latency natively.
  • listen/v2 send_configure typed model + ListenV2ConfigureSuccess response Union now come from the generator.

Repointed shims: the single-Context ...ContentRole / ...FunctionCallsFunctionCallsItem shims whose underlying generated modules were removed now re-export the new canonical types.

fern-api Bot and others added 3 commits July 31, 2026 09:55
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.
@GregHolmes GregHolmes changed the title chore: SDK regeneration 2026-07-31 feat(regen): listen v2 force-end-turn and redaction, listen v1 diarize metadata Jul 31, 2026
…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.

@dg-coreylweathers dg-coreylweathers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@GregHolmes
GregHolmes merged commit 4678f0e into main Jul 31, 2026
10 checks passed
@GregHolmes
GregHolmes deleted the gh/sdk-gen-2026-07-31 branch July 31, 2026 15:05
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