Repository navigation
fix: clarify ForceEndTurn deployment behavior - #788
GregHolmes wants to merge 4 commits into
Conversation
|
dg-coreylweathers
left a comment
There was a problem hiding this comment.
What this PR does
Changes the ForceEndTurn examples and the conversational-STT skill file to say the control is available on Deepgram-hosted deployments including EU and AU (self-hosted depends on the release), makes the Voice Agent example fail fast on FORCE_END_TURN_UNSUPPORTED, and edits the manual-patch ledger.
What I checked
- Is the availability claim true? Yes: the repo's own
tests/manual/listen/v2/force_end_turn/main.pypassed all four steps withtrigger: manualagainstapi.deepgram.com,api.eu.deepgram.com, andapi.au.deepgram.com. - Is
FORCE_END_TURN_UNSUPPORTEDreal? Yes, it is the Voice Agent warning for a non-Flux listen provider (deepgram-docsschemas.agent.v1.yml:220), and both Warning and Error carry.code/.description. - Gates in Docker: mypy clean, ruff clean on changed files, pytest 1034 passed.
Blocking
- The
AGENTS.md/.fernignorehunk forlisten_v2eot_threshold.pyandrequests/deepgram_listen_provider_v2.pyis stale: main'sAGENTS.md:85already says Fern emits that description natively as of the 2026-09-23 regen and the files were unfrozen, so main's.fernignoreno longer lists them. The branch is also CONFLICTING. Fix: rebase onto main and drop that hunk entirely; keep only the StrictInt unfreeze-condition change.
Should-fix
- "Self-hosted availability depends on the deployed release" (
examples/16:24-25,SKILL.md:94) omits the switch. deepgram-docs says it needslisten_v2_force_end_turn = trueunder[features]on the 2026-09-15 release or later. Say that. tests/manual/listen/v2/force_end_turn/main.py:24-27,174andasync.py:8,115still say "gated per deployment" / "not enabled on this deployment"; align them with the new sentence.
Nit: examples/32:94-104, the trailing rejected-check can raise after agent_finished is set; fine if intended, worth a comment.
a46bb3b to
3836a89
Compare
dg-coreylweathers
left a comment
There was a problem hiding this comment.
Requesting changes for two should-fixes and three small cleanups. Everything the PR claims checked out live; these are about the text and the example around it.
What this PR does: ForceEndTurn is a message that lets an app end a speaker's turn right away instead of waiting for Flux to detect it. The examples and manual tests used to call it "gated per deployment." They now say it works on Deepgram-hosted US, EU and AU, and that self-hosted customers need the 2026-09-15 release plus listen_v2 = true and listen_v2_force_end_turn = true under [features]. The Voice Agent example now stops at once on FORCE_END_TURN_UNSUPPORTED instead of timing out after 15 seconds.
What I checked:
- Hosted availability: I ran
tests/manual/listen/v2/force_end_turn/async.pytoday against api.deepgram.com, api.eu.deepgram.com and api.au.deepgram.com. All three returnedEndOfTurnwithtrigger="manual". - Self-hosted claim:
release-260915shipped on 2026-09-15 with Flux Forced End-of-Turn. The flag names match what the self-hosted team gave on 9/4. - Voice Agent example: it completes against prod with Flux. With a Nova-3 listener it raises
FORCE_END_TURN_UNSUPPORTEDafter 2 seconds. - Tests and lint: the new test passes, ruff is clean, and CI is green on 3.10–3.13.
Please fix:
reference.md:5417still says "Requires server-side enablement; deployments without the feature reject the message and close the connection," so a hosted developer reads it as "this may not work for me." Replace it with:
- Available on Deepgram-hosted deployments (including EU and AU). Self-hosted deployments need the 2026-09-15 release or later with the ForceEndTurn feature enabled; unsupported deployments reply UNPARSABLE_CLIENT_MESSAGE and close the connection- Delete the "Link the frozen EOT description patch to deepgram-docs #1202" bullet from the PR description. Nothing in the diff makes that change.
examples/16-transcription-force-end-turn.py:59: the docstring still says "Because ForceEndTurn is gated … point it at a deployment that has the feature." Suggested: "Accepts DEEPGRAM_BASE_URL=wss:// so it can target a regional or self-hosted deployment. Defaults to production."examples/32-voice-agent-force-end-turn.py:125: raising inside thewithblock also prints "Connection error: sent 1011 (internal error)" after the real error. Record the failure, leave thewithblock, then raise.examples/32-voice-agent-force-end-turn.py:96-97: the new lines add two mypyattr-definederrors becausemessageis typedobject. Typing the callback parameter astyping.Anyclears them.
Open question (not blocking): the 9/4 thread in #engineering-self-hosted-releases that names the listen_v2_force_end_turn flag also planned to remove it. If a later self-hosted release drops the flag, "2026-09-15 or later with listen_v2_force_end_turn = true" will be wrong for newer releases. Do you know whether that removal has shipped?
Summary
Validation