Coding Agents
AI coding agents are transforming how developers write, debug, and refactor code. Route these agents through AI Gateway to get a single dashboard for spend tracking, access to any model, and automatic fallbacks, all while using the familiar interfaces of your favorite tools.
| Benefit | Without | With |
|---|---|---|
| Spend tracking | Separate dashboards per provider | Single unified view |
| Model access | Limited to agent's default models | 200+ models from all providers |
| Billing | Multiple invoices, multiple accounts | One Vercel invoice |
| Reliability | Single point of failure | Automatic provider fallbacks |
| Observability | Limited or no visibility | Full request traces and metrics |
Claude Code is Anthropic's agentic coding tool for the terminal. Configure it with environment variables:
export ANTHROPIC_BASE_URL="https://ai-gateway.vercel.sh"
export ANTHROPIC_API_KEY="your-ai-gateway-api-key"Once configured, Claude Code works exactly as before, but requests route through the gateway. You can use any available model, not just Anthropic's.
See the Claude Code documentation for advanced configuration.
OpenAI Codex (also known as Codex CLI) is OpenAI's terminal-based coding agent. Configure it through its config file:
[profiles.vercel]
provider = "openai"
model = "anthropic/claude-sonnet-4.5"
api_key_env_var = "AI_GATEWAY_API_KEY"
[providers.openai]
base_url = "https://ai-gateway.vercel.sh/v1"Then use it with the Vercel profile:
codex --profile vercel "explain this codebase"See the Codex documentation for setup details.
OpenCode is an open-source, terminal-based AI coding assistant with native support. Connect directly from within the tool:
opencode
> /connect
# Select "Vercel AI Gateway" and enter your API keyOpenCode automatically discovers available models and lets you switch between them on the fly.
See the OpenCode documentation for more features.
Roo Code is a VS Code extension that brings AI assistance directly into your editor. Configure it through the settings panel:
- Click the gear icon in the Roo Code panel
- Select Vercel AI Gateway as your provider
- Enter your API key
- Choose from hundreds of available models
Roo Code includes prompt caching support for Claude and GPT models to reduce costs.
See the Roo Code documentation for setup details.
Cline is a VS Code extension that provides autonomous coding assistance. Configure it directly in VS Code:
- 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.
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 keySee the Blackbox AI documentation for installation and setup.
- Get an API key: Create one in the AI Gateway page
- Choose your agent: Pick from Claude Code, Codex, OpenCode, Roo Code, Cline, or Blackbox AI
- Configure the connection: Point the agent to
https://ai-gateway.vercel.sh - Start coding: Use the agent as normal - all requests route through the gateway
Once your coding agents are connected, view usage in the Observability tab:
- Spend by agent: See how much each tool costs
- Model usage: Track which models your agents use most
- Request traces: Debug issues with full request/response logs
- Set up Claude Code
- Configure OpenAI Codex with custom profiles
- Try OpenCode for native integration
- Install Roo Code as a VS Code extension
- Configure Cline for autonomous coding assistance
- Set up Blackbox AI CLI for code generation
Was this helpful?