-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Description
When the application is configured to use Azure Managed Identity (MI) for Azure OpenAI
authentication, agents that have only a deployment name set in their Model & Connection
configuration fail to load silently. Instead of reporting an error, the chat falls back to
plain GPT-4.1 with no tools or instructions attached, causing the model to fabricate responses
rather than call real APIs.
Steps to Reproduce
- Configure the application to use Managed Identity for Azure OpenAI (no API key stored in settings)
- Create or edit an agent and set only the deployment name in the Model & Connection step (leave endpoint and key blank)
- Start a chat with that agent
- Observe the agent responds as a generic assistant — tools are not called and instructions are not applied
Expected Behavior
The agent loads successfully using the Managed Identity credential and calls its configured actions/tools.
Actual Behavior
The agent silently fails to load. The SK Loader logs:
[SK Loader] Azure config INVALID for <agent_name>:
- AzureChatCompletion available: True
- endpoint: True
- key: False
- deployment: True
Chat falls back to plain GPT-4.1 with no tools or system instructions.
Root Cause
When an agent has only the deployment name set, resolve_agent_config() hits case 4 of its
decision tree and merges the agent's partial config with global settings. After the merge, key
is None (because MI auth stores no API key). The gate condition in semantic_kernel_loader.py
(~line 768) requires agent_config["key"] to be truthy:
if AzureChatCompletion and agent_config["endpoint"] and agent_config["key"] and agent_config["deployment"]:With key = None, the condition is False and the agent is never constructed.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status