microsoft / teams-ai

SDK focused on building AI based applications and extensions for Microsoft Teams and other Bot Framework channels
MIT License
349 stars 143 forks source link

[Bug]: HttpError action isn't triggered under some conditions calling OpenAI #1710

Closed therealjohn closed 2 weeks ago

therealjohn commented 4 weeks ago

Language

Javascript/Typescript

Version

1.2.1

Description

Under some conditions, the HttpError action handler isn't called which makes it difficult to track down issues.

I could not remember exactly what those were, but I suspect it was this: https://github.com/microsoft/teams-ai/blob/main/js/packages/teams-ai/src/models/OpenAIModel.ts#L365

Adding data_sources to the config.json when a non-compatible version of Azure API is used with Azure OpenAI, the API returns a 400 error. This is true for some other unsupported parameter exceptions calling the API too.

Reproduction Steps

1. Add parameters to the API call or config.json for the model
2. Use a version of API that doesn't support them
3. Run the app and chat with it to call the completions API
4. Override the HttpError handler and observe its not called
aacebo commented 2 weeks ago

@therealjohn version 1.3.0 should have the fix for this.

corinagum commented 2 weeks ago

Closing as resolved. If there are ongoing things to discuss, we can reopen