CC Switch Configuration
CC Switch is an application that manages the connection configuration of multiple programming tools. After selecting the target tool, add a custom supplier, fill in the name "ShangHai Do", and fill in the site token as the key. SHANHAI_BASE_URL below represents the root address of the ShangHai Do website (without /v1). Please replace it with the real address before copying the configuration. The interface location may change with versions.
Claude Code
Select Claude Code and add a custom supplier:
| field | value |
|---|---|
| Request address | SHANHAI_BASE_URL |
| API Key | Site Token |
| Model | qwen3.8-flash |
| Interface format (if displayed) | Anthropic Messages |
Advanced configuration can incorporate the following:
{
"env": {
"ANTHROPIC_BASE_URL": "SHANHAI_BASE_URL",
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"ANTHROPIC_MODEL": "qwen3.8-flash",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "qwen3.8-flash",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "qwen3.8-flash",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "qwen3.8-flash"
}
}
Save and enable the supplier and then restart the target tool. Avoid leaving another vendor's ANTHROPIC_API_KEY valid at the same time as your current credentials. The model role is set so that the model names used internally in the tool can also be mapped to existing models on this site.
Codex
Select Codex, add a custom supplier, fill in SHANHAI_BASE_URL/v1 for the address, qwen3.8-flash for the model, and select Responses for the interface format.
Fill in the key editing area of CC Switch:
{ "OPENAI_API_KEY": "YOUR_API_KEY" }
Configure the core content of the editing area:
model_provider = "shanhai"
model = "qwen3.8-flash"
[model_providers.shanhai]
name = "ShangHai Do"
base_url = "SHANHAI_BASE_URL/v1"
wire_api = "responses"
Key storage and switching are managed by CC Switch. Do not regard the above key editing area directly as a common login file for all versions of Codex. When manually using environment variable configuration, please see Codex Document.
OpenCode
Add a custom supplier on the OpenCode application page, select OpenAI-compatible, fill in the address SHANHAI_BASE_URL/v1, fill in the site token and add the model qwen3.8-flash. See OpenCode documentation for the complete file format.
Usage Tips
Claude Code’s use of non-Claude models is within the compatible access range of this platform. Anthropic officially does not provide support guarantees for this model routing.
References: CC Switch official repository, Official Chinese user manual.
encountered a problem
If you encounter problems with calling or configuration, please contact the site customer service and provide the model name, error time and error information to facilitate troubleshooting.