Problem
When users configure BYOK with Azure OpenAI via COPILOT_PROVIDER_BASE_URL, the AWF api-proxy sidecar fails to route requests correctly, returning HTTP 404 or 401 regardless of base URL format tried.
Context
Upstream report: github/gh-aw#35483
Root Cause
The api-proxy Copilot adapter (containers/api-proxy/) likely does not handle Azure OpenAI's deployment-based URL structure (/openai/deployments/{deployment}/...) or the api-key header that Azure requires (instead of Authorization: Bearer). Azure OpenAI uses a distinct auth header and URL path format incompatible with the standard OpenAI adapter.
Proposed Solution
- In
containers/api-proxy/, add an Azure OpenAI adapter that detects Azure endpoints (e.g., *.openai.azure.com) and rewrites requests to use api-key: <key> header instead of Authorization: Bearer.
- Accept
COPILOT_PROVIDER_BASE_URL values in the canonical Azure format and normalize the deployment path.
- Add integration test with a mock Azure OpenAI endpoint to verify 200 responses across all supported URL variants.
Generated by Firewall Issue Dispatcher · sonnet46 1.2M · ◷
Problem
When users configure BYOK with Azure OpenAI via
COPILOT_PROVIDER_BASE_URL, the AWF api-proxy sidecar fails to route requests correctly, returning HTTP 404 or 401 regardless of base URL format tried.Context
Upstream report: github/gh-aw#35483
Root Cause
The api-proxy Copilot adapter (
containers/api-proxy/) likely does not handle Azure OpenAI's deployment-based URL structure (/openai/deployments/{deployment}/...) or theapi-keyheader that Azure requires (instead ofAuthorization: Bearer). Azure OpenAI uses a distinct auth header and URL path format incompatible with the standard OpenAI adapter.Proposed Solution
containers/api-proxy/, add an Azure OpenAI adapter that detects Azure endpoints (e.g.,*.openai.azure.com) and rewrites requests to useapi-key: <key>header instead ofAuthorization: Bearer.COPILOT_PROVIDER_BASE_URLvalues in the canonical Azure format and normalize the deployment path.