litellm/tests/test_litellm/responses/litellm_completion_transformation
mateo-berri d7ee215c57 fix(responses): keep namespace tools intact when a guardrail returns them unchanged
Any pre_call guardrail on /v1/responses flattened Codex namespace tools
into ns__member functions and wrote the flattened list back to the
request, so the model called mcp__server__tool with no namespace and
Codex rejected the call as unsupported.

The handler now keeps the client's original tools, hands the guardrail a
deep copy of the flattened ones, and rebuilds data["tools"] by matching
the guardrail's output to the originals by type and name. Unchanged
tools go back as the original objects, a dropped or edited namespace
member changes only that member, and tools the guardrail injects are
still appended.

Fixes #39183
2026-09-02 11:32:04 -07:00
..
test_function_call_output_normalization.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_handler.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_image_generation_output.py refactor: drop the unused response argument from the image item extractor 2026-08-22 14:22:08 -07:00
test_litellm_completion_responses.py fix(responses): keep namespace tools intact when a guardrail returns them unchanged 2026-09-02 11:32:04 -07:00
test_reasoning_input_item_preservation.py fix(responses-bridge): fall back to summary text when content carries none 2026-08-22 14:51:38 -07:00
test_session_handler.py fix(logging): redact tool call arguments to valid JSON and preserve null content (#38182) 2026-08-25 16:38:18 -07:00
test_session_handler_with_cold_storage.py test: enforce F811 so a duplicate definition cannot silently replace the first 2026-08-21 12:06:19 -07:00
test_streaming_iterator_transformation.py fix(responses): correlate streamed tool call events on normalized item ids 2026-09-01 12:08:22 -07:00
test_tool_output_order_preserved_for_gemini.py test: cover the reverse bridge on an assistant message that precedes its function_call 2026-08-22 14:53:18 -07:00