Skip to content

OpenAIAssistantChatClientIntegrationTests don't seem to work against Azure OpenAI #7147

@ericstj

Description

@ericstj

I haven't been able to get these tests to run against Azure OpenAI. Either we're missing setup steps, or they just don't work.

They fail with either:

    C:\src\dotnet\extensions\test\Libraries\Microsoft.Extensions.AI.OpenAI.Tests\OpenAIAssistantChatClientIntegrationTests.cs(32): error TESTERROR:
      Microsoft.Extensions.AI.OpenAIAssistantChatClientIntegrationTests.GetStreamingResponseAsync (1ms): Error Message: System.ClientModel.ClientResultException : HTTP 404 (: 404)

      Resource not found
      Stack Trace:
         at OpenAI.ClientPipelineExtensions.ProcessMessage(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
         at OpenAI.Assistants.AssistantClientGetAssistantsCollectionResultOfT.GetRawPages()+MoveNext()
         at System.ClientModel.CollectionResult`1.GetEnumerator()+MoveNext()
         at System.Linq.Enumerable.TryGetFirstNonIterator[TSource](IEnumerable`1 source, Boolean& found)
         at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
         at Microsoft.Extensions.AI.OpenAIAssistantChatClientIntegrationTests.CreateChatClient() in C:\src\dotnet\extensions\test\Libraries\Microsoft.Extensions.AI.OpenAI.Tests\OpenAIAssistantChatClientIntegrationTests.cs:line 32
         at Microsoft.Extensions.AI.ChatClientIntegrationTests..ctor() in C:\src\dotnet\extensions\test\Libraries\Microsoft.Extensions.AI.Integration.Tests\ChatClientIntegrationTests.cs:line 39
         at Microsoft.Extensions.AI.OpenAIAssistantChatClientIntegrationTests..ctor()
         at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
    C:\src\dotnet\extensions\test\Libraries\Microsoft.Extensions.AI.OpenAI.Tests\OpenAIAssistantChatClientIntegrationTests.cs(32): error TESTERROR:

Or the following, if I remove getting the assistant collection.

      Microsoft.Extensions.AI.OpenAIAssistantChatClientIntegrationTests.GetStreamingResponseAsync (1ms): Error Message: System.ClientModel.ClientResultException : HTTP 404 (: 404)

      Resource not found
      Stack Trace:
         at OpenAI.ClientPipelineExtensions.ProcessMessage(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
         at OpenAI.Assistants.AssistantClient.CreateAssistant(BinaryContent content, RequestOptions options)
         at OpenAI.Assistants.AssistantClient.CreateAssistant(String model, AssistantCreationOptions options, CancellationToken cancellationToken)
         at Microsoft.Extensions.AI.OpenAIAssistantChatClientIntegrationTests.CreateChatClient() in C:\src\dotnet\extensions\test\Libraries\Microsoft.Extensions.AI.OpenAI.Tests\OpenAIAssistantChatClientIntegrationTests.cs:line 32
         at Microsoft.Extensions.AI.ChatClientIntegrationTests..ctor() in C:\src\dotnet\extensions\test\Libraries\Microsoft.Extensions.AI.Integration.Tests\ChatClientIntegrationTests.cs:line 39
         at Microsoft.Extensions.AI.OpenAIAssistantChatClientIntegrationTests..ctor()
         at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

I think I had to add an assistant playground and deploy an assistant.

I did that and still no change.

I am able to run most of other integration tests on my Azure OpenAI deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-aiMicrosoft.Extensions.AI librariesuntriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions