Skip to content

[Agents Extension] agent init --infra fails on existing azd project without agent service #9124

Description

@trangevi

Running azd ai agent init --infra on an existing azd project should proceed with a normal agent init flow if the existing project doesn't have an agent service in it. Currently, it fails:

qdeepdive-foundryiq) pamelafox@pamelas-mbp iqdeepdive-foundryiq-1 % azd ai agent init --infra

ERROR: no foundry provisioning service found in azure.yaml (looking for host in [azure.ai.project azure.ai.agent microsoft.foundry]); nothing to eject
 
Suggestion: add a service with `host: azure.ai.project` to azure.yaml, or remove --infra to run init normally

However, this means that if a user is trying to get the infra files on an existing project they are unable to do so in a single step

Metadata

Metadata

Assignees

No one assigned

    Labels

    ext-agentsazure.ai.agents extension

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions