Skip to content

Missing method when calling GetResponsesClient() on AzureOpenAIClient #20175

Description

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

sp.GetRequiredService<AzureOpenAIClient>().GetResponsesClient();

results in

Unhandled exception. System.MissingMethodException: Method not found: 'Void OpenAI.Responses.ResponsesClient..ctor(System.ClientModel.Primitives.ClientPipeline, OpenAI.OpenAIClientOptions)'.
   at Azure.AI.OpenAI.Responses.AzureResponsesClient..ctor(ClientPipeline pipeline, String deploymentName, Uri endpoint, AzureOpenAIClientOptions options)
   at Azure.AI.OpenAI.AzureOpenAIClient.GetResponsesClient()

Expected Behavior

No response

Steps To Reproduce

Create an agent service using the following packages:

    <PackageReference Include="Aspire.Azure.AI.OpenAI" />
    <PackageReference Include="Microsoft.Agents.AI.A2A" />
    <PackageReference Include="Microsoft.Agents.AI.Harness" />
    <PackageReference Include="Microsoft.Agents.AI.Hosting.AGUI.AspNetCore" />
    <PackageReference Include="Microsoft.Agents.AI.Hosting.AspNetCore" />
    <PackageReference Include="Microsoft.Agents.AI.Hosting.OpenAI" />
    <PackageReference Include="Microsoft.Agents.AI.Workflows" />
    <PackageReference Include="Microsoft.Agents.AI.Workflows.Generators" PrivateAssets="all" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
    <PackageReference Include="Microsoft.Identity.Web" />

Exceptions (if any)

Unhandled exception. System.MissingMethodException: Method not found: 'Void OpenAI.Responses.ResponsesClient..ctor(System.ClientModel.Primitives.ClientPipeline, OpenAI.OpenAIClientOptions)'.
   at Azure.AI.OpenAI.Responses.AzureResponsesClient..ctor(ClientPipeline pipeline, String deploymentName, Uri endpoint, AzureOpenAIClientOptions options)
   at Azure.AI.OpenAI.AzureOpenAIClient.GetResponsesClient()

Aspire doctor output


Anything else?

It might be an issue that is caused by the following differences in dependency versions:

Microsoft.Agents.AI.Hosting.OpenAI 1.21.0-alpha.260911.1:

Aspire.Azure.AI.OpenAI 13.5.4-preview.1.26464.4:

Also reported as microsoft/agent-framework#7484

Seemingly related to Azure/azure-sdk-for-net#60689

Workaround not possible: It might have been possible to work around this when manually specifying the OpenAI package version but that is blocked by the

Aspire.Azure.AI.OpenAI 13.5.4-preview.1.26464.4 -> OpenAI (>= 2.12.0)

requirement

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-integrationsIssues pertaining to Aspire Integrations packagestriage:bot-seenAspire triage bot has seen this issue

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions