mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
Both reasoning_effort mappers ended their if/elif chain in a bare ValueError. exception_type() has no branch for ValueError, so it fell through to the shared APIConnectionError fallback and the proxy answered a malformed client request with a retryable HTTP 500 carrying no hint of the accepted values. Raise UnsupportedParamsError (400) instead, listing the supported set, matching what the Anthropic and Bedrock transforms already do and what this same file already does at its five other param-validation sites. This also covers 'xhigh' and 'max', which are members of litellm's own REASONING_EFFORT literal but have no Gemini mapping, so callers bridging from OpenAI-shaped code were hitting the 500 without typing anything wrong. Fixes #40474 Claude-Session: https://claude.ai/code/session_01XT1qsbjLwnhiN5sQ2hNUxr |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_context_circulation.py | ||
| test_function_call_args_serialization.py | ||
| test_gemini_image_url_missing_field.py | ||
| test_gemini_streaming_tool_call_finish_reason.py | ||
| test_grounding_requests.py | ||
| test_thought_signature_in_tool_call_id.py | ||
| test_tool_call_followed_by_text_assistant.py | ||
| test_transformation.py | ||
| test_vertex_ai_gemini_transformation.py | ||
| test_vertex_and_google_ai_studio_gemini.py | ||
| test_vertex_gemini_unbound_local_error.py | ||