-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix Azure OpenAI endpoint double /v1 path issue #3317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canary
Are you sure you want to change the base?
Conversation
Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
…plication Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
… attacks Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com>
|
@copilot resolve the conflicts |
Conflicts resolved! The branch has been rebased onto the latest canary branch. The Azure OpenAI endpoint fix now works alongside the new Perplexity AI provider support. All tests pass (9/9) and the code is ready for review. Note: The branch history has been rewritten due to the rebase. The changes remain the same but are now based on the latest canary commit (6772575). |
Plan: Fix Azure OpenAI Endpoint Double /v1 Issue
selectAIProviderfunction to properly handle Azure OpenAI base URLsgetModelsendpoint to properly handle Azure OpenAI URLsgetProviderHeadersto use correct Azure OpenAI authenticationRoot Cause
The issue is that when users provide Azure OpenAI URLs like
https://workspacename.openai.azure.com/openai/v1, thecreateAzureSDK function appends its own path, resulting in double/v1in the final URL:https://workspacename.openai.azure.com/openai/v1/v1/chat/completions.Changes Made
/openai/v1and/v1from Azure base URLs before passing tocreateAzureapi-keyheader for Azure OpenAI authentication with secure hostname validationnormalizeAzureUrl()utility functionTesting & Validation
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.