Skip to content

fix(agent): conversation text always carries conversational_behavior - #136

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
Collaborator

Summary

  • Regenerated the Java SDK from the current Voice Agent Think Live API-reference branch.
  • Aligns conversational_behavior with the source contract: the server always sends it, while the SDK preserves existing fluent builders and Optional APIs by emitting default when older callers omit it.
  • Reapplies all manual compatibility, WebSocket, hashCode, union-default, and model-catalog patches; Fern does not yet cover them.
  • Preserves conditional Agent unknown-frame compatibility and all existing Think Live controls/events.
  • Deletes all transient .bak files.

Validation

  • ./gradlew spotlessCheck test compileExamples

No versions were bumped; Release Please owns the next version change.

@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 and the Docker gate passes (spotlessCheck compileJava compileExamples unitTest, 2m52s). Prod probe today shows conversational_behavior on every ConversationText and History frame, Think Live off and on, so required is correct.

Should-fix

  1. A wire "conversational_behavior": null now NPEs inside the swallowed catch and the frame falls through to onAgentV1History instead of onConversationText, with no onError. On 0.11.2 it parsed as empty. Restore the null policy on the setter at AgentV1ConversationText.java:244:
@JsonSetter(value = "conversational_behavior", nulls = Nulls.SKIP)

and add a wire test next to dispatchesConversationTextWithoutBehaviorAsDefault that sends null and asserts DEFAULT. Prod never sends null today, so this is latent, but it is a wrong-handler delivery.

  1. The AGENTS.md freeze note says the shim "preserves source and binary compatibility". Signatures are unchanged, but conversationalBehavior(null) now throws NPE (both overloads) and Optional.empty() resolves to DEFAULT. One sentence saying so keeps the note honest.

Nits

  • ConversationalBehaviorStage is public and implemented by the Builder but no stage ever returns it. Dead API that a future regen could silently drop; either leave it out of the hand patch or note it as intentionally dead.
  • .fernignore lists CLAUDE.md, which does not exist in the tree (pre-existing, not from this PR).
  • The PR title becomes the 0.11.3 release bullet. Suggest squashing as fix(agent): ConversationText always carries conversational_behavior so it tells a developer something.

Approving content; I'd hold release PR #135 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
@GregHolmes GregHolmes changed the title fix(agent): default Think Live ConversationText behavior fix(agent): ConversationText always carries conversational_behavior Oct 27, 2026
@GregHolmes GregHolmes changed the title fix(agent): ConversationText always carries conversational_behavior fix(agent): conversation text always carries conversational_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 5fdeba7. The null case is handled (nulls = Nulls.SKIP on the setter) and the new MockWebServer wire test proves a null on the wire reaches onConversationText as DEFAULT. The retained ConversationalBehaviorStage is now documented. Docker gate at this head: spotlessCheck compileJava compileExamples unitTest, BUILD SUCCESSFUL in 2m49s.

One wording nit left in AGENTS.md: the note still says the shim "preserves source and binary compatibility" but conversationalBehavior(null) (either overload) now throws NullPointerException. One sentence saying so is enough; not holding on it.

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

@GregHolmes
GregHolmes merged commit 359681d into main Oct 27, 2026
8 of 9 checks passed
GregHolmes added a commit that referenced this pull request Oct 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.11.3](v0.11.2...v0.11.3)
(2026-10-27)


### Features

* **Voice Agent Think Live:** Configure `agent.think_live` with the
Deepgram v1 provider; update it during a session with
`sendUpdateThinkLive(...)`; and receive `onThinkLiveUpdated(...)` /
`onFrustrationDetected(...)` events. Use
`sendInjectDynamicAgentMessage(...)` 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 the Java getter remains Optional for
compatibility with self-hosted and mocked payloads.
([#134](#134))
([a2ec8a4](a2ec8a4))
* **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.
([#134](#134))
([a2ec8a4](a2ec8a4))


### Bug Fixes

* **Agent:** Document `ConversationText.conversational_behavior` as
always sent, while retaining the Optional Java getter and builder APIs
for self-hosted and mocked payload compatibility.
([#136](#136))
([359681d](359681d))

---
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