[BUG] 401 Unauthorized with Azure OpenAI CompleteChatAsync() #45932
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
OpenAI
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Library name and version
Azure.AI.OpenAI 2.0.0-beta.2
Describe the bug
I am getting a consistent 401 unauthorized when using Default Identity using the new Azure OpenAI version for CompleteChatAsync().
It works fine when using embeddings. It's just Chat that doesn't work. I double checked by running the same test on a v1 beta package and it works fine. I am migrating my app to this new version when I encountered this.
Expected behavior
Function call should successfully authenticate and complete the request.
Actual behavior
The app itself appears to just sit there waiting. Eventually this comes into the log window.
Reproduction Steps
This is difficult to build a complete repro for. The code for this is in this branch, https://github.com/markjbrown/cosmosdb-nosql-copilot/tree/oai2-sk118rc The file is /src/services/OpenAiService.cs the function is GetRagCompletionAsync()
Environment
Win 11
.NET 8
VS 17.11.3
The text was updated successfully, but these errors were encountered: