mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-29 01:03:17 +00:00
* fix(gemini): keep an empty trailing user turn so Gemini doesn't answer a model-turn 400 * fix(anthropic): keep an empty user message on the /v1/messages adapter so Gemini sees the user turn * fix(gemini): add the blank user turn only for Gemini targets and fill an empty last user message with the continue message The Responses bridge and the Anthropic Messages adapter now add back an empty user message only when the target's chat config is Gemini's, the caller's last message was an empty user message, and the converted request does not already end on a user, tool or function message. With ensure_alternating_roles on, an empty last user message is replaced by the continue message, and the continue messages are copied so no request edits the shared default. Ports |
||
|---|---|---|
| .. | ||
| litellm_completion_transformation | ||
| mcp | ||
| __init__.py | ||
| test_additional_tools.py | ||
| test_custom_tool_call.py | ||
| test_input_items_query.py | ||
| test_instructions_length.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 | ||