litellm/tests/unit/responses
ryan-crabbe-berri 6bc95ab3f1
fix(responses): one answer for which tool a bridged call is, read by the reply, tool permission and spend logs (#53269)
* fix(responses): one shared lookup for bridged tool names, read on resumed turns and by tool permission

The Responses-to-chat bridge sends a long namespace tool under a shortened name. The lookup from
that name back to the caller's namespace and tool now also learns names from earlier namespaced
calls in the history, so a resumed Codex session whose MCP tools are not listed yet gets the real
tool back instead of an unknown call. The bridge records that one lookup on the request's logging
object, and the tool permission guardrail reads the same record, so a rule written against the full
name also applies to the shortened name the provider was sent. A client cannot set the record from
its own request body.

* fix(responses): judge a bridged tool call as the tool the caller gets back

The tool permission guardrail read a filtered copy of the bridge's name lookup, so a namespace tool that
was not shortened, or a custom tool sharing a shortened name from history, was judged under a different
name than the one the caller received. The lookup now leaves out custom tool names, the bridge records all
of it, and only logs keep renaming just the shortened names.

* fix(responses): one tagged tool answer for the reply, tool permission and spend logs

A deferred top-level tool was recorded as if it were a member of a namespace with its own name, so tool
permission judged it as name__name and a namespace allow rule could let it through. Each bridged name now
maps to either a namespace member or a deferred top-level tool, and the reply, tool permission and spend
logs all read that same answer without filtering it.
2026-11-24 22:26:42 +00:00
..
litellm_completion_transformation fix(responses): one answer for which tool a bridged call is, read by the reply, tool permission and spend logs (#53269) 2026-11-24 22:26:42 +00:00
mcp feat(responses): store each bridged turn's path to the root so a fork replays only its ancestors (#49519) 2026-11-23 12:43:11 -08: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(llms): treat chat-latest and gpt-chat-latest as gpt-5 family models (#51151) 2026-11-24 04:02:51 -08: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 fix(router): count a Responses WebSocket turn's input against deployment ITPM (#53594) 2026-11-24 04:26:36 -08:00
test_responses_prompt_management.py fix(sdk): decide MCP gateway routing without importing the proxy handler (#45961) 2026-10-20 01:44:54 +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): resume background response streams with stream and starting_after (#48819) 2026-10-29 02:31:22 -07: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(openai): forward Responses background_options (#53991) 2026-11-23 17:56:11 -08:00
test_responses_websocket_all_providers.py fix(guardrails): scan refusal text in output guardrails on chat and responses (#54039) 2026-11-24 05:27:45 -08: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(openai): relay provider error codes, types, and Responses params from OpenAI-compatible backends (#51809) 2026-11-24 02:23:00 +00:00
test_text_format_conversion.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00