Skip to content

feat(regen): add think live and flux tts support - #815

Merged
GregHolmes merged 6 commits into
mainfrom
gh/sdk-gen-2026-10-23-2
Oct 27, 2026
Merged

GregHolmes merged 6 commits into
mainfrom
gh/sdk-gen-2026-10-23-2

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Regenerated the Python SDK from the Think Live and Flux TTS API-spec branch.
  • Adds generated Think Live settings, provider, update control, typed update acknowledgement, dynamic Agent-message injection, frustration events, and ConversationText behavior metadata.
  • Preserves generated Flux TTS language availability updates.
  • Reapplied required transport, compatibility, security, query-encoding, compatibility-export, and wire-coverage patches.
  • Restored coverage artifact ignores and added sync/async Think Live regression plus public type-check coverage.
  • Adds a bounded, text-only Think Live Voice Agent example, indexes it in the examples guide, waits for ThinkLiveUpdated, and ignores filler text when waiting for the requested answer.
  • Removes duplicate legacy barrel blocks and generated whitespace.
  • Preserved Fern-native Listen V1 Configure models, Params, response union, and failure-code exports.
  • Restored version markers to 7.15.0 so Release Please owns the feature-release bump.

Validation

  • Full pytest suite with coverage: 1133 passed, 4 skipped, 94.65% coverage.
  • mypy passed for src and tests/typecheck.
  • Ruff passed for reconciliation changes.
  • Poetry lock validation passed.
  • Production Think Live smoke received SettingsApplied and ThinkLiveUpdated.

Flux control wording remains source-spec owned and will be corrected there.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
src.deepgram 97% 94% 0 ✔
src.deepgram.agent 100% 100% 0 ✔
src.deepgram.agent.v1 98% 100% 0 ✔
src.deepgram.agent.v1.settings 100% 100% 0 ✔
src.deepgram.agent.v1.settings.think 100% 100% 0 ✔
src.deepgram.agent.v1.settings.think.models 97% 100% 0 ✔
src.deepgram.auth 100% 100% 0 ✔
src.deepgram.auth.v1 100% 100% 0 ✔
src.deepgram.auth.v1.tokens 97% 100% 0 ✔
src.deepgram.core 88% 81% 0 ➖
src.deepgram.errors 100% 100% 0 ✔
src.deepgram.helpers 98% 92% 0 ✔
src.deepgram.listen 100% 100% 0 ✔
src.deepgram.listen.v1 98% 93% 0 ✔
src.deepgram.listen.v1.media 97% 100% 0 ✔
src.deepgram.listen.v2 98% 93% 0 ✔
src.deepgram.manage 100% 100% 0 ✔
src.deepgram.manage.v1 100% 100% 0 ✔
src.deepgram.manage.v1.models 96% 100% 0 ✔
src.deepgram.manage.v1.projects 97% 100% 0 ✔
src.deepgram.manage.v1.projects.billing 100% 100% 0 ✔
src.deepgram.manage.v1.projects.billing.balances 96% 100% 0 ✔
src.deepgram.manage.v1.projects.billing.breakdown 97% 100% 0 ✔
src.deepgram.manage.v1.projects.billing.fields 97% 100% 0 ✔
src.deepgram.manage.v1.projects.billing.purchases 97% 100% 0 ✔
src.deepgram.manage.v1.projects.keys 96% 100% 0 ✔
src.deepgram.manage.v1.projects.members 97% 100% 0 ✔
src.deepgram.manage.v1.projects.members.invites 96% 100% 0 ✔
src.deepgram.manage.v1.projects.members.scopes 96% 100% 0 ✔
src.deepgram.manage.v1.projects.models 96% 100% 0 ✔
src.deepgram.manage.v1.projects.usage 98% 100% 0 ✔
src.deepgram.manage.v1.projects.usage.breakdown 97% 100% 0 ✔
src.deepgram.manage.v1.projects.usage.fields 97% 100% 0 ✔
src.deepgram.read 100% 100% 0 ✔
src.deepgram.read.v1 100% 100% 0 ✔
src.deepgram.read.v1.text 98% 100% 0 ✔
src.deepgram.self_hosted 100% 100% 0 ✔
src.deepgram.self_hosted.v1 100% 100% 0 ✔
src.deepgram.self_hosted.v1.distribution_credentials 96% 100% 0 ✔
src.deepgram.speak 100% 100% 0 ✔
src.deepgram.speak.v1 98% 97% 0 ✔
src.deepgram.speak.v1.audio 91% 80% 0 ✔
src.deepgram.speak.v2 98% 93% 0 ✔
src.deepgram.speak.v2.audio 100% 100% 0 ✔
src.deepgram.voice_agent 100% 100% 0 ✔
src.deepgram.voice_agent.configurations 95% 100% 0 ✔
src.deepgram.voice_agent.variables 95% 100% 0 ✔
Summary 95% (6572 / 6889) 91% (1438 / 1574) 0 ✔

