# Configure Model Provider Source: https://ofox.io/docs/integrations/claude-code/model-provider We recommend using [CC Switch](https://github.com/farion1231/cc-switch?utm=ofox_ai) to complete the configuration — an open-source provider management tool with a visual interface, no need to manually edit JSON or environment variables. > **Set up faster with Ofox Desktop.** On an Apple silicon Mac, Desktop can detect this tool, back up its current configuration, and apply an Ofox API key and compatible model. [Open Ofox Desktop](https://ofox.io/desktop). ## 1. Install CC Switch ### macOS ```bash brew install --cask cc-switch ``` Or go to [Releases](https://github.com/farion1231/cc-switch/releases?utm=ofox_ai) to download the `.dmg` for manual installation. ### Windows Go to [Releases](https://github.com/farion1231/cc-switch/releases?utm=ofox_ai) to download the `.msi` installer. ### Linux ```bash # Debian / Ubuntu sudo dpkg -i CC-Switch-*.deb # Fedora / RHEL sudo rpm -i CC-Switch-*.rpm # AppImage chmod +x CC-Switch-*.AppImage && ./CC-Switch-*.AppImage ``` Supports macOS 12+, Windows 10+, Ubuntu 22.04+ / Debian 11+ / Fedora 34+ ## 2. Add OfoxAI Provider ### Step 1: Add a New Provider Open CC Switch, go to the provider management page, and click the **+** button in the upper right corner. ![CC Switch Add Provider](https://ofox.io/images/integrations/cc-switch-add-provider.png) ### Step 2: Fill in the Configuration Fill in the fields as shown in the image below, then click **+ Add** to complete. ![CC Switch Provider Configuration](https://ofox.io/images/integrations/cc-switch-provider-config.png) | Field | Value | Description | | --- | --- | --- | | ❶ Provider Name | `ofoxai-claude` | Custom name for easy identification | | ❷ Website URL | `https://ofox.io` | Provider website | | ❸ API Key | Your OfoxAI API Key | Get it at [app.ofox.io](https://app.ofox.io/manage/api-keys?utm=ofox_ai) | | ❹ Request URL | `https://api.ofox.io/anthropic` | Do not add a trailing slash | | ❺ API Format / Auth Field | `Anthropic Messages (Native)` / `ANTHROPIC_AUTH_TOKEN (Default)` | Keep defaults | | ❻ Model Configuration | Leave empty | Leave empty to use the default Claude model | | ❼ Options | Check "Hide AI Signature" and "Teammates Mode" | Check as needed | | ❽ Write to Global Config | ✅ Checked | Writes to global config, applies to all projects | CC Switch automatically writes to `~/.claude/settings.json` — no manual file editing required. ### Step 3: Activate the Provider After adding, return to the list, select `ofoxai-claude`, and click the **Use** button. A "Switched successfully" notification confirms the setup is complete. ![CC Switch Activate Provider](https://ofox.io/images/integrations/cc-switch-activate-provider.png) ## 3. Verify Configuration Navigate to your project directory and start Claude Code: ```bash cd your-project claude ``` On first launch, press `Esc` to skip login. After startup, check the top info bar and confirm it shows **API Usage Billing** (❶), indicating billing through OfoxAI: ![Claude Code Startup Screen](https://ofox.io/images/integrations/claude-code-startup.png) If the above information is correct, the configuration is successful. ## 4. Use Other Models With OfoxAI, you can use non-Claude models (such as Qwen, GLM, DeepSeek, etc.) in Claude Code. Simply filter compatible models from the Model Plaza and configure model mapping. ### Step 1: Filter Compatible Models Go to the [OfoxAI Model Plaza](https://ofox.io/models?utm=ofox_ai), and select **Anthropic** under **API Protocol** on the left sidebar to filter models that support the Anthropic protocol. ![Filter Anthropic protocol in Model Plaza](https://ofox.io/images/integrations/claude-code-model-plaza-filter.jpeg) ### Step 2: Copy the Model Name Click on the target model card — there's a **copy button** next to the model name to copy the model ID with one click. ![Copy model name with one click](https://ofox.io/images/integrations/claude-code-model-copy-name.jpeg) ### Step 3: Configure Model Mapping Go back to CC Switch and find the **Model Mapping** section in the provider configuration. Fill in the copied model name into the corresponding model slots. Browse compatible models at the [OfoxAI Model Plaza](https://ofox.io/models?utm=ofox_ai): | Mapping Slot | Description | |---------|------| | **Primary Model** | Default model used by Claude Code | | **Thinking Model** | Model for deep reasoning | | **Haiku Default** | Lightweight task model | | **Sonnet Default** | Medium complexity task model | | **Opus Default** | High complexity task model | If the provider natively offers Claude series models, model mapping is usually not needed. Only fill this in when you need to map requests to different model names. ## Troubleshooting If you encounter issues, run `/status` in the Claude Code terminal to check the configuration: ``` /status ``` Verify the following key fields: - **❶ Anthropic base URL** is `https://api.ofox.io/anthropic` - **❷ Model** shows the currently active model ![Claude Code /status Output](https://ofox.io/images/integrations/claude-code-status.png) **Q: "Authentication error" message** Confirm the `Anthropic base URL` is correct and check that the API Key is valid. **Q: Connection timeout** Verify the request URL is `https://api.ofox.io/anthropic` with no trailing slash. **Q: Streaming response lag** OfoxAI has built-in global acceleration. This is usually a local network issue — check your local connection and retry.