fix(anthropic): preserve sibling keys beside function_response result - #7074
fix(anthropic): preserve sibling keys beside function_response result#7074FOWEPJF255 wants to merge 1 commit into
Conversation
|
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. |
b73e388 to
0957c60
Compare
|
Rebased onto latest
CLA: |
|
Follow-up: the code conflict on |
|
I have signed the Google CLA for this account / commit identity. Please re-check cla/google. |
|
Closing temporarily to refresh cla/google status after signing. |
|
CLA data updated (GitHub username FOWEPJF255 + emails including the commit address). Please re-check |
|
|
|
Temporarily closing to refresh import/copybara after cla/google turned green. |
0957c60 to
b80c292
Compare
|
Rebased onto latest main today ( |
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.
Rebased onto latest main.
4b66efb to
22f996e
Compare
|
CLA tip refreshed to |
Summary
function_responsedict that has a non-nullresultand sibling keys (files,stdout, ...), serialize the full dict instead of onlyresult.{result: x}unwrapping for backward compatibility.resultkey drops every sibling key (onlyjson.dumps(result)reaches the model) #7073.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