Open gaelix98 opened 3 days ago
By any chance, when you use the AzureOpenAIClient
directly (Azure.AI.OpenAI SDK), do you get the same problem?
If you haven't tried, I would ask to do so, this potentially might be a bug from their SDK, but I need to validate this information before opening a ticket on Azure AI SDK
repo with the reproduction code.
We have no problem when using semantic kernel with azureopenai client under apim when no plugin is invoked. Everything works fine and i can chit chat, but as soon as i activate a plugin, i get the error above
Describe the bug The
GetStreamingChatMessageContentsAsync
method in Semantic Kernel does not work with Azure OpenAI when the Azure OpenAI endpoint is behind Azure API Management (APIM). If the kernel tries to activate a plugin, a 400 Bad Request error occurs, preventing the interaction from completing. If no plugin is activated, the program runs successfully.To Reproduce Copy the provided code and run the program. If you use an Azure OpenAI service endpoint behind APIM, you will get the following error:
Expected behavior The program should print a greeting as a response.
Platform
Additional context The same program works correctly with an Azure OpenAI service that is not under APIM. Additionally, it works with version 1.15 of Microsoft Semantic Kernel when running under APIM.
Code Main
Plugin: