Repository navigation
fix(agent): conversation text always carries conversational_behavior - #136
Conversation
dg-coreylweathers
left a comment
There was a problem hiding this comment.
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
- A wire
"conversational_behavior": nullnow NPEs inside the swallowed catch and the frame falls through toonAgentV1Historyinstead ofonConversationText, with noonError. On 0.11.2 it parsed as empty. Restore the null policy on the setter atAgentV1ConversationText.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.
- The AGENTS.md freeze note says the shim "preserves source and binary compatibility". Signatures are unchanged, but
conversationalBehavior(null)now throws NPE (both overloads) andOptional.empty()resolves toDEFAULT. One sentence saying so keeps the note honest.
Nits
ConversationalBehaviorStageis 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..fernignorelistsCLAUDE.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_behaviorso it tells a developer something.
Approving content; I'd hold release PR #135 until deepgram-docs #1283 merges so docs and SDK ship together.
dg-coreylweathers
left a comment
There was a problem hiding this comment.
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.
🤖 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>
Summary
conversational_behaviorwith the source contract: the server always sends it, while the SDK preserves existing fluent builders and Optional APIs by emittingdefaultwhen older callers omit it..bakfiles.Validation
./gradlew spotlessCheck test compileExamplesNo versions were bumped; Release Please owns the next version change.