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]

chore: merge litellm_cost_shard_passthrough into litellm_cost_shard_pricing_dimensions

kerry-berri5b51be83b878
diff --cc tests/integration/contracts.json
index 15ddaf14fd4,d51a93785ef..5904076cfbe
--- a/tests/integration/contracts.json
+++ b/tests/integration/contracts.json
@@@ -1450,50 -1465,26 +1465,71 @@@
"tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[anthropic.claude-sonnet-5-v1:0-passthrough-converse_stream]": [
"quota_management.spend_tracking.scripted_wire.logs_cost"
],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[dashscope-qwen4-max-tiered_input]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[dashscope-qwen4-max-tiered_boundary_stays_lower_tier]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[dashscope-qwen4-max-tiered_second_tier]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[dashscope-qwen4-max-tiered_above_top_range]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-lite-input_below_128k]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[gemini-gemini-3.8-flash-lite-input_above_128k]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[claude-sonnet-5-cache_creation_1h_above_200k]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[openrouter-anthropic-claude-sonnet-5-provider_reported_cost]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[openrouter-anthropic-claude-sonnet-5-token_priced]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[perplexity-sonar-next-no_search]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[deepseek-deepseek-v4-chat-prompt_cache_hit]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[deepseek-deepseek-v4-chat-no_cache_fields_bills_zero_cache]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[xai-grok-5-reasoning_folded_into_completion]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[xai-grok-5-live_search]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
+ ],
+ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[xai-grok-5-provider_reported_cost]": [
+ "quota_management.spend_tracking.cost_matrix.logs_cost"
++ ],
+ "tests/integration/mcp/test_mcp_lifecycle.py::test_health_intersects_route_restricted_key_grants_in_both_management_modes": [
+ "other.mcp.health.restricted_keys_intersect_grants_in_both_modes"
+ ],
+ "tests/integration/mcp/test_mcp_lifecycle.py::test_warm_credential_removal_rejects_without_upstream_traffic": [
+ "other.mcp.credentials.warm_removal_fails_closed_without_upstream_traffic"
+ ],
+ "tests/integration/observability/test_guardrail_effects.py::test_request_selected_mcp_guardrail_blocks_direct_and_virtual_calls": [
+ "other.mcp.guardrails.request_selection_blocks_resolved_tool_without_execution"
+ ],
+ "tests/integration/mcp/test_oauth_configuration.py::test_same_url_oauth_credentials_and_revocation_are_isolated_by_user_and_server[revoke]": [
+ "other.mcp.oauth.same_url_credentials_are_isolated_by_user_and_server"
+ ],
+ "tests/integration/mcp/test_oauth_configuration.py::test_same_url_oauth_credentials_and_revocation_are_isolated_by_user_and_server[expire]": [
+ "other.mcp.oauth.same_url_credentials_are_isolated_by_user_and_server"
+ ],
+ "tests/integration/mcp/test_mcp_lifecycle.py::test_same_url_server_grants_scope_discovery_and_direct_or_virtual_execution[anonymous]": [
+ "other.mcp.permissions.same_url_servers_enforce_discovery_and_execution"
+ ],
+ "tests/integration/mcp/test_mcp_lifecycle.py::test_same_url_server_grants_scope_discovery_and_direct_or_virtual_execution[bearer]": [
+ "other.mcp.permissions.same_url_servers_enforce_discovery_and_execution"
]
},
"browser": {