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> |
||
|---|---|---|
| .. | ||
| chat | ||
| completion | ||
| decisions | ||
| embeddings | ||
| evals | ||
| image_generation | ||
| image_variations | ||
| live | ||
| realtime | ||
| responses | ||
| speech | ||
| transcriptions | ||
| vector_store_files | ||
| vector_stores | ||
| videos | ||
| __init__.py | ||
| test_cost_calculation.py | ||
| test_data_residency.py | ||
| test_gpt_reasoning_transformation.py | ||
| test_is_model_gpt_5_model.py | ||
| test_o_series_transformation.py | ||
| test_openai.py | ||
| test_openai_audio_speech.py | ||
| test_openai_authentication_error.py | ||
| test_openai_common_utils.py | ||
| test_openai_empty_response.py | ||
| test_openai_file_content_streaming.py | ||
| test_openai_image_edit_transformation.py | ||
| test_openai_workload_identity.py | ||
| test_organization_costs.py | ||
| test_use_chat_completions_api_no_leak.py | ||