fix(sub): pass tool_result images to Codex/Kimi/Grok#218
Merged
Conversation
fkiene
enabled auto-merge
July 26, 2026 09:19
fkiene
force-pushed
the
feat/sub-tool-result-images
branch
from
July 26, 2026 09:19
e6d32d2 to
7a6a405
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Base64 images inside Anthropic tool_result content were dropped on the sub backends. Emit Responses input_image parts (Codex/Grok) or chat image_url parts (Kimi); keep pure-text tool results as strings. Signed-off-by: François Kiene <46886660+fkiene@users.noreply.github.com>
fkiene
force-pushed
the
feat/sub-tool-result-images
branch
from
July 26, 2026 09:30
7a6a405 to
3b22ae3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User-message images were translated on the sub path, but images inside Anthropic
tool_resultcontent were dropped ([image omitted]on Codex/Grok; text-only flatten on Kimi). Screenshot-heavy tool results went blind under subscription reroute.Changes
function_call_output.outputas content parts (input_text+input_image); pure text stays a stringcontentparts (text+image_url); pure text stays a stringis_errorprefix preserved; Codexread_rewritenotes still appendTest plan
cargo test -p llmtrim --lib reroute(local)/sub on codexand confirm the model can describe itNotes
Reactive fix only. Grok user-message images remain placeholders (out of scope). Wire shapes follow claude-code-proxy.