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
fix(router): annotate cast for unpriced model info
jesus170581e7101b
diff --git a/litellm/router.py b/litellm/router.pyindex 8a543373692..9ff23c597f1 100644--- a/litellm/router.py+++ b/litellm/router.py@@ -10641,7 +10641,9 @@ class Router:litellm_model_name_model_info.get("key") if litellm_model_name_model_info is not None else None)if cost_map_omits_token_price(model_id, builtin_key, base_model_key):- return cast(ModelInfo, {**model_info, "input_cost_per_token": None, "output_cost_per_token": None})+ return cast( # cast-ok: TypedDict spread with overridden keys loses its type+ ModelInfo, {**model_info, "input_cost_per_token": None, "output_cost_per_token": None}+ )return model_infodef _set_model_group_info(self, model_group: str, user_facing_model_group_name: str) -> ModelGroupInfo | None: