Skip to content

fix(agent): default Think Live ConversationText behavior - #819

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

GregHolmes merged 8 commits into
mainfrom
gh/sdk-gen-2026-10-27

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Regenerate the SDK from the Think Live schema update that requires conversational_behavior on ConversationText messages.
  • Reapply all 50 existing manual compatibility, security, wire-coverage, and generated-code patches; no patches were made obsolete.
  • Add runtime and typing compatibility for legacy/self-hosted ConversationText payloads and existing typed dictionaries that omit conversational_behavior. Runtime models default the field to default; SDK-created models continue to serialize the current wire-required value.
  • Keep version-bearing files at the current 7.15.0 release; Release Please owns the next version bump.

Validation

  • uv run pytest (1134 passed, 4 skipped)
  • poetry run mypy src/deepgram tests/typecheck
  • poetry run pytest tests/custom/test_agent_think_live.py (19 passed)
  • poetry run ruff check src/deepgram/agent/v1/requests/agent_v1conversation_text.py tests/typecheck/compat_aliases.py

Repository-wide ruff check . still reports 57 pre-existing violations in untouched manual examples and tests/custom/test_transport.py.

@github-actions

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-27 fix(regen): align Think Live ConversationText behavior Oct 27, 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.

Content looks right. Docker gate against the repo WireMock: 1,134 passed, 4 skipped, mypy clean on 948 files, ruff clean on the changed files. Prod probe today shows conversational_behavior on every ConversationText and History frame, Think Live off and on. The default applies on both pydantic majors through the socket client's union parse, and explicit None still validates because the alias type includes Any.

Should-fix

The runtime model docstring at src/deepgram/agent/v1/types/agent_v1conversation_text.py:30 dropped "Always sent; it is default for every message while Think Live is off". The request TypedDict and the Java/JS siblings still say it, so this one now reads as if the field were optional on the wire. Suggested text:

Annotates what kind of utterance the message represents: `default` (a standard turn), `backchannel` (a short acknowledgement while the user held the floor), `presence_check` (a prompt after extended silence), or `filler` (a line covering a wait on a function call or a dynamic InjectAgentMessage). Always sent; it is `default` for every message while Think Live is off. Defaults to `default` when an older or self-hosted server omits it.

Nits

  • poetry.lock bumps pytest-asyncio 1.4.0 → 1.4.1; came in with the Fern regen commit, unrelated.
  • .fern/metadata.json still has originGitCommitIsDirty: true (carried over from main), so the origin commit is a hint rather than a reproducible source.
  • The PR title becomes the 7.16.0 release bullet. Suggest squashing as fix(agent): ConversationText.conversational_behavior defaults to "default" when omitted.

Approving content; I'd hold release PR #818 until deepgram-docs #1283 merges so docs and SDK ship together.

@GregHolmes GregHolmes changed the title fix(regen): align Think Live ConversationText behavior fix(agent): default Think Live ConversationText behavior Oct 27, 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.

Re-reviewed at fd07678. The field docstring carries both sentences again ("Always sent; it is default for every message while Think Live is off. Defaults to default when an older or self-hosted server omits it."), poetry.lock is back to main's, and originGitCommitIsDirty is now false. Docker gate at this head against the repo WireMock: 1,134 passed, 4 skipped, mypy clean on 948 files.

Approving. Hold release PR #818 until deepgram-docs #1283 merges so docs and SDK ship together.

@GregHolmes
GregHolmes merged commit cd8ba29 into main Oct 27, 2026
10 checks passed
@GregHolmes
GregHolmes deleted the gh/sdk-gen-2026-10-27 branch October 27, 2026 14:53
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