mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix(responses): keep tool_reference blocks in function call outputs The Responses to Chat bridge turned reference-only tool outputs into a JSON string and dropped references that sat next to text, so Claude never saw tools loaded through defer_loading. The bridge now keeps each valid reference in order. Guardrail text extraction keeps its existing JSON fallback, and malformed or unknown parts fall back as before. Fixes #46681 * fix(responses): keep tool references only on Anthropic routes Keeping tool_reference blocks for every bridge route turned the JSON text that OpenAI and Vertex Gemini received into empty content. The flag now defaults to off and is set from provider_builds_anthropic_request at the request send site and in previous_response_id history replay, so inspection callers and non-Anthropic routes keep their existing serialization. The reference check moves into a small part decoder so the normalizer's complexity is unchanged. * fix(responses): skip tool references when the route does not resolve Checking the route with provider_builds_anthropic_request raised BadRequestError for model aliases with no resolvable provider, such as batch aliases. Both send sites now use the bridge's existing non-raising _resolved_chat_config, so an unresolved alias keeps its existing tool output serialization on the first turn and on previous_response_id replay. --------- Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| litellm_completion_transformation | ||
| mcp | ||
| __init__.py | ||
| test_additional_tools.py | ||
| test_custom_tool_call.py | ||
| test_metadata_codex_callback.py | ||
| test_no_duplicate_spend_logs.py | ||
| test_null_test_fix.py | ||
| test_responses_api_bridge_flag.py | ||
| test_responses_api_lifecycle.py | ||
| test_responses_api_request_body.py | ||
| test_responses_prompt_management.py | ||
| test_responses_router_cooldown.py | ||
| test_responses_streaming_iterator.py | ||
| test_responses_supported_endpoints_passthrough.py | ||
| test_responses_utils.py | ||
| test_responses_websocket_all_providers.py | ||
| test_rust_bridge_websocket.py | ||
| test_sse_output_recovery.py | ||
| test_streaming_iterator.py | ||
| test_streaming_iterator_error_events.py | ||
| test_text_format_conversion.py | ||