Unified Mode

Unified Mode

One SDK for every provider

Unified mode lets you call any LLM provider using the OpenAI SDK. Enterprise Router translates your request into each provider’s native format and translates the response back. You use one SDK, one API shape, and switch models by changing a string.

How it works

  1. You send an OpenAI-compatible POST /v1/chat/completions request
  2. The model field tells the gateway which provider and model to use
  3. The gateway translates the request to the provider’s native format
  4. The provider responds, and the gateway translates back to OpenAI format
  5. You get a standard OpenAI-shaped response regardless of which provider handled it

Model naming

Use the provider/model format:

openai/gpt-4o
anthropic/claude-sonnet-4-6
google/gemini-2.5-flash

For well-known models, you can omit the provider prefix:

Model prefixInferred provider
gpt-*, o3*, o4*OpenAI
claude-*Anthropic
gemini-*Google/Gemini

So model="claude-sonnet-4-6" works the same as model="anthropic/claude-sonnet-4-6".

Base URL

Point the OpenAI SDK at your gateway’s /v1 endpoint:

https://your-gateway.com/v1

Supported models

ProviderModels
OpenAIgpt-4o, gpt-4o-mini, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, o3, o3-mini, o4-mini
Anthropicclaude-opus-4-6, claude-sonnet-4-6, claude-opus-4-5, claude-haiku-4-5
Googlegemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-3.1-pro-preview, gemini-3-flash-preview

What’s translated

The gateway handles the translation between OpenAI’s API format and each provider’s native format:

  • Messages: role mapping, content format, system message extraction
  • Streaming: SSE event translation in real time
  • Tool calling: function definitions, tool_choice, tool results
  • Vision: image content parts (base64 and URLs)
  • Parameters: temperature, top_p, top_k, max_tokens, stop sequences
  • Response: content blocks, finish reasons, usage/token counts

Limitations

Unified mode translates the most common features. Some provider-specific features may not be available:

  • Anthropic’s extended thinking blocks
  • Audio/video content parts
  • Provider-specific parameters not in the OpenAI spec

For full provider feature support, use Native Mode.

Next steps