-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Azure routing and webview protocol stability issues (minimal diff attached) #12554
Copy link
Copy link
Open
Labels
area:configurationRelates to configuration optionsRelates to configuration optionsarea:integrationIntegrations (context providers, model providers, etc.)Integrations (context providers, model providers, etc.)ide:vscodeRelates specifically to VS Code extensionRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on WindowsHappening specifically on Windows
Metadata
Metadata
Assignees
Labels
area:configurationRelates to configuration optionsRelates to configuration optionsarea:integrationIntegrations (context providers, model providers, etc.)Integrations (context providers, model providers, etc.)ide:vscodeRelates specifically to VS Code extensionRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on WindowsHappening specifically on Windows
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Todo
Before submitting your bug report
Relevant environment info
Description
Azure OpenAI requests are routed to incorrect endpoints, resulting in 404 errors and cascading failures inside _streamChat. Additionally, malformed webview messages and unsafe error‑handling paths can crash the extension host. I’ve attached a minimal diff (diff_full.txt) that resolves these issues locally without altering non‑Azure behavior. I’m not submitting a PR, but the patch may be useful for evaluation.
diff_full.txt
Azure routing falls back to OpenAI‑style endpoints (/chat/completions) instead of Azure deployment endpoints, causing 404s. Webview protocol handling can also crash due to malformed messages and unsafe stringify/includes operations.
Additional information
The attached diff includes:
Correct Azure endpoint construction in _getEndpoint
Removal of request‑body pollution in _streamChat
Guards for malformed webview messages
Safe stringify and safe includes
No changes to non‑Azure providers or architecture
The patch is intentionally minimal and localized.
To reproduce
Malformed webview messages can also trigger crashes during normal usage.
Log output