Scope: hand-maintained SDK logic. Fern-generated data models (types/, requests/), package __init__.py files, version.py, and the unused core/http_sse/ scaffolding are excluded — see .coveragerc. Unscoped whole-package coverage is ~70%.

@GregHolmes GregHolmes changed the title chore: sdk regeneration 2026-10-23 feat(regen): add think live and flux tts support Oct 23, 2026

@dg-coreylweathers dg-coreylweathers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What this PR does: Regenerates the Python SDK from deepgram-docs #1283 (Think Live) and adds think_live settings, send_update_think_live, send_inject_dynamic_agent_message, and typed ThinkLiveUpdated, FrustrationDetected, and conversational_behavior events, with the agent socket client hand-merged because it is frozen.

Approved. Hold merge until deepgram-docs #1283 merges. The worth-fixing items are in a follow-up comment below.

What I checked:

  • Does it break existing code? No. Every new field is optional, __all__ went from 428 to 432 names with none removed, and the standing manual patches are all present.
  • Does the hand-merged socket reach the wire? Yes. Running examples/33 against production in Docker: SettingsApplied, ThinkLiveUpdated, ConversationText with filler and default, FrustrationDetected. Tests assert the literal UpdateThink_Live and is_dynamic: true payloads.
  • Is Think Live live in production? Yes, under the new names only. Production rejects think_conversational; staging still accepts only the old names, so smokes against staging fail until it catches up.
  • Gate: mypy clean, 1133 tests pass, 95% coverage, in Docker with the WireMock compose.

@dg-coreylweathers

Copy link
Copy Markdown
Contributor

@GregHolmes follow-ups from the review, none blocking:

  • src/deepgram/agent/v1/socket_client.py:231 and :410: the send_raw docstrings restored in 6617b2a were reduced to one line again by the hand-merge. Copy them back from origin/main:src/deepgram/agent/v1/socket_client.py:211-220 and :384-393, and mention them in the AGENTS.md freeze bullet so the next regen keeps them.
  • tests/custom/test_agent_think_live.py:202-224 parse via construct_type directly. Add a fake-socket test on each client that feeds ThinkLiveUpdated, FrustrationDetected, a ConversationText without conversational_behavior, and an unknown {"type":"Future"} frame through start_listening.
  • Spec gap for #1283: production also sends conversational_behavior on History frames, which ConversationHistoryMessage does not model.
  • Nits: the example docstring says "deterministic" (it waits on a live LLM); one print per 960-byte audio chunk; the certifi lock bump is unrelated to the regen.

Server-side observation for the API team: FrustrationDetected fired with escalated: true on a harmless prompt in both smoke runs.

@GregHolmes
GregHolmes merged commit 0a97e3a into main Oct 27, 2026
11 checks passed
@GregHolmes
GregHolmes deleted the gh/sdk-gen-2026-10-23-2 branch October 27, 2026 09:58
GregHolmes added a commit that referenced this pull request Oct 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[7.16.0](v7.15.0...v7.16.0)
(2026-10-27)


### Features

* **Voice Agent Think Live:** Configure `agent.think_live` with the
Deepgram v1 provider; update it during a session with
`connection.send_update_think_live(...)`; and receive `ThinkLiveUpdated`
and `FrustrationDetected` events. Use
`connection.send_inject_dynamic_agent_message(...)` to request a Think
Live-generated filler line. `ConversationText` now reports
`conversational_behavior` (`default`, `backchannel`, `presence_check`,
or `filler`); the service always sends it, while older or self-hosted
payloads default to `default` in the Python model.
([#815](#815))
([0a97e3a](0a97e3a))
* **Flux TTS:** Flux models now support 41 languages and 230 voices.
Continue to pass the model as `flux-{voice}-{language}`; text
normalization is available for English, German, Dutch, French, Hindi,
Italian, Japanese, Portuguese, Russian, and Spanish.
([#815](#815))
([0a97e3a](0a97e3a))

### Bug Fixes

* **Agent:** Document `ConversationText.conversational_behavior` as
always sent, while retaining the `default` fallback for self-hosted and
mocked payload compatibility.
([#819](#819))
([cd8ba29](cd8ba29))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Greg Holmes <greg.holmes@deepgram.com>
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