Coding Agents
Coding Agents and Chat Platforms with AI Gateway
Route coding agents and chat platforms through AI Gateway to share model access, track spend, and configure provider fallbacks in one place.
Copy page
The Vercel CLI is the recommended way to connect a coding agent. One command provisions or reuses an API key, writes each agent's configuration, and points every agent at the right gateway endpoint:
npx runs Vercel CLI without installing it globally. To keep vercel available as a global command, install or update the CLI before running setup:
npm i-gvercel@latest
Read the full documentation for the command.
vercel ai-gatewaysetup
The command detects the agents installed on your machine, shows you a diff of every planned change before it writes anything, and stores your key in the macOS Keychain instead of in plaintext config. It reuses an existing key when your configs already point at the gateway, and accepts a pasted key so you don't have to mint a new one. Model lists written into agent configs come from the AI Gateway leaderboards, so the defaults track what's actually being used. It also copies your existing Claude Desktop and Codex Desktop sessions so your history survives the provider switch.
Agent
--agent value
Aider
continue
aider
copilot
crush
Detection pre-selects the agents already installed on your machine, and
--all covers every agent in the table. To connect a subset, name each one with
--agent
Which base URL to use
Configuring an agent by hand means telling it where the gateway is. Unless the agent has an endpoint of its own, point it at the coding agent surface:
https://ai-gateway.vercel.sh/coding-agent/v1
That URL passes straight through to the standard /v1 handlers, so auth, routing, billing, and errors are identical to the gateway's bare /v1 surface. Prefer it anyway because it marks the traffic as coming from a coding agent. Behavior shared across harnesses can also land there without requiring another config edit. For a client that speaks the Anthropic protocol and appends /v1/messages itself, drop the /v1 and use https://ai-gateway.vercel.sh/coding-agent.
Three agents have a dedicated endpoint, because each needs something the generic surface doesn't do:
Endpoint
https://ai-gateway.vercel.sh/claude-code
https://ai-gateway.vercel.sh/codex/v1
https://ai-gateway.vercel.sh/cursor/v1
See each agent's page for what its endpoint adds. Agents with a first-party AI Gateway provider, such as Cline, OpenCode, Pi, and omp, already know the URL and only need your API key.
Benefit
These featured integrations provide a starting point. The setup table above lists every agent supported by the Vercel CLI, and the sidebar lists all integration guides alphabetically.
Spend tracking
Model access
Single unified view
Without
Separate dashboards per provider
200+ models from all providers
Billing
Reliability
Limited to agent's default models
Multiple invoices, multiple accounts
One Vercel invoice
Automatic provider fallbacks
Featured agents
Observability
Single point of failure
Limited or no visibility
Full request traces and metrics
With
Claude Code is Anthropic's agentic coding tool for the terminal. The CLI connects it for you with --agent claude-code. To configure it by hand, use environment variables:
export ANTHROPIC_BASE_URL="https://ai-gateway.vercel.sh/claude-code"
export ANTHROPIC_API_KEY=""
export ANTHROPIC_AUTH_TOKEN="your-ai-gateway-api-key"
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
Once configured, Claude Code works exactly as before, but requests route through the gateway. /claude-code is Claude Code's own compatibility endpoint, and the discovery variable puts every gateway model in its /model picker.
See the Claude Code documentation for the dedicated Claude Code compatibility endpoint, model discovery, and advanced configuration.
[model_providers.vercel]
model_provider ="vercel"
name ="Vercel AI Gateway"
env_key ="AI_GATEWAY_API_KEY"
OpenAI Codex is OpenAI's terminal-based coding agent. The CLI connects it for you with --agent codex. To configure it by hand, add the following to its configuration file:
wire_api ="responses"
codex
codex --modelopenai/gpt-5.5-pro
Then start Codex, optionally on a specific model:
base_url ="https://ai-gateway.vercel.sh/codex/v1"
/codex/v1 is Codex's own compatibility endpoint, and wire_api = "responses" is required, since Codex no longer speaks Chat Completions.
Codex reads the gateway catalog from /codex/v1/models at startup, so /model inside a session lists every gateway model.
For full configuration options, including the dedicated Codex compatibility endpoint and profiles, see Configure OpenAI Codex.
Command Code supports manual setup with your own AI Gateway API key and a custom base URL. Add AI Gateway as a provider in ~/.commandcode/providers.json, using https://ai-gateway.vercel.sh/coding-agent/v1 as the baseURL.
Run /model to select one of your configured models under Vercel AI Gateway.
See the Command Code documentation for the provider configuration and API key setup.
OpenCode is an open-source, terminal-based AI coding agent with native support. The CLI connects it for you with --agent opencode. You can also connect directly from within the tool:
opencode
> /connect
# Select "Vercel AI Gateway" and enter your API key
OpenCode automatically discovers available models and lets you switch between them on the fly.
See the OpenCode documentation for more features.
Blackbox AI is a terminal-based CLI for AI-powered code generation and debugging. Configure it with the interactive setup:
blackbox configure
# Select "Configure Providers", choose "Vercel AI Gateway", and enter your API key
See the Blackbox AI documentation for installation and setup.
Cline is a VS Code extension and CLI that provides autonomous coding assistance. The CLI connects it for you with --agent cline. To configure the extension by hand:
- Open the Cline settings panel
- Select Vercel AI Gateway as your API Provider
- Paste your API key
- Choose a model from the auto-populated catalog
Cline tracks detailed metrics including reasoning tokens, cache performance, and latency.
See the Cline documentation for troubleshooting tips.
Amp connects to AI Gateway through Amp's Model Routing settings. The integration is currently early access for Amp Megawatt and Gigawatt members and requires manual configuration.
See Configure Amp with AI Gateway for eligibility, setup, and model selection.
Aider is an open-source terminal pair-programming agent. The Vercel CLI configures its AI Gateway base URL, default model, model metadata, and API key environment variable.
See Configure Aider with AI Gateway for manual setup, model metadata, and model selection.
Cursor is an AI-first code editor. The Vercel CLI provisions an API key and prints the values you need to finish configuration in Cursor's account-synced settings.
See Configure Cursor with AI Gateway for the full setup and Cursor's BYOK limitations.
GitHub Copilot CLI is GitHub's terminal coding agent. Its BYOK mode uses environment variables, so the Vercel CLI can connect it without a config file or GitHub sign-in.
Harbor runs benchmarks such as Terminal-Bench with your choice of coding-agent harness. It supports built-in adapters, including Claude Code, Codex, fx, OpenCode, and Pi, as well as custom agents. Connect a harness to AI Gateway through its adapter's provider or compatible API settings. Configure Harbor with harbor run; Harbor does not have a vercel ai-gateway setup --agent value.
You can reach our customer support team by emailing info@yourcompany.example.com, calling +1 555-555-5556, or using the live chat on our website. Our dedicated team is available 24/7 to assist with any inquiries or issues.
We’re committed to providing prompt and effective solutions to ensure your satisfaction.
We offer a 30-day return policy for all products. Items must be in their original condition, unused, and include the receipt or proof of purchase. Refunds are processed within 5-7 business days of receiving the returned item.
- Chatbox, a cross-platform desktop chat interface
- Open WebUI, a self-hosted web interface
- OpenClaw, which connects coding agents and messaging platforms
Getting started
- Run the CLI: vercel ai-gateway setup creates a key and configures every agent it supports. Skip to step 4 when it finishes
- Get an API key: to configure a tool by hand, create a key in the AI Gateway page
- Configure the connection: point the tool at the endpoint named on its setup page
- Start using the tool: requests now route through AI Gateway
Monitoring usage
Once your tools are connected, view usage in the Observability section in the sidebar:
- Spend by tool: See how much each tool costs
- Model usage: Track which models your tools use most
- Request traces: Debug issues with full request/response logs
Next steps
- Connect your agents with the Vercel CLI
- Set up Claude Code
- Configure OpenAI Codex with custom profiles
- Try OpenCode for native integration
- Set up Pi for its first-class gateway provider
- Configure Cursor with a custom OpenAI base URL
- Set up Blackbox AI CLI for code generation
- Configure Cline for autonomous coding assistance
- Configure Command Code with your own API key and a custom base URL
- Install Roo Code as a VS Code extension
- Configure Conductor for parallel agents
- Configure Crush for LSP-enhanced coding
- Configure Grok Build for SpaceXAI's terminal coding agent
- Configure Hermes for Nous Research's terminal coding agent
- Configure Kilo Code as an OpenAI-compatible provider
- Configure omp for its inherited first-class gateway provider
- Configure OpenClaw for multi-provider routing
- Configure Superset for terminal-first AI coding
- Configure Aider for AI pair programming in git
- Configure Continue CLI for cn and IDE extensions
- Configure GitHub Copilot CLI for BYOK mode
- Configure Deep Agents CLI for LangChain's terminal agent
- Configure DeepSeek Harness for DeepSeek's terminal agent
- Configure Factory Droid with BYOK custom models
- Configure ForgeCode with a custom provider
- Configure fx for its native gateway support
- Configure Goose with a custom provider
- Configure gptme with a custom provider
- Configure Junie CLI with model profiles
- Configure Kimi CLI with a [models] shortlist
- Configure OpenHands for app and headless runs
- Configure Qwen Code with model providers
- Configure Mistral Vibe with a custom provider
- Configure ZCode with a custom provider
- Configure Zed with its first-party gateway provider
Last updated September 13, 2026
Cross-link map: Coding Agents and Chat Platforms with AI Gateway (/docs/ai-gateway/coding-agents)From the Vercel docs graph (built 2026-09-21T05:26:59.511Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: https://vercel.com/docs/graph.jsonSemantically closest pagesvercel ai-gateway — Manage AI Gateway resources from the Vercel CLI: API keys, budgets, routing rules, virtual models, models, leaderboards,Set up coding agents in one command with AI GatewayClaude Code and Claude Agent SDK with AI Gateway — Connect Claude Code to AI Gateway with one CLI command, or configure it manually.OpenCode with AI Gateway — Connect OpenCode to AI Gateway with one CLI command, or configure it in-app.Getting Started with AI Gateway — Set up AI Gateway with a coding agent, route the agent through AI Gateway, or make your first request with cURL, TypeScrThis page links to (40)Aider with AI Gateway — Connect Aider to AI Gateway with the Vercel CLI or an OpenAI-compatible base URL, API key, and model metadata.Amp with AI Gateway — Connect Amp to AI Gateway through Amp's Model Routing settings. Add an AI Gateway API key, choose models for Amp's modesBlackbox AI with AI Gateway — Configure the Blackbox AI CLI to use AI Gateway for code generation and debugging. Set your API key and model and monitoChatbox with AI Gateway — Connect Chatbox to AI Gateway. Configure your API key, endpoint, and models to use multiple AI providers and monitor chaClaude Code and Claude Agent SDK with AI Gateway — Connect Claude Code to AI Gateway with one CLI command, or configure it manually.Cline with AI Gateway — Connect Cline to AI Gateway through the Vercel CLI or VS Code settings. Configure model access and monitor usage and speCommand Code with AI Gateway — Connect Command Code to AI Gateway with your own API key and a custom base URL. Configure models, switch between them, aConductor with AI Gateway — Connect Conductor to AI Gateway through its Claude Code configuration. Route parallel coding agents through the AnthropiContinue CLI with AI Gateway — Connect Continue CLI to AI Gateway with the Vercel CLI or a YAML model configuration that reads your API key from the enGitHub Copilot CLI with AI Gateway — Connect GitHub Copilot CLI to AI Gateway with the Vercel CLI or environment variables for the provider URL, API key, andCrush with AI Gateway — Configure the Crush terminal coding agent with AI Gateway. Set up provider credentials and models and monitor request usCursor with AI Gateway — Connect Cursor to AI Gateway with its OpenAI base URL override. Configure the Cursor compatibility endpoint, API key, anDeep Agents CLI with AI Gateway — Connect Deep Agents CLI to AI Gateway with the Vercel CLI or a TOML provider and model profiles.DeepSeek Harness with AI Gateway — Connect DeepSeek Harness to AI Gateway with the Vercel CLI or a YAML provider and model shortlist.Factory Droid with AI Gateway — Connect Factory Droid to AI Gateway with the Vercel CLI or bring-your-own-key custom model entries.ForgeCode with AI Gateway — Connect ForgeCode to AI Gateway with the Vercel CLI or custom provider and credential files.fx with AI Gateway — Connect fx to AI Gateway with the Vercel CLI or the AI_GATEWAY_API_KEY environment variable.Goose with AI Gateway — Connect Goose to AI Gateway with the Vercel CLI or a custom OpenAI-compatible provider.gptme with AI Gateway — Connect gptme to AI Gateway with the Vercel CLI or a TOML provider configuration.Grok Build with AI Gateway — Connect Grok Build to AI Gateway with environment variables. Populate the model picker from the model catalog and monitoHarbor with AI Gateway — Evaluate coding-agent harnesses with Harbor and AI Gateway. Choose a harness, configure its connection, and pass separatHermes with AI Gateway — Connect Hermes to AI Gateway with the Vercel CLI or manual provider configuration. Set your API key, discover models, anJunie CLI with AI Gateway — Connect Junie CLI to AI Gateway with the Vercel CLI or custom model profiles.Kilo Code with AI Gateway — Connect Kilo Code to AI Gateway with the Vercel CLI or an OpenAI-compatible provider configuration. Set your API key andKimi CLI with AI Gateway — Connect Kimi CLI to AI Gateway with the Vercel CLI or a TOML provider and model shortlist.omp with AI Gateway — Connect omp \(oh-my-pi\) to AI Gateway with the Vercel CLI or an environment variable. Use the built-in provider to acceOpen WebUI with AI Gateway — Connect Open WebUI to AI Gateway. Configure your API key, endpoint, and models to use multiple AI providers and monitorOpenAI Codex with AI Gateway — Connect OpenAI Codex to AI Gateway with one CLI command, or configure it manually.OpenClaw with AI Gateway — Connect OpenClaw to AI Gateway with the Vercel CLI or manual provider configuration. Use gateway models across coding agOpenCode with AI Gateway — Connect OpenCode to AI Gateway with one CLI command, or configure it in-app.OpenHands with AI Gateway — Connect OpenHands to AI Gateway with the Vercel CLI or an OpenAI-compatible LLM configuration.Pi with AI Gateway — Connect Pi to AI Gateway with one CLI command, or configure it manually.Qwen Code with AI Gateway — Connect Qwen Code to AI Gateway with the Vercel CLI or OpenAI-compatible model provider entries.Roo Code with AI Gateway — Connect the Roo Code VS Code extension to AI Gateway. Configure your API key and models to access multiple providers andSuperset with AI Gateway — Configure Superset to use AI Gateway with terminal-based coding agents. Set provider credentials and route model requestMistral Vibe with AI Gateway — Connect Mistral Vibe to AI Gateway with the Vercel CLI or a TOML provider and model shortlist.ZCode with AI Gateway — Connect ZCode to AI Gateway with the Vercel CLI or an OpenAI-compatible custom provider.Zed with AI Gateway — Connect Zed to AI Gateway with the Vercel CLI or its built-in Vercel AI Gateway provider.AI Gateway Leaderboards — See which AI models, labs, apps, and providers are most used on AI Gateway, share a chart as an image, and download thevercel ai-gateway — Manage AI Gateway resources from the Vercel CLI: API keys, budgets, routing rules, virtual models, models, leaderboards,Pages that link here (36)By site: vercel-changelog (25) · vercel-kb (1) · vercel-docs (10)From vercel-changelog10x more capacity for Laguna S 2.1 on AI GatewayClaude Fable 5.1 now available on AI GatewayDeepSeek V4.1 Flash now available on AI GatewayDeepSeek V4 Flash now runs updated weights on AI GatewayDeepSeek V4 Flash Vision Experimental now available on AI GatewayDeepSeek V4 Pro now runs updated weights on AI GatewayGemini 3.7 Flash now available on AI Gateway for 50% offGemini 3.8 Flash now available on AI GatewayGLM 5.3 FlashX now available on AI GatewayGLM-5.3 is 50% off through DigitalOcean on AI GatewayGLM 5.3 now available on AI GatewayGPT-5.6 Sol is 50% off on AI Gateway for the next monthGPT-5.6 Sol is now 50% off a lower priceGrok 4.6 now available on AI GatewayHy4 Preview now available on AI GatewayInkling Small from Thinking Machines is now available on AI GatewayLing 3.0 Flash Fin now available on AI Gateway for freeLing 3.0 Tiny is now available on AI GatewayMiniMax M3 and M2.7 are free on AI GatewayMuse Spark 1.2 is now available on Vercel AI GatewayMuse Spark 1.3 now available on AI GatewayQwen 3.8 Flash now available on AI GatewayQwen 3.8 Max 0902 now available on AI GatewayQwen 3.8 Max now available on Vercel AI GatewaySet up coding agents in one command with AI GatewayFrom vercel-kbHow to route your coding agent spend through AI Gateway — Point Claude Code, Codex, Cursor, and every other harness on your machine at AI Gateway with one CLI command, on a budgeFrom vercel-docsAgent Resources — Set up AI coding tools with Vercel documentation, reusable skills, and secure access to projects, deployments, and logs.Vercel AI Gateway: Models, Routing, and Observability — Call AI models from any infrastructure through a managed gateway. Centralize credentials, request logs, spend budgets, rCommand Code with AI Gateway — Connect Command Code to AI Gateway with your own API key and a custom base URL. Configure models, switch between them, aAI Gateway FAQ — Answers to common questions about AI Gateway, including request errors, pricing and markup, SDK and API compatibility, mGetting Started with AI Gateway — Set up AI Gateway with a coding agent, route the agent through AI Gateway, or make your first request with cURL, TypeScrMigrate to AI Gateway Using Your Coding Agent — Move your app's model calls to Vercel AI Gateway with a single coding-agent prompt, whatever provider or SDK you use todAI Gateway Inputs and Tools — Send images, PDFs, audio, and video to AI Gateway models, and connect models to application functions with tool use.AI Gateway Tool Use and Function Calling — Connect AI Gateway models to application tools with AI SDK 7, Python, Chat Completions, Messages, and Responses examplesAI Gateway SDKs and APIs — Connect to AI Gateway with the AI SDK, Python, REST, or compatible OpenAI, Anthropic Messages, OpenResponses, and Coherevercel ai-gateway — Manage AI Gateway resources from the Vercel CLI: API keys, budgets, routing rules, virtual models, models, leaderboards,