Expand description
The Azure OpenAI provider adapter (AI-01).
Azure OpenAI speaks the SAME chat-completions body dialect as OpenAI (the request/response JSON is identical), but differs in two transport-level details:
- URL format: Azure uses deployment-based URLs
/openai/deployments/{deployment}/chat/completions?api-version=...instead of OpenAI’s/v1/chat/completions. The{deployment}is the provider model identifier (theprovider_modelthe alias maps to), and theapi-versionquery parameter is required. - Authentication: Azure uses
api-key: {key}instead ofAuthorization: Bearer {key}. The auth header is still configured verbatim viaai.providers[].auth(the adapter does not touch credentials); the operator setsheader: api-key+value: ....
This adapter DELEGATES the body translation to the OpenAI adapter
(the body is identical) and OVERRIDES the path to the Azure
deployment format. The default API version is 2024-10-21 (a stable
GA version); the operator can override it via the other map key
api_version (a dialect-specific parameter preserved by the
canonical request).
Streaming: Azure uses the same SSE format as OpenAI, including the
data: [DONE] sentinel, so the OpenAI stream-event parser applies
unchanged.
Structs§
- Azure
Open AiAdapter - The Azure OpenAI adapter (AI-01). Stateless singleton; delegates body translation to the OpenAI adapter and overrides the path.