Output from azd version
azd version 1.25.4 (commit 67d976f0dd7a0cad46e6170fc1e4221a43a8a5db) (stable)
ID VERSION STATUS SOURCE
───────────────────────────────────────────────────────────
azure.ai.agents 0.1.38-preview ✓ azd
azure.ai.connections 0.1.1-preview ✓ azd
azure.ai.finetune Not installed - azd
azure.ai.inspector 0.0.1-preview ✓ azd
azure.ai.models Not installed - azd
azure.ai.projects 0.1.0-preview ✓ azd
azure.ai.routines 0.1.0-preview ✓ azd
azure.ai.skills 0.1.1-preview ✓ azd
azure.ai.toolboxes 0.1.0-preview ✓ azd
azure.appservice Not installed - azd
azure.coding-agent Not installed - azd
microsoft.azd.concurx Not installed - azd
microsoft.azd.demo Not installed - azd
microsoft.azd.extensions Not installed - azd
microsoft.foundry 0.1.0-preview ✓ azd
Describe the bug
When agent.yaml's name differs from the services: key in azure.yaml,
azd deploy behaves inconsistently:
- The agent is deployed using the name from
agent.yaml (correct behavior)
- Post-deploy polling uses the
services: key name from azure.yaml (wrong)
As a result, polling fails to find the deployed agent and times out, even though
the agent was successfully created under the agent.yaml name.
The binary contains the string
"agent name in %s (%q) differs from environment (%q)", confirming the mismatch
is detected but never automatically resolved.
To Reproduce
- Create
azure.yaml with a service entry key my-agent-name:
services:
my-agent-name:
project: src/agent
host: azure.ai.agent
language: docker
- Set
name: my-different-agent-name in src/agent/agent.yaml
- Run
azd deploy
- Observe: the agent
my-different-agent-name is created in Foundry, but polling
times out because it looks for my-agent-name (the services: key)
ERROR: failed invoking event handlers for 'postdeploy', failed to fetch agent version for my-agent-name/1: GET https://`cognitive_account_name`.services.ai.azure.com/api/projects/`project_name`/agents/my-agent-name/versions/1
--------------------------------------------------------------------------------
RESPONSE 404: 404 Not Found
ERROR CODE: not_found
--------------------------------------------------------------------------------
{
"error": {
"code": "not_found",
"message": "Agent my-agent-name with version 1 not found [Request ID: xxxxx]",
"type": "error",
"details": [],
"additionalInfo": {
"request_id": "xxxxx"
}
}
}
--------------------------------------------------------------------------------
Expected behavior
Both deployment and post-deploy polling use the name from agent.yaml.
The extension should read name from the agent.yaml in the directory
specified by services.<key>.project and use it consistently for both steps.
Environment
- Language: Python 3.12 / Docker (linux/amd64)
- OS: Linux (devcontainer)
- IDE: VS Code
Additional context
Workaround: keep agent.yaml's name: identical to the services: key in
azure.yaml. This constraint is undocumented and non-obvious.
Output from
azd versionDescribe the bug
When
agent.yaml'snamediffers from theservices:key inazure.yaml,azd deploybehaves inconsistently:agent.yaml(correct behavior)services:key name fromazure.yaml(wrong)As a result, polling fails to find the deployed agent and times out, even though
the agent was successfully created under the
agent.yamlname.The binary contains the string
"agent name in %s (%q) differs from environment (%q)", confirming the mismatchis detected but never automatically resolved.
To Reproduce
azure.yamlwith a service entry keymy-agent-name:name: my-different-agent-nameinsrc/agent/agent.yamlazd deploymy-different-agent-nameis created in Foundry, but pollingtimes out because it looks for
my-agent-name(theservices:key)Expected behavior
Both deployment and post-deploy polling use the
namefromagent.yaml.The extension should read
namefrom theagent.yamlin the directoryspecified by
services.<key>.projectand use it consistently for both steps.Environment
Additional context
Workaround: keep
agent.yaml'sname:identical to theservices:key inazure.yaml. This constraint is undocumented and non-obvious.