> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scitix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CC-Switch

> Learn how to configure CC-Switch with ScitiX Model Inference to switch provider settings for Claude Code and related coding tools.

[CC-Switch](https://github.com/farion1231/cc-switch) is a desktop app (with a system-tray quick switcher) for managing and switching model-provider configurations across AI coding tools — Claude Code, Codex, OpenCode, OpenClaw, and more. You register ScitiX once and switch to it with a click: CC-Switch writes the live config files (`~/.claude/settings.json`, `~/.codex/config.toml` / `auth.json`) atomically, with automatic backups.

Use **Qwen/Qwen3.5-397B-A17B** for both apps — it is served over the Anthropic Messages protocol that Claude Code speaks, and over the Chat Completions protocol that CC-Switch converts Codex traffic into. See the [Models](https://console.scitix.ai/model-inference/models) page for available models.

## How CC-Switch reaches ScitiX

CC-Switch points each tool at a local proxy and forwards requests upstream. **It converts the protocol for Codex but not for Claude Code**, which is why the two apps need different settings:

| App         | Protocol the tool speaks | CC-Switch behaviour                                             | Protocol ScitiX receives |
| ----------- | ------------------------ | --------------------------------------------------------------- | ------------------------ |
| Claude Code | Anthropic Messages       | Maps the model name and injects the key; no protocol conversion | Anthropic Messages       |
| Codex       | Responses                | Converts Responses to Chat Completions                          | Chat Completions         |

The practical consequence: **the model must be served over the protocol that actually reaches ScitiX.** `Qwen/Qwen3.5-397B-A17B` is served over both, so it works for either app.

## Configure Claude Code

Create an API key on the ScitiX [API Keys](https://console.scitix.ai/model-inference/api_keys) page first.

1. Open CC-Switch and select the **Claude Code** app tab.
2. Click **+** (top-right), keep the **App-specific Provider** tab, and choose **Custom** in the Preset dropdown.
3. Fill in:

| Field                         | Value                                                                                         |
| ----------------------------- | --------------------------------------------------------------------------------------------- |
| Name                          | `ScitiX`                                                                                      |
| Endpoint URL                  | `https://api.scitix.ai/model-api`                                                             |
| API Key                       | Your ScitiX API key                                                                           |
| API Format (Advanced Options) | **Anthropic Messages** — Claude Code speaks this protocol and CC-Switch forwards it unchanged |
| Needs Local Routing           | **Off**                                                                                       |
| Model                         | `Qwen/Qwen3.5-397B-A17B` — type it manually, or use **Fetch Models**                          |

4. Claude Code has three model slots (Opus, Sonnet, Haiku). **Map every slot you intend to use to a model served over Anthropic Messages** — selecting a slot mapped to an incompatible model fails with `400 unsupported_protocol`. Besides `Qwen/Qwen3.5-397B-A17B`, both `Qwen/Qwen3.6-27B` and `google/gemma-4-31B-it` work; `google/gemma-3-27b-it` suits the Haiku slot because it is not a reasoning model.
5. Click **Add**, then **Enable** on the ScitiX provider card — it shows "Currently Active". Claude Code picks the change up immediately, no restart needed.
6. In Claude Code, run `/model` and **select one of your custom entries**. Leaving it on **Default** keeps Claude Code's own built-in default model, which ScitiX does not serve.

On this path CC-Switch holds the key itself: it writes `ANTHROPIC_AUTH_TOKEN: "PROXY_MANAGED"` into `~/.claude/settings.json` and points `ANTHROPIC_BASE_URL` at its local proxy — no credential lands in the config file.

## Configure Codex

1. Switch to the **Codex** app tab and click **+** → **Custom**.
2. Fill in:

| Field               | Value                                                              |
| ------------------- | ------------------------------------------------------------------ |
| Name                | `ScitiX`                                                           |
| Endpoint URL        | `https://api.scitix.ai/model-api/v1`                               |
| API Key             | Your ScitiX API key                                                |
| API Format          | **OpenAI Chat Completions** — not Responses; let CC-Switch convert |
| Needs Local Routing | **On** — required for the conversion above                         |
| Model               | `Qwen/Qwen3.5-397B-A17B`                                           |

3. Click **Add** → **Enable**.
4. On this path CC-Switch does **not** hold the key — it writes an `env_key` reference into `~/.codex/config.toml`, and you export that variable yourself:

```bash theme={null}
grep env_key ~/.codex/config.toml
export SCITIX_API_KEY="<Your API Key>"
```

The variable name is derived from the provider name. An `export` only lasts for the current shell session — add it to `~/.bashrc` / `~/.zshrc` to persist.

5. **Close and reopen your terminal** — Codex only reads its config at startup.

<img src="https://mintcdn.com/scitix-adfc65c2/AblxxMM8pLmVYmdt/model-inference/media/ccswitch-provider-config.png?fit=max&auto=format&n=AblxxMM8pLmVYmdt&q=85&s=4e8f32cbe7c602019dc51fb11f48b0c9" alt="CC-Switch — ScitiX provider (Edit Provider page)" width="2000" height="1390" data-path="model-inference/media/ccswitch-provider-config.png" />

## Verify

Switch to ScitiX from the provider card (or the tray icon → app submenu → **ScitiX**), then:

```bash theme={null}
claude    # takes effect immediately
codex     # reopen the terminal first
```

Ask each a test question; a normal reply means the switch worked. Because `Qwen/Qwen3.5-397B-A17B` is served only by ScitiX, a reply naming that model is proof the request went through ScitiX.

<img src="https://mintcdn.com/scitix-adfc65c2/AblxxMM8pLmVYmdt/model-inference/media/ccswitch-claude-reply.png?fit=max&auto=format&n=AblxxMM8pLmVYmdt&q=85&s=4afd503242e618ac0185e6b461e8e882" alt="Claude Code responding via ScitiX (Qwen/Qwen3.5-397B-A17B)" width="2274" height="1120" data-path="model-inference/media/ccswitch-claude-reply.png" />

## FAQ

* **Claude Code says the selected model may not exist or may not be accessible**: You are on the **Default** entry in `/model`, or on a slot mapped to an incompatible model. Run `/model` and pick a custom entry. Claude Code's built-in entries carry a `[1M]` suffix — that belongs to Claude Code's naming, not a model ID, and ScitiX registers no model under it.
* **I see `400 unsupported_protocol`**: The model is not served over the protocol that reached ScitiX. On the Claude Code side, pick a model available over Anthropic Messages; on the Codex side, confirm **Needs Local Routing** is on so Responses traffic gets converted.
* **Codex reports `Missing environment variable`**: Export the variable named in `~/.codex/config.toml`, then reopen the terminal.
* **I cannot delete the currently active provider**: Switch away first, then delete it.
* **Fetch Models fails with 404 or 405**: Type the model ID manually.
* **Can I use a Universal Provider?** Yes. A **Universal Provider** (second tab in the add dialog) registers ScitiX for several apps at once; the per-app protocol differences above still apply, so check each app's format and routing afterwards.

Verified on CC-Switch v3.19.2 (macOS); the UI may shift between versions.
