mirror of
https://github.com/jwadow/kiro-gateway.git
synced 2026-04-25 01:15:57 +03:00
[PR #57] [MERGED] Fix Anthropic tool results containing images not being passed to the model #70
Labels
No labels
bug
bug
enhancement
enhancement
fixed
fixed
invalid
needs-info
needs-testing
pull-request
question
upstream
wontfix
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/kiro-gateway-jwadow#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jwadow/kiro-gateway/pull/57
Author: @Ry-DS
Created: 1/27/2026
Status: ✅ Merged
Merged: 2/2/2026
Merged by: @jwadow
Base:
main← Head:fix/images-in-tool-results📝 Commits (3)
372dec8fix(anthropic): extract images from tool_result content blocks6340804fix(openai): extract images from tool messages for MCP screenshot support970fee2Revert "fix(openai): extract images from tool messages for MCP screenshot support"📊 Changes
3 files changed (+950 additions, -442 deletions)
View changed files
📝
kiro/converters_anthropic.py(+142 -84)📝
kiro/models_anthropic.py(+73 -30)📝
tests/unit/test_converters_anthropic.py(+735 -328)📄 Description
I use browsermcp with claude code. This MCP server returns images which break CC and the API since it passes the raw base64 content as text to the model when it should be treated as images.
See the fail log:
This PR fixes that, recognising images inside the tool result msg.
I also noticed there's no formatter; share the formatter you use on main and I'll run it on this branch
I didn't try too hard to make it work for openai also. Lmk if you'd like me to try figure it out for OpenAI also via opencode + browsermcp.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.