From 0cb01d60278cb370e56ee619aeea9320cac96770 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 6 Sep 2025 09:06:43 -0700 Subject: [PATCH] Fix: Include model name in Azure base_model error (#14294) Co-authored-by: Cursor Agent Co-authored-by: ishaan --- litellm/router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/router.py b/litellm/router.py index 5eea60e4b3d..6255c2fdf92 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -5465,7 +5465,7 @@ class Router: ## SET MODEL TO 'model=' - if base_model is None + not azure if custom_llm_provider == "azure" and base_model is None: verbose_router_logger.error( - "Could not identify azure model. Set azure 'base_model' for accurate max tokens, cost tracking, etc.- https://docs.litellm.ai/docs/proxy/cost_tracking#spend-tracking-for-azure-openai-models" + f"Could not identify azure model '{_model}'. Set azure 'base_model' for accurate max tokens, cost tracking, etc.- https://docs.litellm.ai/docs/proxy/cost_tracking#spend-tracking-for-azure-openai-models" ) elif custom_llm_provider != "azure": model = _model