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]

fix(router.py): fix test

Krrish Dholakia2e21f1d07a71
diff --git a/litellm/router.py b/litellm/router.py
index 3fee34fa5c0..7c6ba3650ac 100644
--- a/litellm/router.py
+++ b/litellm/router.py
@@ -5475,6 +5475,11 @@ class Router:
pass
## GET LITELLM MODEL INFO - raises exception, if model is not mapped
+ if model is None:
+ # Handle case where base_model is None (e.g., Azure models without base_model set)
+ # Use the original model from litellm_params
+ model = _model
+
if not model.startswith("{}/".format(custom_llm_provider)):
model_info_name = "{}/{}".format(custom_llm_provider, model)
else: