• Stefy Lanza (nextime / spora )'s avatar
    text: stop streaming tool calls as message content (gemma <|tool_call> leak) · 06d7fbad
    Stefy Lanza (nextime / spora ) authored
    Gemma emits tool calls as text — <|tool_call>call:NAME{…} — which the first-pass
    streaming loop forwarded straight to the client as assistant content. So the call
    showed up as a visible message and only got parsed/executed at end-of-stream.
    
    Add _ToolCallStreamGate: as chunks stream, emit visible content only up to the
    first tool-call marker (gemma's <|tool_call>/<|tool_response> plus the common tag
    formats), holding back a small tail so a marker split across chunk boundaries
    isn't leaked; once a marker appears, emit nothing further. The full text still
    accumulates for the existing end-of-stream tool extraction (GemmaParser), which
    emits a proper tool_calls delta. The second pass is already buffered+extracted, so
    it never leaked.
    
    Also add gemma's "<|tool_call>" to the reasoning/tool split pattern lists.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    06d7fbad
Name
Last commit
Last update
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
build-oci.sh Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...
video_editor.config.json Loading commit data...