Skip to main content

DIAL OpenAI Adapter

warning

The standalone DIAL OpenAI, Bedrock, and Vertex AI adapters will be deprecated soon. Use DIAL Model Provider instead: it combines these three adapters in one service, and serves this adapter under /compat/openai. To move your models, see Migrate from the standalone adapters.

The DIAL OpenAI Adapter connects DIAL Core to models that speak an OpenAI-style API: Azure OpenAI, the OpenAI Platform, Azure AI Foundry, OpenAI models on Amazon Bedrock, Mistral, Alibaba Cloud Model Studio, vLLM, and providers of the Anthropic Messages API. It serves them to Core through the DIAL APIs, so chat, image, video, speech, and embedding models all look the same to DIAL clients. This page is for platform engineers who connect these models to DIAL.

How it works​

  • Two parts of the configuration. The adapter's environment variables set how it behaves. Each model is a model entry in DIAL Core: endpoint points at the adapter, and upstreams point at the provider.
  • Two deployment IDs. The DIAL model ID is what clients call. The upstream model name is what the provider receives; it comes from the adapter URL, or from overrideName. Always set overrideName to keep them apart explicitly.
  • DIAL files. With DIAL_URL set, the adapter can read and write DIAL files, such as attachments and generated images.

DIAL APIs it serves​

APIAdapter endpointsDIAL Core model field
Chat CompletionsPOST /openai/deployments/<id>/chat/completions, POST /openai/v1/chat/completionsendpoint
ResponsesPOST, GET, DELETE /openai/v1/responses..., and the dated form /openai/responses?api-version=...responsesEndpoint, or interfaces.openaiResponses
EmbeddingsPOST /openai/deployments/<id>/embeddings, POST /openai/v1/embeddingsendpoint with "type": "embedding"
Anthropic MessagesPOST /anthropic/v1/messages and the other proxied Claude API endpointsinterfaces.anthropicMessages
TokenizePOST /openai/deployments/<id>/tokenizefeatures.tokenizeEndpoint
Truncate promptPOST /openai/deployments/<id>/truncate_promptfeatures.truncatePromptEndpoint
ConfigurationGET /openai/deployments/<id>/configurationfeatures.configurationEndpoint

The /openai/v1/... forms take the upstream model name from the X-DIAL-DEPLOYMENT-ID header that Core sends. For the Responses API, Core 0.42.0 and adapter 0.38.0 or later are required.

What it connects to​

ProviderChatResponsesEmbeddingsOther models
Azure OpenAIYesYesYesImages (DALL·E 3, GPT Image 1), video (Sora, Sora 2), speech (TTS and STT)
OpenAI PlatformYesYesYes—
Azure AI FoundryYes——Claude through Anthropic Messages
Amazon Bedrock (OpenAI models)YesYes——
Mistral PlatformYes———
Alibaba Cloud Model StudioYesYes——
vLLM and vLLM-OmniYes—YesSpeech-to-text (Qwen3-ASR), text-to-speech
Anthropic API and compatible providersYes, through Anthropic Messages———
Azure AI Vision——Multimodal embeddings—

Each row, with its DIAL Core configuration, is in Supported upstreams.

Base configuration​

From ai-dial-samples. The adapter service in Docker Compose:

adapter-dial-openai:
image: epam/ai-dial-adapter-openai:0.45.1
environment:
DIAL_URL: http://core:8080
LOG_LEVEL: INFO

A model in the DIAL Core configuration, served by the OpenAI Platform:

{
"models": {
"gpt-4o": {
"type": "chat",
"displayName": "GPT-4o",
"overrideName": "gpt-4o",
"endpoint": "http://adapter-dial-openai:5000/openai/deployments/gpt-4o/chat/completions",
"upstreams": [
{
"endpoint": "https://api.openai.com/v1/chat/completions",
"key": "<OPENAI_API_KEY>"
}
],
"features": { "toolsSupported": true }
}
}
}

The same adapter serves any OpenAI-compatible server, such as Ollama in the samples, with the server's /v1/chat/completions URL as the upstream.

Deployment​

The adapter ships as the epam/ai-dial-adapter-openai image. Deploy it with the DIAL Helm charts, or in Docker Compose as above. To trust a private certificate authority, see Configuration.