Skip to content

Fix parallel image tool_result handling in Claude mapper#3095

Open
xiaodream551-a11y wants to merge 1 commit into
lbjlaq:mainfrom
xiaodream551-a11y:fix/3094-parallel-tool-result-images
Open

Fix parallel image tool_result handling in Claude mapper#3095
xiaodream551-a11y wants to merge 1 commit into
lbjlaq:mainfrom
xiaodream551-a11y:fix/3094-parallel-tool-result-images

Conversation

@xiaodream551-a11y

Copy link
Copy Markdown

Summary

  • keep all functionResponse parts contiguous at the start of a user tool-result turn
  • append images extracted from tool_result content after the full functionResponse sequence
  • add a regression test for parallel tool results that include images

Fixes

Fixes #3094

Tests

  • cargo test -p antigravity_tools test_parallel_tool_results_with_images_stay_contiguous -- --nocapture
  • cargo test -p antigravity_tools test_complex_tool_result -- --nocapture
  • cargo test -p antigravity_tools test_thinking_mode_auto_disable_on_tool_use_history -- --nocapture
  • git diff --check -- src-tauri/src/proxy/mappers/claude/request.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCode + Opus 4.6 并行图片 tool_result 时返回 400 invalid_request_error

1 participant