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
Add azure_ai cohere rerank v3.5 (#12283)
dcieslak19973d480cea8b0a4
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex b69d9984f62..05f13716736 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -4068,6 +4068,17 @@"source": "https://azure.microsoft.com/en-us/pricing/details/phi-3/","supports_tool_choice": true},+ "azure_ai/cohere-rerank-v3.5": {+ "max_tokens": 4096,+ "max_input_tokens": 4096,+ "max_output_tokens": 4096,+ "max_query_tokens": 2048,+ "input_cost_per_token": 0.0,+ "input_cost_per_query": 0.002,+ "output_cost_per_token": 0.0,+ "litellm_provider": "azure_ai",+ "mode": "rerank"+ },"azure_ai/cohere-rerank-v3-multilingual": {"max_tokens": 4096,"max_input_tokens": 4096,diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex b69d9984f62..05f13716736 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -4068,6 +4068,17 @@"source": "https://azure.microsoft.com/en-us/pricing/details/phi-3/","supports_tool_choice": true},+ "azure_ai/cohere-rerank-v3.5": {+ "max_tokens": 4096,+ "max_input_tokens": 4096,+ "max_output_tokens": 4096,+ "max_query_tokens": 2048,+ "input_cost_per_token": 0.0,+ "input_cost_per_query": 0.002,+ "output_cost_per_token": 0.0,+ "litellm_provider": "azure_ai",+ "mode": "rerank"+ },"azure_ai/cohere-rerank-v3-multilingual": {"max_tokens": 4096,"max_input_tokens": 4096,diff --git a/tests/test_litellm/proxy/client/cli/test_keys_commands.py b/tests/test_litellm/proxy/client/cli/test_keys_commands.pyindex d3e2d4ce7b6..b16af4b5b67 100644--- a/tests/test_litellm/proxy/client/cli/test_keys_commands.py+++ b/tests/test_litellm/proxy/client/cli/test_keys_commands.py@@ -127,7 +127,12 @@ def test_keys_delete_error_handling(mock_keys_client, cli_runner):# Check that the exception is properly propagatedassert result.exception is not None# The ConnectionError should propagate since it's not caught by HTTPError handler- assert "Connection error" in str(result.exception)+ # Handle both mocked and real connection errors+ assert (+ "Connection error" in str(result.exception)+ or "Failed to establish a new connection" in str(result.exception)+ or "Max retries exceeded" in str(result.exception)+ )def test_keys_delete_http_error_handling(mock_keys_client, cli_runner):