# How to switch models in Claude Code with one command

DevFeed: [How to switch models in Claude Code with one command](<https://devfeed.tech/articles/how-to-switch-models-in-claude-code-with-one-command-16007.md>)

Original publisher: [Read original article](<https://workos.com/blog/claude-code-model-switching-gateway-wrapper>)

Author: WorkOS

Published: 2026-08-14T14:04:26Z

Content type: tutorial

Language: en

Sources: [WorkOS Blog](<https://devfeed.tech/sources/workos-blog.md>)

Topics: [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [API](<https://devfeed.tech/topics/api.md>), [SDKs](<https://devfeed.tech/topics/sdks.md>), [Vercel](<https://devfeed.tech/topics/vercel.md>), [deepseek](<https://devfeed.tech/topics/deepseek.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [commands](<https://devfeed.tech/tags/commands.md>), [deepseek](<https://devfeed.tech/tags/deepseek.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [vercel](<https://devfeed.tech/tags/vercel.md>)

## AI overview

A tutorial explains how to switch models in Claude Code by using a shell wrapper and environment variables with Anthropic-compatible gateways such as Vercel AI Gateway and OpenRouter. It highlights configuration details, including clearing conflicting credentials and correctly setting empty variables, and notes that the Claude Agent SDK inherits the same setup.

## Source excerpt

Claude Code speaks Anthropic's Messages protocol and so do the major gateways. A small shell wrapper points it at any model, with live rate cards to prove it.