You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
A tool result's text reaches the model whole. When a tool result held several text blocks and no image, the Anthropic, OpenAI-compatible, Responses (OpenAI and Azure), Gemini and Vertex providers sent only the first block and dropped the rest (Gemini and Vertex did so with images too). An MCP tool that answers in several blocks was seen as its first line only: ESLint's MCP server (@eslint/mcp) answers lint-files with an intro line, the findings and a closing note, so the model saw "Here are the results of running ESLint …" and reported the files clean (found by yobuild, through DeepSeek). Every text block is now sent, in order, joined with a newline (provider::tool_result_text, crate-private; empty blocks left out, so an empty first block no longer hides the text after it); results with images keep their array form on Anthropic, OpenAI-compatible and Responses, and their inlineData parts on Gemini and Vertex. Bedrock already sent every block (now pinned by a test). A single-block result is sent byte for byte as before; a resumed session whose history holds multi-block results rewrites its prompt cache once. The GASP recorder's tool output summary reads every block too (an empty result records (no output)). Each block is still truncated on its own (max_lines per block), so a tool that answers in many blocks can now put more into context than one block could.