CC Switch
CC Switch is a cross-platform desktop app for centrally managing provider configurations across AI coding CLI tools. Official site: ccswitch.co
1.1 Usage
HPC-AI is not included in CC Switch's built-in preset list. Add it as a Custom provider for each app you use.
Prerequisites
- Create an API key at Models Console.
- Install CC Switch from GitHub Releases.
Do not use Universal Provider for HPC-AI. Claude Code and OpenAI-compatible apps require different base URLs, so configure each app separately.
Method 1: CC Switch UI (Recommended)
Repeat these steps for each app you want to connect (Claude Code, Codex, OpenCode, OpenClaw, or Hermes Agent):
- Select the target app from the top selector in CC Switch.
- Click + to open Add Provider.
- Choose Custom (Claude Code, Codex, Hermes) or OpenAI Compatible (OpenCode, OpenClaw).
- Set Name to
HPC-AI. - Enter your HPC-AI API key.
- Set Endpoint URL:
- Claude Code:
https://api.hpc-ai.com/inference - Codex, OpenCode, OpenClaw, Hermes:
https://api.hpc-ai.com/inference/v1
- Claude Code:
- Set the model to
zai-org/glm-5.1, or click Fetch Models (OpenAI-compatible apps) and select it from the list. - Click Add, then click Enable on the provider card.
Method 2: Per-App Configuration Examples
CC Switch writes these files when you save a provider. You can paste equivalent JSON in the provider editor when using the Custom preset.
Claude Code
Endpoint URL: https://api.hpc-ai.com/inference
{
"env": {
"ANTHROPIC_API_KEY": "your-hpc-ai-api-key",
"ANTHROPIC_BASE_URL": "https://api.hpc-ai.com/inference",
"ANTHROPIC_MODEL": "zai-org/glm-5.1"
}
}
Keep API Format as Anthropic Messages (default). If Fetch Models is unavailable for this endpoint, enter zai-org/glm-5.1 manually.
Codex Desktop
Switch to the Codex tab, choose Custom, and set:
- Endpoint URL:
https://api.hpc-ai.com/inference/v1 - Model:
zai-org/glm-5.1 - Do not enable Needs Local Routing (HPC-AI supports the Responses API directly).
CC Switch generates:
~/.codex/auth.json:
{
"OPENAI_API_KEY": "your-hpc-ai-api-key"
}
~/.codex/config.toml:
model_provider = "custom"
model = "zai-org/glm-5.1"
[model_providers.custom]
name = "custom"
base_url = "https://api.hpc-ai.com/inference/v1"
wire_api = "responses"
requires_openai_auth = true
Restart Codex Desktop after enabling the provider, then select zai-org/glm-5.1 in the model picker.
For Codex CLI-only setup (profiles, project config, env_key), see Codex.
OpenCode
Choose OpenAI Compatible:
- Endpoint URL:
https://api.hpc-ai.com/inference/v1 - Model:
zai-org/glm-5.1
OpenClaw
Choose OpenAI Compatible:
- Endpoint URL:
https://api.hpc-ai.com/inference/v1 - Model:
zai-org/glm-5.1
Hermes Agent
Choose Custom or OpenAI Compatible:
- Endpoint URL:
https://api.hpc-ai.com/inference/v1 - Model:
zai-org/glm-5.1 - API mode:
chat_completions
Verify Configuration
- Enable the HPC-AI provider in CC Switch.
- Claude Code: run
claudeand send a test prompt (changes apply without restarting the terminal). - Codex Desktop: restart the app, select
zai-org/glm-5.1, and send a test message. - OpenCode / OpenClaw / Hermes: close and reopen the terminal, then start the tool again.
If Claude Code prompts you to log in on first launch, enable Skip Claude Code initial setup confirmation in CC Switch Settings → General, then restart Claude Code.
1.2 Notes
- Fetch Models: On OpenCode, OpenClaw, Hermes, and Codex, CC Switch calls
GET /v1/modelson the configured endpoint. This requires a valid API key. If the request fails, enterzai-org/glm-5.1manually. - Activation timing: Claude Code supports hot reload. Codex Desktop, OpenCode, OpenClaw, and Hermes require restarting the app or terminal session after switching providers.
- Model ID: Use the exact model ID returned by the List Models API.