Skip to content

azd ai agent init - panic when initializing agent #6050

Description

@JeffreyCA

This happens during azd ai agent init -m "<path to cobo-calculator-agent/agent.yaml>" --host containerapp after confirming the model SKU:

Added service 'Cobo Calculator Agent' to azure.yaml
Updating environment variables for agent kind: hosted
Set environment variable: ENABLE_HOSTED_AGENTS=true

Only one model version available: 2024-07-18
? Select model SKU: GlobalProvisionedManaged
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa2aba5]

goroutine 1 [running]:
azureaiagent/internal/pkg/azure/ai.(*ModelCatalogService).GetModelDeployment(0x0?, {0x0?, 0xc00072fb48?}, 0x13b45f8?, 0xc00034d440?)
        /workspaces/azure-dev/cli/azd/extensions/azure.ai.agents/internal/pkg/azure/ai/model_catalog.go:350 +0x4e5
azureaiagent/internal/cmd.(*InitAction).getModelDetails(0xc00072fb48, {0x13b45f8, 0xc00034d440}, {0xc000012310, 0xb}, {0x0, 0x0})
        /workspaces/azure-dev/cli/azd/extensions/azure.ai.agents/internal/cmd/init.go:1499 +0x425
azureaiagent/internal/cmd.(*InitAction).getModelDeploymentDetails(0xc00072fb48, {0x13b45f8, 0xc00034d440}, {{0xc000012310, 0xb}, 0xc00048c5f0, {0x0, 0x0}, 0xc00048c5a0, 0x0, ...})
        /workspaces/azure-dev/cli/azd/extensions/azure.ai.agents/internal/cmd/init.go:1418 +0x7a
azureaiagent/internal/cmd.(*InitAction).updateEnvironment(0xc00072fb48, {0x13b45f8, 0xc00034d440}, 0xc000120690, {0x7ffdfe353b9b, 0xc})
        /workspaces/azure-dev/cli/azd/extensions/azure.ai.agents/internal/cmd/init.go:1340 +0xadc
azureaiagent/internal/cmd.(*InitAction).Run(0xc000707b48, {0x13b45f8, 0xc00034d440}, 0xc000470700)
        /workspaces/azure-dev/cli/azd/extensions/azure.ai.agents/internal/cmd/init.go:205 +0x313
azureaiagent/internal/cmd.newInitCommand.func1(0xc00024af00?, {0xc0004708c0?, 0x4?, 0x1006077?})
        /workspaces/azure-dev/cli/azd/extensions/azure.ai.agents/internal/cmd/init.go:133 +0x555
github.com/spf13/cobra.(*Command).execute(0xc00035db08, {0xc000470880, 0x4, 0x4})
        /go/pkg/mod/github.com/spf13/cobra@v1.10.1/command.go:1015 +0xb02
github.com/spf13/cobra.(*Command).ExecuteC(0xc00035cf08)
        /go/pkg/mod/github.com/spf13/cobra@v1.10.1/command.go:1148 +0x465
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/cobra@v1.10.1/command.go:1071
github.com/spf13/cobra.(*Command).ExecuteContext(0x0?, {0x13b45c0?, 0x1b24b40?})
        /go/pkg/mod/github.com/spf13/cobra@v1.10.1/command.go:1064 +0x47
main.main()
        /workspaces/azure-dev/cli/azd/extensions/azure.ai.agents/main.go:27 +0x26

It also happens when initializing other types of agents like the French agent.

Metadata

Metadata

Assignees

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