litellm/tests/unit/responses
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
..
litellm_completion_transformation fix(responses): answer Codex heartbeats with no call id on Claude instead of a 400 (#55369) 2026-12-02 03:01:40 +00:00
mcp fix(logging): keep tracebacks in one JSON record and log the token count skip at debug (#54603) 2026-11-30 18:19:05 +00:00
__init__.py ci: move provider-independent MCP tests into tests/unit and run mcp-integration from litellm-tests (#42904) 2026-09-24 23:07:48 +00:00
test_additional_tools.py feat(proxy): mixed Codex model picker and LiteLLM routing on native codex routes (#49408) 2026-11-06 11:14:47 -08:00
test_custom_tool_call.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_input_items_query.py fix(proxy): forward limit, order, after, before and include on GET /v1/responses/{id}/input_items (#51259) 2026-11-20 07:54:26 -08:00
test_instructions_length.py fix(responses): send bridged system prompts too long for instructions as input (#52964) 2026-11-20 11:56:47 -08:00
test_metadata_codex_callback.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_no_duplicate_spend_logs.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_null_test_fix.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_responses_api_bridge_flag.py fix(responses): reject an unresolvable previous_response_id on the chat completions bridge (#53766) 2026-11-25 13:32:42 +00:00
test_responses_api_lifecycle.py fix(responses): log the resolved provider on Responses API calls (#52622) 2026-11-18 22:34:16 +00:00
test_responses_api_request_body.py refactor(types): type the kwargs reads in the responses, images, realtime, files, rerank, batches and fine-tuning entrypoints (#54653) 2026-11-26 10:07:19 +00:00
test_responses_prompt_management.py fix(responses): keep every input item in the logged input (#54253) 2026-12-01 00:40:08 +00:00
test_responses_router_cooldown.py fix(openai): relay provider error codes, types, and Responses params from OpenAI-compatible backends (#51809) 2026-11-24 02:23:00 +00:00
test_responses_streaming_iterator.py fix(responses): stop reading a cancelled background response on, and free a drained stream without a cycle collection (#54789) 2026-11-27 04:24:01 +00:00
test_responses_supported_endpoints_passthrough.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_responses_utils.py fix(responses): reject an unresolvable previous_response_id on the chat completions bridge (#53766) 2026-11-25 13:32:42 +00:00
test_responses_websocket_all_providers.py fix(proxy): refuse Responses and realtime socket turns over TPM and count their usage on the legacy limiter (#55315) 2026-12-01 19:07:27 +00:00
test_rust_bridge_websocket.py refactor(rust-bridge): require the native extension (#48852) 2026-10-28 13:16:56 -07:00
test_sse_output_recovery.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_streaming_iterator.py fix(responses): always stream tool argument fields as strings for every Responses provider (#53953) 2026-11-24 03:45:17 +00:00
test_streaming_iterator_error_events.py fix(router): cool down an OpenAI realtime deployment whose key OpenAI rejects (#54660) 2026-11-30 21:08:53 +00:00
test_text_format_conversion.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00