-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
Description
What happened?
I keep getting this error intermittently when trying to interact with any Azure OpenAI Endpoint that has thinking built in:
Error fetching response:Error: 400 {'error': '/chat/completions: Invalid model name passed in model=None. Call /v1/models to view available models for your key.'}
This is occuring via curl, in LiteLLM's "Test Key" UI, and in my connected openwebui instance. I've confirmed that my Azure Endpoint, called directly does not show these errors.
I've tested this on the following releases:
Here's a snippet of my config.yaml:
- model_name: gpt-5-nano
litellm_params:
model: azure/gpt-5-nano
api_base: os.environ/AZURE_API_BASE # runs os.getenv("AZURE_API_BASE")
api_key: os.environ/AZURE_API_KEY # runs os.getenv("AZURE_API_KEY")
stream_timeout: 60
merge_reasoning_content_in_choices: true
model_info:
mode: chatRelevant log output
2025-08-13T19:03:39.2243278Z {"message": "litellm.router.Router::deployment_callback_on_success(): Exception occured - 'NoneType' object has no attribute 'startswith'", "level": "ERROR", "timestamp": "2025-08-13T19:03:39.218193", "stacktrace": "Traceback (most recent call last):\n File \"/usr/lib/python3.13/site-packages/litellm/router.py\", line 4338, in deployment_callback_on_success\n deployment_model_info = self.get_router_model_info(\n deployment=deployment_info.model_dump(),\n received_model_name=model_group,\n )\n File \"/usr/lib/python3.13/site-packages/litellm/router.py\", line 5477, in get_router_model_info\n if not model.startswith(\"{}/\".format(custom_llm_provider)):\n ^^^^^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'startswith'"}
2025-08-13T19:04:09.1131065Z {"message": "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", "level": "ERROR", "timestamp": "2025-08-13T19:04:09.112900"}Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.75.5.dev3
Twitter / LinkedIn details
No response
Chang-Man