Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>VSModelSwitchNew to Visual Studio Code? Get it now.
VSModelSwitch

VSModelSwitch

wanghryii

|
11 installs
| (0) | Free
AI CLI provider switcher for Claude Code and Codex in VSCode.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSModelSwitch

English | 简体中文

VSModelSwitch: an AI CLI provider switcher for VSCode.

VSModelSwitch is a VSCode extension for managing Claude Code and Codex providers, API endpoints, API keys, and models from a side-bar UI. It is built for AI coding users who frequently switch between API gateways, model vendors, proxies, and local test environments.

Features

  • Manage Claude Code and Codex providers separately
  • Fetch model lists from provider endpoints
  • Choose models from fetched lists instead of typing model names manually
  • Show each provider as one compact row with quick Apply
  • Refresh and change the model for each provider
  • Show separate Claude and Codex provider/model status items in the VSCode status bar
  • Watch config file changes and refresh status automatically
  • Store API keys locally with VSCode SecretStorage
  • Sync provider metadata with VSCode account sync
  • Show Key missing and Set Key for synced providers without local secrets
  • Import and export public config without secrets
  • Write the active provider to real Claude Code and Codex config files by default
  • Optional sandbox mode for safe testing

Supported Tools

  • Claude Code
  • Codex

Config Writes

By default, VSModelSwitch writes active providers to your real machine config files:

~/.claude/settings.json
~/.codex/config.toml

For safe testing, switch to sandbox mode:

{
  "vsmodelswitch.configTarget": "sandbox"
}

Sandbox mode writes to:

<workspace>/.vsmodelswitch-home

Local Development

Install dependencies:

npm install

Compile:

npm run compile

Run in VSCode:

  1. Open this folder in VSCode.
  2. Press F5.
  3. In the Extension Development Host window, click the VSModelSwitch Activity Bar icon.
  4. Add a Claude Code or Codex provider.
  5. Click Fetch Models.
  6. Choose a model and save.
  7. Click Apply on a provider row.

See docs/validation.md for the full local validation checklist.

Mock Endpoint

Start the mock model server:

npm run mock:models

Use this endpoint for both Claude Code and Codex during testing:

http://localhost:8787

Use any non-empty key, for example:

test-key

Settings

{
  "vsmodelswitch.globalCliSync": true,
  "vsmodelswitch.configTarget": "real",
  "vsmodelswitch.testHome": "",
  "vsmodelswitch.anthropicVersion": "2023-06-01"
}

Packaging

npm run package

Notes

The status bar is based on the currently readable config files and matches saved providers by baseUrl + model. If another VSCode extension changes a model only in runtime memory without writing a config file or exposing a readable API, VSModelSwitch cannot reliably read that in-memory state.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft