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
test_router_fallbacks_with_custom_model_costs
Ishaan Jaffer5812654bddca
diff --git a/tests/local_testing/test_router_fallbacks.py b/tests/local_testing/test_router_fallbacks.pyindex 4ae2ca19d92..3a634f6aa37 100644--- a/tests/local_testing/test_router_fallbacks.py+++ b/tests/local_testing/test_router_fallbacks.py@@ -1358,9 +1358,10 @@ def test_router_fallbacks_with_custom_model_costs():"model_name": "claude-sonnet-4-5-20250929","litellm_params": {"model": "claude-sonnet-4-5-20250929",- "api_key": os.environ["ANTHROPIC_API_KEY"],+ "api_key": os.environ.get("ANTHROPIC_API_KEY", "fake-key"),"input_cost_per_token": 30,"output_cost_per_token": 60,+ "mock_response": "Hello! How can I help you today?",},},{@@ -1371,6 +1372,7 @@ def test_router_fallbacks_with_custom_model_costs():"output_cost_per_token": 0.000015, # 15$/M"api_base": "https://exampleopenaiendpoint-production.up.railway.app","api_key": "my-fake-key",+ "mock_response": "Hello! How can I help you today?",},},]