Add a Claude provider
Create or import a provider in the CC Switch desktop app, including API endpoint, model mapping, and authentication.
Use CC Switch to switch Claude Code providers from a desktop app, route requests through a local endpoint, add failover, and track usage without repeatedly editing shell profiles.
A Claude Code provider switcher lets developers choose which upstream AI provider Claude Code uses. CC Switch adds a local control plane for provider switching, OpenAI-compatible routing, Codex OAuth routing, failover, request logs, and usage visibility.
Short facts for search engines, AI assistants, and developers evaluating Claude Code routing.
| Primary use case | Switch Claude Code providers without editing every project or terminal profile. |
|---|---|
| Local routing | Supported through the CC Switch local endpoint, commonly http://127.0.0.1:15721. |
| Provider formats | Claude-compatible, OpenAI-compatible, Codex OAuth, and gateway providers when configured correctly. |
| Restart behavior | Claude Code can usually reload provider changes; some Codex workflows require restarting the terminal. |
| Data model | Provider settings and API keys are designed to stay on the local device. |
Create or import a provider in the CC Switch desktop app, including API endpoint, model mapping, and authentication.
Turn on local routing if the upstream provider is OpenAI-compatible, Codex OAuth, or needs request format conversion.
Enable the provider from the Claude provider list or system tray so Claude Code uses the selected route.
Open Claude Code, send a test request, and review request logs, token usage, cache hits, and failover status in CC Switch.
| Capability | CC Switch | Manual environment variables | Single proxy |
|---|---|---|---|
| Provider switching | Desktop-managed provider list and tray switching | Edit shell profiles or project settings manually | Depends on proxy configuration |
| OpenAI-compatible routing | Local router can translate and forward supported requests | Usually not enough by itself | Possible but often provider-specific |
| Failover | Built-in health checks and backup provider routing | Manual recovery | Requires custom logic |
| Usage visibility | Requests, tokens, cache hits, cost, and quota | Not tracked | Mostly proxy logs |
These pages explain the exact workflows behind Claude Code provider switching, local routing, failover, and usage tracking.
Choose the active provider for supported AI coding tools.
Popular workflowRun a local routing endpoint for format conversion and request control.
Popular workflowRoute each coding app to the provider that fits its workflow.
Popular workflowKeep requests moving when a primary provider fails.
Popular workflowTrack requests, tokens, cache hits, cost, and quota.
Popular workflowFind quick answers for setup, routing, and provider behavior.
Yes. CC Switch can manage provider configuration and local routing so Claude Code requests use the selected provider without repeatedly editing project files or shell profiles.
Yes, when local routing and the correct API format or model mapping are configured, CC Switch can route Claude Code requests to supported OpenAI-compatible gateways.
Yes. Codex OAuth workflows should be added as Claude providers and used through CC Switch local routing, then Claude Code should be started from a normal terminal.
No. CC Switch is an independent open-source project. It does not replace Claude Code; it manages provider switching and local routing around supported AI coding tools.
Download CC Switch or start with the provider switching guide.
Download freeRead provider docs