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(...),
},
Task 1
Update extension code in:
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/registry_api/operations.gocli/azd/extensions/azure.ai.agents/internal/pkg/azure/foundry_projects_client.goto use azcore's
runtime.Pipelinefor HTTP request handling. This is to enable policy, logging, and correlation header configuration similar to theagent_api/operations.goimplementation. See #6137 as a reference.Sub-tasks:
azd/extensions/azure.ai.agentsthat perform direct HTTP requests (e.g., any usage of http.Client) and update them to use pipelines/policies as appropriateRelevant files/components for review:
Task 2
Update places where we create/use specific azure service clients from azure-sdk-for-go (e.g.
armcognitiveservices.NewProjectsClientincli/azd/extensions/azure.ai.agents/internal/cmd/init.go) to use similar policies and logging config as: