Skip to content

fix: stop thought leakage and dropped tools on interrupt - #643

Draft
Nash0x7E2 wants to merge 2 commits into
acceleratefrom
cursor/gemma-k1-restaurant-validation-adbf
Draft

Nash0x7E2 wants to merge 2 commits into
acceleratefrom
cursor/gemma-k1-restaurant-validation-adbf

Conversation

@Nash0x7E2

@Nash0x7E2 Nash0x7E2 commented Sep 9, 2026

Copy link
Copy Markdown
Member

Why

Restaurant bench runs were failing because Gemma spoke thought-channel markup (Thought., Channel thought) and interrupted replies dropped in-flight tool calls.

Changes

  • Strip <|channel>thought, <think>, and a leading leaked thought/Thought. from OpenAI-compat content before it is spoken.
  • Interrupted replies still record tool calls in history. Barge-in executes them; a changed ask injects cancelled tool results.
  • Restaurant prompt: after check_availability / lookup_menu succeed, call create_reservation / create_order in the same turn when name+allergen / items+allergen are known.

Gemma k=1 validation

Run 20260909T014745Z, restaurant pack, Flux STT, gemma/gemma-4-26B-A4B-it.

Pass 3/8. adversarial / coherence / tool_filler pass; entity_dense, golden, interrupt, noise_kitchen, selectivity fail.

V2V P50 1520 ms (n=22). False cutoffs 1.00/call.

Thought-channel leakage: gone from speech (no Thought. / Channel thought in transcripts). One rare router log leftover text=<channel|>.

Log: /tmp/va-bench-gemma-after.log. Writeup: benchmark/out/gemma-k1-after.md.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 9, 2026 01:34
Gemma leaks <|channel>thought, <think>, and a leading Thought. into
content. Strip those before TTS so they are never spoken.

Co-authored-by: Neevash Ramdial (Nash) <mail@neevash.com>
Interrupted replies still record tools in history. Barge-in runs them;
a changed ask injects cancelled results. Restaurant prompt books and
orders in the same turn once the lookup succeeds.

Co-authored-by: Neevash Ramdial (Nash) <mail@neevash.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