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]

Update proxy_server.py (#17468)

razvan_butnaruf6251efab973
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index 66b9efe5325..da09346503d 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -5313,7 +5313,7 @@ async def embeddings( # noqa: PLR0915
# check if provider accept list of tokens as input - e.g. for langchain integration
if llm_router is not None and data.get("model") in router_model_names:
# Use router's O(1) lookup instead of O(N) iteration through llm_model_list
- deployment = llm_router.get_deployment(model_id=data["model"])
+ deployment = llm_router.get_deployment_by_model_group_name(model_group_name=data["model"])
if deployment is not None:
litellm_params = deployment.get("litellm_params", {}) or {}
litellm_model = litellm_params.get("model", "")