Claude Code
Use Fusion Model in Claude Code through the third-party CC Switch local proxy.
Third-party compatibility notice: CC Switch is not maintained by FUMO Lab. It translates Anthropic Messages requests into OpenAI Chat Completions and translates responses back. Basic chat, streaming, tool calls, reasoning blocks, token accounting, prompt caching, and long-running agent behavior may not map exactly.
Fusion configuration
Use a FUMO Dashboard key for an account registered and funded online.
| Parameter | Value |
|---|---|
| Base URL | https://capi.fumolab.ai/api/fusion/v1 |
| Available model IDs | fusion-max-2.0, fusion-max-1.0, fusion-code-1.0 |
| API protocol | OpenAI Chat Completions API |
| Connection | CC Switch local proxy, normally http://127.0.0.1:15721 |
How it works
Claude Code normally sends Anthropic Messages requests. Fusion exposes OpenAI-compatible Responses and Chat Completions endpoints rather than a native Anthropic Messages endpoint. This guide recommends Chat Completions as the upstream protocol, with CC Switch translating requests and responses for Claude Code.
CC Switch↗ can run a local proxy between them:
Claude Code
→ Anthropic Messages
→ CC Switch on 127.0.0.1
→ OpenAI Chat Completions
→ FUMO
Setup
Step 1: Install CC Switch
Install a current CC Switch release using its official installation instructions↗.
For example, on macOS:
brew install --cask cc-switch
Step 2: Get your FUMO API key
Follow Getting started for online self-service accounts (see Enterprise onboarding for enterprise accounts) to create and store your API key. If you use FUMO and have a sales representative, enter their Sales Code at signup or bind it later as described in Console and account.
Step 3: Add a Claude Code provider
In CC Switch:
- Select Claude Code.
- Choose Add Provider, then create a custom provider.
- Name it FUMO.
- Enter your FUMO API key.
- Open Advanced Options.
- Set Upstream Format / API Format to OpenAI Chat Completions.
- Enable Full URL Mode.
- Enter the Base URL followed by
/chat/completionsas the endpoint:
https://capi.fumolab.ai/api/fusion/v1/chat/completions
Full URL Mode uses this address as-is without appending a request path.
Step 4: Map Claude model roles
Use Fusion Code for each Claude Code role initially:
| CC Switch field | Fusion model ID |
|---|---|
| Main model | fusion-code-1.0 |
| Sonnet model | fusion-code-1.0 |
| Opus model | fusion-code-1.0 |
| Haiku model | fusion-code-1.0 |
You may map the main or Opus role to the authorized fusion-max-1.0 model ID. The public gateway validates each transmitted ID; after acceptance, the Fusion core treats it as a compatibility label, so these mappings do not override the Fusion configuration associated with the key.
Step 5: Enable local routing
- Save and enable the FUMO provider.
- Turn on the CC Switch Proxy toggle.
- Enable application takeover for Claude Code.
- Keep the proxy bound to
127.0.0.1. - Open a new terminal so Claude Code reads the updated environment.
You can check the takeover before starting Claude Code:
echo "$ANTHROPIC_BASE_URL"
The value should point to the CC Switch local proxy, normally:
http://127.0.0.1:15721
Start Claude Code in your project:
cd /path/to/your/project
claude
Validate the bridge
Test in increasing order of complexity:
- Ask a simple text question.
- Ask Claude Code to read one file.
- Ask it to propose a small edit without applying it.
- Apply a small edit and inspect the diff.
- Test a terminal command that is safe to repeat.
- Test a longer, multi-tool task.
Check the CC Switch request logs throughout these tests, including tool names, arguments, streamed tool calls, and stop reasons.
Security
The local proxy can see your API key, prompts, code context, tool calls, and responses. Keep it bound to 127.0.0.1; do not expose the proxy on 0.0.0.0 unless you intentionally need LAN access and have secured it separately.
Review CC Switch releases and source code according to your organization's third-party software policy before using it with private repositories.
Troubleshooting
Claude Code still calls the previous provider
Confirm that Proxy and Claude Code takeover are enabled, then open a new terminal and inspect ANTHROPIC_BASE_URL.
404 from Fusion
Confirm that Full URL Mode is enabled and that the endpoint is the Base URL from the table above followed by /chat/completions.
Text works but tools fail
Inspect the CC Switch proxy logs. Tool definitions, streamed arguments, and tool-result messages cross two API formats and may require adapter changes.
The local proxy is unreachable
Confirm that CC Switch is running and listening on the configured port. If you changed the default port, disable and restart the proxy after saving the new value.
Resources
- CC Switch on GitHub↗
- CC Switch provider configuration↗
- CC Switch proxy service↗
- Fusion Chat Completions API
Supported models: fusion-max-2.0, fusion-max-1.0, fusion-code-1.0. Only Max 2.0 supports low / medium / high / max effort (default medium); the other two models do not support adjustment.
