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: drop price-pinning tests that break on catalog updates
kerrycab6732928b3
diff --git a/tests/test_litellm/llms/azure_ai/test_azure_ai_fw_models_metadata.py b/tests/test_litellm/llms/azure_ai/test_azure_ai_fw_models_metadata.pyindex 1b2ca298694..c8365e7b7c0 100644--- a/tests/test_litellm/llms/azure_ai/test_azure_ai_fw_models_metadata.py+++ b/tests/test_litellm/llms/azure_ai/test_azure_ai_fw_models_metadata.py@@ -38,37 +38,6 @@ def use_local_model_cost_map():monkeypatch.undo()- "model_name,expected_prompt,expected_completion",- [- ("FW-Kimi-K2.6", 1.045, 4.4),- ("FW-DeepSeek-V4-Pro", 1.925, 3.828),- ("FW-GLM-5.2", 1.54, 4.84),- ("FW-Kimi-K3", 3.3, 16.5),- ("FW-MiniMax-M2.5", 0.33, 1.32),- ("FW-Inkling", 1.0, 4.05),- ("FW-Nemotron-3-Ultra-NVFP4", 0.6, 2.4),- ("FW-Nemotron-Lightning-3.5-30B-A3B", 0.06, 0.22),- ],-)-def test_azure_ai_fw_cost_per_token(- use_local_model_cost_map, model_name, expected_prompt, expected_completion-):- from litellm.llms.azure_ai.cost_calculator import cost_per_token- from litellm.types.utils import Usage-- usage = Usage(- prompt_tokens=1_000_000,- completion_tokens=1_000_000,- total_tokens=2_000_000,- )-- prompt_cost, completion_cost = cost_per_token(model=model_name, usage=usage)-- assert prompt_cost == pytest.approx(expected_prompt)- assert completion_cost == pytest.approx(expected_completion)--def test_azure_ai_fw_nemotron_lightning_supports_tool_choice(use_local_model_cost_map):from litellm.llms.azure_ai.chat.transformation import AzureAIStudioConfigdiff --git a/tests/test_litellm/proxy/spend_tracking/test_savings.py b/tests/test_litellm/proxy/spend_tracking/test_savings.pyindex f90d5daf768..615938f2e33 100644--- a/tests/test_litellm/proxy/spend_tracking/test_savings.py+++ b/tests/test_litellm/proxy/spend_tracking/test_savings.py@@ -356,29 +356,6 @@ def test_openai_style_cache_write_tokens_are_netted_out():)-def test_sub_input_cache_write_price_is_an_extra_saving():- """A few models price writes below input; there the premium is a real credit.-- Clamping the premium at zero would silently undercount these, so the subtraction- stays signed. ``azure/eu/gpt-4o-2024-11-20`` ships a write price at ~0.5x input.- """- model = "azure/eu/gpt-4o-2024-11-20"- info = litellm.get_model_info(model=model)- input_cost = info["input_cost_per_token"]- cheap_write = info["cache_creation_input_token_cost"]- assert 0 < cheap_write < input_cost, "fixture drifted: this test needs a model pricing cache writes below input"-- result = compute_savings_spend(- model=model,- custom_llm_provider=None,- compression_saved_tokens=0,- gateway_injected_cache=True,- usage_object=_caching_usage(read=1000, written=4000),- )- assert result.prompt_caching == pytest.approx(4000 * (input_cost - cheap_write))- assert result.prompt_caching > 0--def test_negative_cache_write_count_clamps_to_zero():"""A malformed negative write count must not be read as a saving."""input_cost, cache_read_cost = _anthropic_costs("claude-sonnet-5")