Problem
The .NET tree still references Azure.AI.OpenAI, even though the Azure SDK migration guidance recommends using the official OpenAI SDK directly for Azure OpenAI v1 endpoints.
Keeping both packages adds an unnecessary dependency and leaves samples and tests on two client construction patterns.
Proposed change
- Remove the centrally managed
Azure.AI.OpenAI version and direct package references.
- Use
OpenAIClient with BearerTokenPolicy and the https://ai.azure.com/.default scope.
- Normalize Azure resource roots to the
/openai/v1/ endpoint path.
- Update samples, tests, READMEs, and the Semantic Kernel migration prompt.
- Keep
Aspire.Azure.AI.OpenAI, which is a separate Aspire integration package.
Acceptance criteria
- No build-time references to
Azure.AI.OpenAI, AzureOpenAIClient, or AzureOpenAIClientOptions remain.
- Affected projects build with warnings treated as errors.
- Affected OpenAI, Foundry, and AG-UI test suites pass.
- Azure OpenAI samples continue to work with resource root or full v1 endpoints.
Problem
The .NET tree still references
Azure.AI.OpenAI, even though the Azure SDK migration guidance recommends using the officialOpenAISDK directly for Azure OpenAI v1 endpoints.Keeping both packages adds an unnecessary dependency and leaves samples and tests on two client construction patterns.
Proposed change
Azure.AI.OpenAIversion and direct package references.OpenAIClientwithBearerTokenPolicyand thehttps://ai.azure.com/.defaultscope./openai/v1/endpoint path.Aspire.Azure.AI.OpenAI, which is a separate Aspire integration package.Acceptance criteria
Azure.AI.OpenAI,AzureOpenAIClient, orAzureOpenAIClientOptionsremain.