The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Merge branch 'main' into litellm_fix_azure_o_series
Ishaan Jaffacf920a41af9
diff --cc tests/llm_translation/test_optional_params.pyindex 2f1372e9b7a,45dc3d8f6f0..5e792d46e9f--- a/tests/llm_translation/test_optional_params.py+++ b/tests/llm_translation/test_optional_params.py@@@ -1404,11 -1380,19 +1404,30 @@@ def test_azure_modalities_param()assert optional_params["modalities"] == ["text", "audio"]assert optional_params["audio"] == {"type": "audio_input", "input": "test.wav"}++++def test_azure_response_format_param():+ optional_params = litellm.get_optional_params(+ model="azure/o_series/test-o3-mini",+ custom_llm_provider="azure/o_series",+ tools= [{'type': 'function', 'function': {'name': 'get_current_time', 'description': 'Get the current time in a given location.', 'parameters': {'type': 'object', 'properties': {'location': {'type': 'string', 'description': 'The city name, e.g. San Francisco'}}, 'required': ['location']}}}]+ )- assert optional_params["tools"] == [{'type': 'function', 'function': {'name': 'get_current_time', 'description': 'Get the current time in a given location.', 'parameters': {'type': 'object', 'properties': {'location': {'type': 'string', 'description': 'The city name, e.g. San Francisco'}}, 'required': ['location']}}}]+++++ @pytest.mark.parametrize(+ "model, provider",+ [+ ("claude-3-7-sonnet-20240620-v1:0", "anthropic"),+ ("anthropic.claude-3-7-sonnet-20250219-v1:0", "bedrock"),+ ("invoke/anthropic.claude-3-7-sonnet-20240620-v1:0", "bedrock"),+ ("claude-3-7-sonnet@20250219", "vertex_ai"),+ ],+ )+ def test_anthropic_unified_reasoning_content(model, provider):+ optional_params = get_optional_params(+ model=model,+ custom_llm_provider=provider,+ reasoning_effort="high",+ )+ assert optional_params["thinking"] == {"type": "enabled", "budget_tokens": 4096}++