Files
Fabric/internal/plugins
Baker Tamory 82974a6a2a fix(azure): Fix deployment URL path for Azure OpenAI API
The OpenAI Go SDK's azure.WithEndpoint() middleware has a bug where it
expects request paths like /openai/chat/completions but the SDK actually
sends paths like /chat/completions (without the /openai/ prefix since
that's included in the base URL). This causes the SDK's route matching
to fail, resulting in deployment names not being injected into the URL.

Azure OpenAI requires URLs like:
  /openai/deployments/{deployment-name}/chat/completions
But the SDK was generating:
  /openai/chat/completions

This fix:
1. Adds custom middleware that correctly transforms API paths to include
   the deployment name extracted from the request body's model field
2. Moves StreamOptions to only be set for streaming requests (Azure
   rejects stream_options for non-streaming requests)

Fixes #1954

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 13:31:04 +11:00
..