Connect Claude Code to Vercel AI Gateway by running `vercel ai-gateway coding-agents setup`, then pick any of 300+ models from inside the agent with `/model`. Setup shows you a diff before writing anything and keeps your history. It doesn't lock you into a model either. Day to day, Claude Code works exactly as before.

## [Copy link to heading](#what-is-claude-code,-and-which-models-does-it-run-natively)What is Claude Code, and which models does it run natively?

[Claude Code](https://claude.com/product/claude-code) is Anthropic's AI coding agent. Anthropic frames it as working directly with Claude in your codebase, so you can build, debug, and ship from your terminal, IDE, Slack, web, and more. It runs locally in your terminal, with no backend server or remote code index, and it asks for permission before making file changes or running commands. Its workflows run from reading an issue through writing the code and running the tests to submitting the PR. It ships for macOS, Linux, and Windows, and you can use it from the terminal, web, mobile, GitHub, VS Code, JetBrains, Slack, and a desktop app.

Natively, Claude Code runs Claude models. The official product page lists the Claude family and no non-Anthropic models, so if you want to point a task at a model outside that family, the agent offers no native path to one. Vercel AI Gateway adds that path: once connected, any of 300+ models works in Claude Code, including models the agent has no native support for, with automatic fallbacks.

## [Copy link to heading](#connect-claude-code-to-vercel-ai-gateway)Connect Claude Code to Vercel AI Gateway

You need a Vercel account and the Vercel CLI. With those in place, setup is three steps.

1.  Run `vercel ai-gateway coding-agents setup`. The command detects the coding agents installed on your machine; Claude Code is one of the 9 it supports. It generates an API key and prepares the gateway URL and credentials for each agent's native config format.

2.  Review the diff. Setup shows a diff of every planned change before writing anything, then edits files in place with formatting preserved and stores your key in the macOS Keychain instead of plaintext config. It also copies your existing Claude Desktop sessions, so your history survives the switch to a new provider.

3.  Open Claude Code and keep working. Requests now route through the gateway; everything else about the agent stays put.

## [Copy link to heading](#switch-models-with-/model)Switch models with `/model`

Claude Code's model selection lives in one in-app command. Run `/model` to open the picker, or pass a slug directly, for example `/model anthropic/claude-opus-5`. Gateway model discovery puts every gateway model in Claude Code's `/model` picker, so the same picker you used to move between Claude models now lists 300+ models.

[Coding is the gateway's largest use case by tokens](/blog/deepseek-overtakes-google-on-volume-cost-per-token-falls), per the August 2026 AI Gateway Production Index, so every request Claude Code sends after setup, whichever model its picker points at, rides the gateway's most exercised workload.

## [Copy link to heading](#what-changes-in-daily-use,-and-what-doesn't)What changes in daily use, and what doesn't

The way you work in Claude Code doesn't change. It still runs locally in your terminal without a backend server or a remote code index, and it still asks for permission before making file changes and running commands. Your copied sessions mean you pick up where you left off. The interface, including the permission prompts and the `/model` command itself, is the interface you already know.

What changes are where requests route, where they're billed, and which models the `/model` picker offers. The low-cost part of the equation lives at the gateway level: budgets, one dashboard for spend across agents, and team-wide policy are gateway features, and the [guide to using any coding agent with 300+ models](https://vercel.com/i/use-any-coding-agent-with-300-plus-models) covers them.

## [Copy link to heading](#what-connecting-claude-code-to-the-gateway-is-not)What connecting Claude Code to the gateway is not

Connecting the gateway doesn't hand you a different agent. Claude Code keeps its local execution, permission prompts, and interface; only the routing and billing behind it change. This guide also avoids model recommendations, since the picker shows the catalog and you choose per task. Budgets and spend controls are managed at the gateway level and covered by the hub guide linked above.

## [Copy link to heading](#frequently-asked-questions)Frequently asked questions

### [Copy link to heading](#how-do-i-connect-claude-code-to-vercel-ai-gateway)How do I connect Claude Code to Vercel AI Gateway?

Run `vercel ai-gateway coding-agents setup` from the Vercel CLI. The command detects Claude Code on your machine, generates an API key, shows a diff of every planned change, and writes the gateway URL and credentials into Claude Code's native config format, edited in place with formatting preserved. After that, Claude Code routes its requests through Vercel AI Gateway.

### [Copy link to heading](#how-do-i-switch-models-in-claude-code)How do I switch models in Claude Code?

Use Claude Code's /model command. Run /model to open the model picker, which lists every gateway model once Claude Code is connected to Vercel AI Gateway, or give it a slug straight away, for example /model anthropic/claude-opus-5. Nothing in the setup ties you to a single model, so you can switch whenever a task calls for it.

### [Copy link to heading](#does-connecting-claude-code-to-the-gateway-change-how-it-works)Does connecting Claude Code to the gateway change how it works?

No. Claude Code still runs locally in your terminal, still asks your permission before changing files or running commands, and keeps the same interface. The differences sit behind the agent: requests route through the gateway, the bill moves to your Vercel account, and the /model picker grows to 300+ models.

[

**Build a software factory with Vercel Connect**

Ship a software factory with GitHub and Linear connectors provisioned for you from the first deployment.

Deploy now

](https://vercel.fyi/eve-software-factory)

## [Copy link to heading](#related-resources)Related resources

- [Use any coding agent with 300+ models](https://vercel.com/i/use-any-coding-agent-with-300-plus-models)

- [Set up coding agents in one command with AI Gateway](https://vercel.com/changelog/set-up-coding-agents-in-one-command-with-ai-gateway)

- [Vercel AI Gateway model catalog](https://vercel.com/ai-gateway/models)