Skip to content

fix(anthropic): preserve sibling keys beside function_response result - #7074

Open
FOWEPJF255 wants to merge 1 commit into
google:mainfrom
FOWEPJF255:fix/anthropic-result-sibling-keys-7073
Open

fix(anthropic): preserve sibling keys beside function_response result#7074
FOWEPJF255 wants to merge 1 commit into
google:mainfrom
FOWEPJF255:fix/anthropic-result-sibling-keys-7073

Conversation

@FOWEPJF255

Copy link
Copy Markdown

Summary

Test plan

  • PYTHONPATH=src pytest tests/unittests/models/test_anthropic_llm.py -k "sibling_keys or traditional_result or dict_result or with_content"

Fixes #7073

When a tool response dict has result plus other keys, serialize the
full dict for Claude tool_result content (parity with Gemini). Keep
single-key {result: x} unwrapping. Fixes google#7073.
@google-cla

google-cla Bot commented Sep 9, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

Anthropic/Claude: tool result dict with a result key drops every sibling key (only json.dumps(result) reaches the model)

2 participants