cc-switch is a free, open-source desktop GUI that manages the API settings of several AI coding tools in one place: enter the MYAI168 endpoint and key once, and switch Claude Code, Codex and other tools to MYAI168 with one click — no manual editing of each tool's config files.
This guide walks through: 1. Install → 2. First launch → 3 & 4. Add a MYAI168 provider (Claude Code / Codex) → 5. Enable and verify → 7. Troubleshooting. It is written against v3.20.4 (September 2026); button and field names may differ slightly in your version.
Ten tools: Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, Hermes Agent, Pi and MiniMax Code. cc-switch only manages settings — it does not include the tools themselves, so install the tools you want to use first.
CC-Switch-v{version}-Windows.msiCC-Switch-v{version}-Windows-arm64.msiCC-Switch-v{version}-Windows-Portable.zip — unzip it anywhere and run CC-Switch.exeWindows may show a blue "Windows protected your PC" window, a general notice for less frequently downloaded software. Click "More info" → "Run anyway".
Right-click the downloaded .msi → Properties → on the General tab tick "Unblock" at the bottom → OK, then double-click it again.
After opening "CC Switch":
First complete the installation and "2. Create the apiKeyHelper" on the Claude Code CLI Windows page, then return to cc-switch. In this guide the Claude Code key always comes from the apiKeyHelper script — the cc-switch card neither takes nor stores the key:
ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN (full example in "3. Configure MYAI168 (Method A)" on the Claude Code page).| Field | Value |
|---|---|
| Provider Name | MYAI168 (any name you like) |
| API Key | Leave empty (the key is supplied only by the apiKeyHelper script) |
| API Endpoint | https://www.myai168.com/en/api/anthropic (no /v1 at the end) |
| Model Mapping: Opus | claude-opus-5-5 |
| Model Mapping: Sonnet | claude-sonnet-5-5 |
| Model Mapping: Haiku | claude-haiku-4-5 |
| Model Mapping: Fable | claude-fable-5-1 |
| Default fallback model | claude-opus-5-5 |
To always use Opus, you can map all four roles to claude-opus-5-5. Model IDs must exactly match this site's accepted list (for example claude-opus-5-5, not claude-opus-5.5); "Fetch Models" does not work while the API Key is empty, so type the IDs by hand.
First install Codex as described on the Codex CLI Windows page, then return to cc-switch:
| Field | Value |
|---|---|
| Provider Name | MYAI168 |
| API Key | Your MYAI168 developer key |
| API Request URL | https://www.myai168.com/en/api/openai/v1 |
| Model Name | gpt-6.1-sol (the custom template may default to another model — change it to this) |
cc-switch (v3.20.1 and later) writes the endpoint, the model and the key to %USERPROFILE%\.codex\config.toml — the key goes in the experimental_bearer_token field of the provider table, so no environment variable is needed. %USERPROFILE%\.codex\auth.json is reserved for the official ChatGPT account login and never holds the MYAI168 key.
Note: by default, switching to a third-party provider such as MYAI168 makes cc-switch delete %USERPROFILE%\.codex\auth.json (the official ChatGPT login). If you also sign in to Codex with a ChatGPT account, first turn on "Keep official login for direct switches" in the cc-switch settings. If Codex starts with a warning that disable_response_storage is ignored, it comes from an old line in the cc-switch custom template and does not affect usage.
Check that base_url and model are correct in PowerShell with the command below (the output contains your key, so do not screenshot or share it):
Get-Content "$env:USERPROFILE\.codex\config.toml"
After you click "Enable" on a card it is marked as in use. You can also right-click the CC Switch tray icon and click a provider name to switch.
| Tool | When the change applies |
|---|---|
| Claude Code | Immediately (a running Claude Code reloads its settings automatically). |
| Codex, OpenCode, OpenClaw and other tools | After you close and reopen PowerShell (or restart the tool). |
claude or codex and ask: What is 123456 times 789? Reply with the number only.Do not verify with "Who are you?" — a model's self-description is unreliable. To go back to an official account, add an official preset card (for example Claude Official or OpenAI Official), enable it, and follow that tool's login flow.
OpenCode, OpenClaw and Hermes can keep several providers at once in cc-switch, so their card buttons differ from Claude Code and Codex: "Add" writes the provider into the tool's config file (and then turns into "Remove"); OpenClaw also has "Set Default" to pick the default model, and Hermes has "Enable" to switch the provider in use.
opencode.json directly as described on the OpenCode Windows page (the simplest route).ANTHROPIC_API_KEY or OPENAI_API_KEY, which override the settings cc-switch writes. Click "View Details", select them and delete them (a backup is made first), or remove them yourself under System Properties → Advanced → Environment Variables, then reopen PowerShell.%USERPROFILE%\.cc-switch\ (mainly cc-switch.db) and automatic backups in %USERPROFILE%\.cc-switch\backups\. Before a major upgrade, copy cc-switch.db somewhere safe.%USERPROFILE%\.cc-switch\ too if you want to remove its settings). Each tool keeps the settings that were last enabled and keeps working.