From 2e21f1d07a712bd5260eb5f21c3c1c128fe3d519 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 13 Aug 2025 16:27:13 -0700 Subject: [PATCH] fix(router.py): fix test --- litellm/router.py | 5 +++++ 1 file changed, 5 insertions(+) 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: