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
/utils/token_counter: get model_info from deployment directly (#10047)
ChaoFu Yangc07eea864ee1
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex 2062173f505..d28633ccbed 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -5290,10 +5290,7 @@ async def token_counter(request: TokenCountRequest):for _model in llm_router.model_list:if _model["model_name"] == request.model:deployment = _model- model_info = llm_router.get_router_model_info(- deployment=deployment,- received_model_name=request.model,- )+ model_info = deployment.get("model_info", {})breakif deployment is not None:litellm_model_name = deployment.get("litellm_params", {}).get("model")