Skip to content

azure.ai.agents - Update registry_api to use azcore runtime.Pipeline and policies #6317

Description

@JeffreyCA

Task 1

Update extension code in:

  • cli/azd/extensions/azure.ai.agents/internal/pkg/agents/registry_api/operations.go
  • cli/azd/extensions/azure.ai.agents/internal/pkg/azure/foundry_projects_client.go
  • other extension components that use direct HTTP requests (e.g., any usage of http.Client)

to use azcore's runtime.Pipeline for HTTP request handling. This is to enable policy, logging, and correlation header configuration similar to the agent_api/operations.go implementation. See #6137 as a reference.

Sub-tasks:

  • Refactor RegistryAgentManifestClient to use runtime.Pipeline and associated policies
  • Ensure credential, policy chaining, and diagnostic logging match agent_api usage
  • Review other components in azd/extensions/azure.ai.agents that perform direct HTTP requests (e.g., any usage of http.Client) and update them to use pipelines/policies as appropriate

Relevant files/components for review:

  • registry_api/operations.go (primary)
  • agent_api/operations.go (reference impl)
  • foundry_projects_client.go

Task 2

Update places where we create/use specific azure service clients from azure-sdk-for-go (e.g. armcognitiveservices.NewProjectsClient in cli/azd/extensions/azure.ai.agents/internal/cmd/init.go) to use similar policies and logging config as:

Logging: policy.LogOptions{
					AllowedHeaders: []string{azsdk.MsCorrelationIdHeader},
				},
				PerCallPolicies: []policy.Policy{
					azsdk.NewMsCorrelationPolicy(),
					azsdk.NewUserAgentPolicy(...),
				},

Metadata

Metadata

Labels

area/telemetryTelemetry, tracing, observabilityext-agentsazure.ai.agents extension

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions