Models

Atlas with Vercel AI Gateway in 2026: 310 Models Behind One AI_GATEWAY_API_KEY

Updated 7 min read

Vercel AI Gateway is Vercel's routing layer in front of roughly 310 models, and unlike most aggregators it ships as @ai-sdk/gateway, a first-class Vercel AI SDK package. Atlas, the terminal-native coding agent, is built on that SDK, so Vercel AI Gateway is the shortest possible path between the registry and a running provider. Pricing runs Grok 4.5 at $2.00/$6.00 per Mtok, Grok 4.20 Reasoning at $1.25/$2.50, Grok 4.1 Fast at $0.20/$0.50, Kimi K2.7 Code at $0.95/$4.00, and Nemotron 3 Super 120B A12B at $0.15/$0.65.

What is Vercel AI Gateway best at inside Atlas?

Vercel AI Gateway is best inside Atlas because it ships as @ai-sdk/gateway, a first-class Vercel AI SDK package, and Atlas is built on that SDK. In 2026 that makes Vercel AI Gateway the shortest path between the models.dev registry and a running provider, with no custom provider block.

Most aggregators reach Atlas through a generic OpenAI-compatible shim. Vercel AI Gateway does not: @ai-sdk/gateway is a real SDK package, loaded from the registry automatically, with no npm install required on your side. A single AI_GATEWAY_API_KEY then covers xAI, Moonshot, NVIDIA, and hundreds of others, so provider failover does not mean provisioning a new key. Atlas lets you switch the active model and provider on the fly with favorites and recents, and behind Vercel AI Gateway that switch spans roughly 310 models without any additional credentials.

What is the largest context window on Vercel AI Gateway?

Vercel AI Gateway exposes Grok 4.20 Reasoning and Grok 4.20 Non-Reasoning at a 2,000,000 token context, the largest window in the entire 2026 Atlas registry. Grok 4.1 Fast runs at 1,000,000 tokens. Grok 4.20 Reasoning also allows 2,000,000 max output for $1.25/$2.50 per Mtok.

A 2,000,000 token context with 2,000,000 max output is an unusual shape. For Atlas it means a long agentic session, with accumulated tool output, diffs, and conversation, does not run into a window ceiling. Atlas computes a unified diff for every file edit and surfaces it for approval before writing, and those diffs pile up in context across a long build session. Grok 4.20 Reasoning at $1.25/$2.50 per Mtok gives you room for that accumulation at a price well under Grok 4.5's $2.00/$6.00. If you want the biggest window Atlas can address in 2026, Vercel AI Gateway is where it lives.

Is Vercel AI Gateway cheaper than going direct?

Vercel AI Gateway prices generally sit at or above first-party, because the gateway is an extra billing relationship on top of the underlying provider. But the routing can cut both ways: Nemotron 3 Super 120B A12B routes at $0.15/$0.65 per Mtok here versus $0.50/$1.50 on Cloudflare Workers AI, a 3x input spread on identical weights.

The honest summary is that Vercel AI Gateway is not a discount layer, it is a convenience and routing layer that sometimes happens to be cheaper. Check the specific model before assuming either direction. Nemotron 3 Super 120B A12B at $0.15/$0.65 per Mtok is a genuine win against the $0.50/$1.50 Cloudflare Workers AI listing of the same weights. Grok 4.5 at $2.00/$6.00 and Kimi K2.7 Code at $0.95/$4.00 are the rates you pay for the convenience of one key. Run `atlas models vercel` and read the row before you pin it.

What are the downsides of Vercel AI Gateway in Atlas?

Vercel AI Gateway adds an extra network hop and an extra billing relationship on top of the underlying provider, and gateway prices generally sit at or above first-party. Its roughly 310-model catalog also mixes in non-text entries with 0-token limits, so `atlas models vercel` returns rows Atlas cannot actually drive.

Kling video, Grok Imagine, Grok TTS, and Grok STT all live in the same Vercel AI Gateway catalog with 0-token limits. Atlas is a coding agent, so those rows are noise in the model list: they resolve, they show up, and they will not run an agent loop. The practical effect is that `atlas models vercel` output requires reading rather than scanning. The extra hop matters too. If latency is your binding constraint and you already have a first-party key for the model you want, going direct removes a hop that Vercel AI Gateway inserts by design.

How do I configure Atlas for Vercel AI Gateway?

Configure Atlas for Vercel AI Gateway by exporting a single AI_GATEWAY_API_KEY from the Vercel dashboard. Atlas loads @ai-sdk/gateway from the models.dev registry automatically, so there is no npm install and no custom provider block. Then pin `"model": "vercel/xai/grok-4.5"` in atlas.json.

The cheap slot is where Vercel AI Gateway pricing pays off inside Atlas. Set `"small_model": "vercel/xai/grok-4.1-fast-non-reasoning"` at $0.20/$0.50 per Mtok so title generation, session summaries, and subagent overhead run at a fraction of the Grok 4.5 rate of $2.00/$6.00. Atlas fans out work to subagents that can run in the foreground or in parallel background sessions, and on a metered gateway those parallel calls are the traffic most likely to surprise you on a bill. Routing them to Grok 4.1 Fast is the documented mitigation.

When should I pick a different provider than Vercel AI Gateway?

Pick a different provider than Vercel AI Gateway when you already hold a first-party key for the one model you use, because the gateway adds a network hop and prices generally sit at or above first-party. Pick Vercel AI Gateway when you need roughly 310 models behind one AI_GATEWAY_API_KEY.

The decision turns on breadth versus directness. A team that has settled on a single model and already pays that vendor gains nothing from Vercel AI Gateway except an extra hop and an extra invoice. A team that switches models often, needs provider failover without provisioning new keys, or wants the 2,000,000 token Grok 4.20 Reasoning window is exactly who Vercel AI Gateway is for. Also check the specific price: Nemotron 3 Super 120B A12B is cheaper here at $0.15/$0.65 per Mtok than the $0.50/$1.50 Cloudflare Workers AI listing, so the general rule that gateways cost more has real exceptions.

Setup

  1. 01Create an AI Gateway key in the Vercel dashboard and export it as AI_GATEWAY_API_KEY.
  2. 02Skip the provider block: Atlas loads @ai-sdk/gateway from the models.dev registry automatically, so there is no npm install and no custom config.
  3. 03Run `atlas models vercel` to list the resolved catalog, and ignore the 0-token non-text rows (Kling video, Grok Imagine, Grok TTS and STT).
  4. 04Pin `"model": "vercel/xai/grok-4.5"` in atlas.json at $2.00/$6.00 per Mtok for the main coding slot.
  5. 05For the cheap slot, set `"small_model": "vercel/xai/grok-4.1-fast-non-reasoning"` at $0.20/$0.50 per Mtok.
  6. 06If you need the largest window Atlas can address, switch the model to Grok 4.20 Reasoning at a 2,000,000 token context for $1.25/$2.50 per Mtok.

Frequently asked questions

how to use vercel ai gateway with atlas
Create an AI Gateway key in the Vercel dashboard, export it as AI_GATEWAY_API_KEY, run `atlas models vercel` to list the catalog, then pin `"model": "vercel/xai/grok-4.5"` in atlas.json. Atlas loads @ai-sdk/gateway from the registry automatically, so there is no npm install.
what is the largest context window available to an ai coding agent
On Vercel AI Gateway, Grok 4.20 Reasoning and Non-Reasoning are exposed at a 2,000,000 token context, the largest window in the Atlas registry. Grok 4.20 Reasoning also allows 2,000,000 max output and costs $1.25/$2.50 per Mtok.
how much does vercel ai gateway cost per million tokens
Grok 4.5 is $2.00/$6.00 per Mtok, Grok 4.20 Reasoning is $1.25/$2.50, Grok 4.1 Fast is $0.20/$0.50, Kimi K2.7 Code is $0.95/$4.00, and Nemotron 3 Super 120B A12B is $0.15/$0.65.
is vercel ai gateway cheaper than going direct to the provider
Usually not. Gateway prices generally sit at or above first-party, and Vercel AI Gateway adds a network hop plus an extra billing relationship. The exception is real though: Nemotron 3 Super 120B A12B is $0.15/$0.65 per Mtok here versus $0.50/$1.50 on Cloudflare Workers AI.
why does atlas models vercel show models it cannot run
The Vercel AI Gateway catalog includes non-text entries such as Kling video, Grok Imagine, and Grok TTS and STT, all with 0-token limits. They resolve in the model list but Atlas, a coding agent, cannot drive them.
what small model should i use with vercel ai gateway
Set `"small_model": "vercel/xai/grok-4.1-fast-non-reasoning"` at $0.20/$0.50 per Mtok. That keeps title, summary, and subagent overhead well below the Grok 4.5 rate of $2.00/$6.00 per Mtok.
does vercel ai gateway need a custom provider block in atlas.json
No. Vercel AI Gateway ships as @ai-sdk/gateway, a first-class Vercel AI SDK package that Atlas loads from the models.dev registry automatically. Export AI_GATEWAY_API_KEY and pin the model, and that is the whole config.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Atlas for Axum in 2026

Atlas is a terminal-native AI coding agent for Axum in 2026. It decodes tower trait-bound errors, adds IntoResponse types, and runs cargo nextest run.

Atlas for COBOL: Copybooks, PIC Clauses, and GnuCOBOL in 2026

Atlas is a terminal-native AI coding agent for COBOL in 2026. It reads your divisions and copybooks, explains a paragraph before touching it, and compiles with cobc under GnuCOBOL.

Run Atlas Headless in CI with Atlas (2026 Workflow)

How to run Atlas headless in CI in 2026: atlas run sends one prompt and exits when the session goes idle, with --format json, --command, and --continue for pipeline steps.

Run the Test Suite and Triage the Failures with Atlas in 2026

How to triage a failing test suite with Atlas in 2026: bash truncates at 2000 lines or 50 KB and saves the full log, then grep groups failures by root cause.

Atlas for Zig: A Terminal-Native AI Coding Agent for build.zig Projects in 2026

Atlas is a terminal-native AI coding agent for Zig in 2026. It reads build.zig and comptime blocks, tracks your allocators, runs zig build test behind a prompt, and runs zig fmt.

Atlas vs Codebuff: Terminal AI Coding Agents in 2026

Atlas and Codebuff are terminal AI coding agents for 2026. Compare Atlas's terminal-native TUI, permission-gated tools, and diff review with Codebuff's multi-agent system and flexible pricing.

Atlas vs Kilo Code: Terminal AI Coding Agents in 2026

Atlas and Kilo Code in 2026: Compare terminal-native TUI vs VS Code/JetBrains agents. Evaluate pricing, code safety, deployment, and model routing for AI coding.

Onboard to an Unfamiliar Codebase with Atlas in 2026

How to onboard to an unfamiliar codebase with Atlas in 2026: use codebase_search, glob, read, lsp, task, and todowrite to build a mental model fast.

Browse this resource hub