Skip to content
Dashboard

How to use Claude Code with 300+ models at low cost

Content Engineer

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 headingWhat is Claude Code, and which models does it run natively?

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 headingConnect 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 headingSwitch 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, 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 headingWhat 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 covers them.

Copy link to headingWhat 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 headingFrequently asked questions

Copy link to headingHow 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 headingHow 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 headingDoes 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

Copy link to headingRelated resources

Ready to deploy?