Skip to content

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]

test_litellm_overhead_non_streaming

Ishaan Jaffere0172b86e2ed
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index e69d850447a..3987fe7e511 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -4739,6 +4739,32 @@
"supports_vision": true,
"tool_use_system_prompt_tokens": 159
},
+ "anthropic/claude-sonnet-4-5": {
+ "cache_creation_input_token_cost": 3.75e-06,
+ "cache_read_input_token_cost": 3e-07,
+ "input_cost_per_token": 3e-06,
+ "litellm_provider": "anthropic",
+ "max_input_tokens": 200000,
+ "max_output_tokens": 64000,
+ "max_tokens": 200000,
+ "mode": "chat",
+ "output_cost_per_token": 1.5e-05,
+ "search_context_cost_per_query": {
+ "search_context_size_high": 0.01,
+ "search_context_size_low": 0.01,
+ "search_context_size_medium": 0.01
+ },
+ "supports_assistant_prefill": true,
+ "supports_computer_use": true,
+ "supports_function_calling": true,
+ "supports_pdf_input": true,
+ "supports_prompt_caching": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_tool_choice": true,
+ "supports_vision": true,
+ "tool_use_system_prompt_tokens": 346
+ },
"claude-sonnet-4-5-20250929": {
"cache_creation_input_token_cost": 3.75e-06,
"cache_read_input_token_cost": 3e-07,
diff --git a/tests/litellm_utils_tests/test_litellm_overhead.py b/tests/litellm_utils_tests/test_litellm_overhead.py
index 6e46e935463..8b83257f9b5 100644
--- a/tests/litellm_utils_tests/test_litellm_overhead.py
+++ b/tests/litellm_utils_tests/test_litellm_overhead.py
@@ -20,7 +20,7 @@ import litellm
"openai/gpt-4o",
"openai/self_hosted",
"bedrock/anthropic.claude-3-5-haiku-20241022-v1:0",
- "vertex_ai/gemini-1.0-pro-vision-001",
+ "vertex_ai/gemini-1.5-flash",
],
)
async def test_litellm_overhead_non_streaming(model):
@@ -37,10 +37,12 @@ async def test_litellm_overhead_non_streaming(model):
#########################################################
# Specific cases for models
#########################################################
- if model == "vertex_ai/gemini-1.0-pro-vision-001" or model == "openai/self_hosted":
- kwargs["api_base"] = "https://exampleopenaiendpoint-production.up.railway.app/"
+ if model == "vertex_ai/gemini-1.5-flash":
+ kwargs["api_base"] = "https://exampleopenaiendpoint-production.up.railway.app/v1/projects/pathrise-convert-1606954137718/locations/us-central1/publishers/google/models/gemini-1.0-pro-vision-001"
# warmup call for auth validation on vertex_ai models
await litellm.acompletion(**kwargs)
+ if model == "openai/self_hosted":
+ kwargs["api_base"] = "https://exampleopenaiendpoint-production.up.railway.app/"
response = await litellm.acompletion(