• Stefy Lanza (nextime / spora )'s avatar
    text: fix streaming tool-call spill; gate native markup unconditionally; v0.1.2 · 41093571
    Stefy Lanza (nextime / spora ) authored
    The streaming content gate only ran when the request carried a tools array. But
    the AISBF relay can drop tools (as it does max_tokens), so a gemma model still
    emitting <|tool_call>call:NAME{…} from its system prompt had that markup streamed
    straight to the client as content — the spill that poisoned history and fed the
    tool-call loop.
    
    _gate_tool_content now:
      * ALWAYS withholds the unambiguous native special-token markers (<|tool_call>,
        <|tool_response>, DeepSeek DSML) and their cross-chunk partials, even with no
        tools declared;
      * gates the ambiguous <tool>…</tool> XML form only when tools are present;
      * gates the gemma-4 call:NAME{…} form by the per-model gemma_tool_parser mode
        (off: never; full: always; restricted: only declared tool names), so legit
        call:foo{…} prose/code is streamed instead of withheld+dropped.
    The gate is now invoked for every stream (not just tools-present), and the final
    flush likewise, with the mode/tool context resolved once per request.
    
    Bump version to 0.1.2.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01RdMufYvtTbtGDWsiZVoXce
    41093571
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...