Skip to content

.NET: Remove Azure.AI.OpenAI dependency #7985

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETUsage: [Issues, PRs], Target: .Net

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions