These docs track the main branch and may describe unreleased features. The stable documentation lives at docs.docker.com.

Vercel AI Gateway

Use Vercel AI Gateway models with Docker Agent.

Overview

Vercel AI Gateway is a single, unified OpenAI-compatible endpoint that routes to models from OpenAI, Anthropic, Google, xAI and more at list price with no markup, plus provider routing and failover. It lets you reach many providers with one API key. Docker Agent includes built-in support for Vercel AI Gateway as an alias provider.

Setup

  1. Create an API key from the Vercel AI Gateway dashboard.

  2. Set the environment variable:

    export AI_GATEWAY_API_KEY=your-api-key
    

Usage

Vercel AI Gateway model IDs use a creator/model form (for example openai/gpt-5.6-sol or anthropic/claude-sonnet-4.5); the gateway routes each request to the underlying provider. The gateway lists explicit variant slugs only (openai/gpt-5.6-sol, -terra, -luna) — there is no unsuffixed openai/gpt-5.6 alias on the gateway.

Inline Syntax

The simplest way to use Vercel AI Gateway:

agents:
  root:
    model: vercel/openai/gpt-5.6-sol
    description: Assistant using Vercel AI Gateway
    instruction: You are a helpful assistant.

Named Model

For more control over parameters:

models:
  vercel_model:
    provider: vercel
    model: openai/gpt-5.6-sol
    max_tokens: 8192

agents:
  root:
    model: vercel_model
    description: Assistant using Vercel AI Gateway
    instruction: You are a helpful assistant.

Available Models

Vercel AI Gateway exposes models from many providers behind one endpoint. Check the Vercel AI Gateway documentation for the current model list, IDs, and pricing.

Model Description
openai/gpt-5.6-sol OpenAI GPT-5.6 Sol (frontier) routed through the gateway
openai/gpt-5.6-terra OpenAI GPT-5.6 Terra (workhorse) routed through the gateway
openai/gpt-5.6-luna OpenAI GPT-5.6 Luna (high-volume) routed through the gateway
anthropic/claude-sonnet-4.5 Anthropic Claude Sonnet routed through the gateway
google/gemini-2.5-flash Google Gemini routed through the gateway

Model IDs are case-sensitive and must be passed exactly as the gateway lists them, including the creator/ prefix.

How It Works

Vercel AI Gateway is implemented as a built-in alias in Docker Agent:

Because the gateway can route to open-weight models with strict chat templates, Docker Agent coalesces consecutive system messages into a single leading one for this provider.

Example: Code Assistant

agents:
  coder:
    model: vercel/anthropic/claude-sonnet-4.5
    description: Code assistant via Vercel AI Gateway
    instruction: |
      You are an expert programmer.
      Write clean, well-documented code and follow language best practices.
    toolsets:
      - type: filesystem
      - type: shell
      - type: think