mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 22:14:30 +00:00
When a client streams (stream:true) with explicit `tools`, the server routed to the agent stream bridge, which ignored request_body.tools, ran the agent's own tool loop, and word-split filler content into fake token deltas — dropping the caller's tool_calls. This is the streaming analog of #414 (whose non-streaming fix was #454). Now stream+tools bypasses the agent and streams the model's raw function-calling decision via engine.stream_full(), emitting OpenAI-shape tool_calls deltas and a tool_calls finish_reason. Adds tool_calls to DeltaMessage and removes the now-dead _handle_agent_stream. Verified end-to-end on Ollama (qwen3.5:4b) plus a unit regression test. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>