microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
21.6k stars 3.2k forks source link

.Net: Bug: .Net Function calling Stepwise Planner not adhering to openai.yaml request format specified when calling plugins behind easyauth #8310

Closed gladiatorAsh closed 1 month ago

gladiatorAsh commented 1 month ago

Describe the bug We have multiple plugins deployed and working in Azure which connect to different data sources, All of them have easyAuth enabled and have no issues being called directly from Postman etc. with the correct token.

When we import these plugins in Function calling Stepwise Planner code to orchestrate them for a specific result, we see different results when we enable easyAuth than when we do it without.

When easyAuth is disabled, plugins are called by planner and we see expected results in most cases. But when we enable easyAuth, we see mostly 500s and sometimes 200s seemingly randomy, as planner makes API calls to these plugin endpoints in a format which is not as per the openapi.yaml specification of the plugins. We see empty requests being made without values leading to issues and no content returned.

To Reproduce Steps to reproduce the behavior:

  1. Import already working plugins in Function Calling Stepwise Planner
  2. Disable easy Auth and planner is able to orchestrate and provide expected results.
  3. Enable easy Auth for apps with correct token and aud verified, no 401s but plugins are hit with requests in the invalid format leading to 500s there. Expected behavior No difference when easyAuth is enabled than when it is not.

Screenshots If applicable, add screenshots to help explain your problem.

Platform

Additional context Add any other context about the problem here.

markwallace-microsoft commented 1 month ago

@gladiatorAsh We are advising customers to stop using the Function Calling planner in favour of direct Function Calling. We have created the following two articles to help customers transition away from the current planners.

  1. The future of Planners in Semantic Kernel

  2. Planning with Semantic Kernel using Automatic Function Calling