litellm/tests/unit/llms/anthropic/chat
ryan-crabbe-berri 4b63c503fc
fix(responses): answer Codex heartbeats with no call id on Claude instead of a 400 (#55369)
* fix(responses): keep a tool output that answers no call as a user turn on the chat bridge

Codex desktop heartbeats arrive as a function_call_output with a null call_id. The
Responses to chat completions bridge dropped them, so a Claude conversation ended on
the assistant reply and the provider refused it as assistant prefill. Any tool output
that answers no call of the assistant turn before it now reaches the model as a user
turn carrying its content, on full-history and stored follow-up requests alike.

* refactor(responses): reuse the bridge's message readers for unpaired tool outputs

* fix(responses): keep a tool reference in an unpaired tool output as text so the user turn passes validation

* fix(guardrails): scan a Responses tool output with no call id, since the bridge now sends it to the model

* test(codex): leave the heartbeat e2e row for a follow-up once the fix lands
2026-12-02 03:01:40 +00:00
..
guardrail_translation fix(anthropic): keep caller tool_use ids unless the upstream rejects them (#54468) 2026-11-26 05:55:01 +00:00
__init__.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
conftest.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_anthropic_chat_handler.py fix(anthropic): keep caller tool_use ids unless the upstream rejects them (#54468) 2026-11-26 05:55:01 +00:00
test_anthropic_chat_transformation.py fix(anthropic): log the advisor blocks drop_params drops, and skip turns with none (#55260) 2026-12-01 01:34:17 +00:00
test_code_interpreter_results_extraction.py feat(anthropic): workload identity federation and pluggable identity sources (#44448) 2026-10-03 17:08:30 -07:00
test_transformation.py fix(responses): answer Codex heartbeats with no call id on Claude instead of a 400 (#55369) 2026-12-02 03:01:40 +00:00