Coding agents

CC Switch

Use CC Switch to point Claude Code and Codex at RealRelay.ai: import a provider from the console in one click, or add it by hand, then check the connection and choose models.

Protocol
Anthropic Messages · OpenAI Responses
Base URL
https://www.realrelay.ai
Official docs
github.com
Checked against the tool’s docs
2026-10
Experimental. Not yet run end to end against RealRelay.ai. The steps follow the tool’s own documentation; if one fails, contact support with the error.

Overview

CC Switch is a desktop app that manages provider settings for command-line coding agents. Instead of editing each tool's config files, you add a provider once in CC Switch and switch to it. This guide covers its two most common targets on RealRelay.ai: Claude Code and Codex.

  • Claude Code speaks the Anthropic Messages protocol. Its endpoint is the site address without /v1, because Claude Code appends /v1/messages itself.

  • Codex speaks the OpenAI Responses protocol. Its endpoint is the site address with /v1; Codex appends /responses.

  • Either way you need an API key from the API keys page of the console and a model ID exactly as GET /v1/models lists it.

CC Switch only writes configuration; the requests come from Claude Code or Codex, so install those first. Codex works only with the few models RealRelay.ai serves on /v1/responses, such as openai/gpt-5.3-codex. This setup has not yet been run end to end against RealRelay.ai.

One-click setup

The console can hand a key straight to CC Switch through its ccswitch:// link. Install CC Switch first (see Install below) so your browser knows how to open the link.

  1. 1

    Open the key's menu

    On the API Keys page, open the ⋯ menu in the Actions column of the key you want to use, and choose CC Switch.

  2. 2

    Fill in the Import to CC Switch dialog

    Pick the Application, give the provider a Name, and choose a Primary Model (required). For Claude, also set the Haiku, Sonnet and Opus models, so every slot Claude Code uses points at a model your key can call.

    Console → API Keys → ⋯ → CC Switch
    1Application:   Claude2Name:          RealRelay.ai Claude3Primary Model: anthropic/claude-sonnet-4-64Haiku Model:   anthropic/claude-sonnet-4-65Sonnet Model:  anthropic/claude-sonnet-4-66Opus Model:    anthropic/claude-sonnet-4-6
    Console → API Keys → ⋯ → CC Switch
    Application:   CodexName:          RealRelay.ai CodexPrimary Model: openai/gpt-5.3-codex
  3. 3

    Open CC Switch and import

    Click Open CC Switch and allow the browser to open the app. CC Switch shows the endpoint, a masked key and the models. The console turns on Switch to this provider after import; turn it off if you only want to save the provider for later. Then click Import.

The console fills in the right endpoint for you: the site root for Claude and the /v1 address for Codex. Do not choose Gemini in the dialog; RealRelay.ai has no Gemini text model for Gemini CLI. If your console does not show a CC Switch item, the manual steps below give the same result.

Install

Download CC Switch from its GitHub Releases page, or use a package manager. It needs Windows 10, macOS 12, or a Linux with glibc 2.35 and WebKitGTK 4.1 (for example Ubuntu 22.04 or Debian 12) or newer.

macOS (Homebrew)
brew install --cask cc-switch

Or download the .dmg from Releases. The build is signed and notarized and runs on Apple silicon and Intel Macs.

Download the .msi installer, or the portable .zip, from Releases. There are separate arm64 builds for Windows on ARM.

Download the .deb, .rpm or .AppImage for your architecture from Releases. On Arch Linux:

Arch Linux (paru)
paru -S cc-switch-bin

On first launch CC Switch saves your current Claude Code and Codex settings as a provider called default, so you can switch back later.

Configure

To add the provider by hand, pick the tool in the sidebar, click Add Provider (the + button at the top right), choose Custom Configuration, fill in the form and click Add. Replace sk-*** with your key.

CC Switch → Claude Code → Add Provider → Custom Configuration
1Provider Name: RealRelay.ai2API Key:       sk-***3API Endpoint:  https://www.realrelay.ai4Upstream Format: Anthropic Messages (Native)5Main Model:    anthropic/claude-sonnet-4-6

The config editor below the form shows what CC Switch will write to ~/.claude/settings.json. It should contain:

CC Switch → Claude Code → config (settings.json)
1{2  "env": {3    "ANTHROPIC_BASE_URL": "https://www.realrelay.ai",4    "ANTHROPIC_AUTH_TOKEN": "sk-***",5    "ANTHROPIC_MODEL": "anthropic/claude-sonnet-4-6",6    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "anthropic/claude-sonnet-4-6",7    "ANTHROPIC_DEFAULT_SONNET_MODEL": "anthropic/claude-sonnet-4-6",8    "ANTHROPIC_DEFAULT_OPUS_MODEL": "anthropic/claude-sonnet-4-6"9  }10}
CC Switch → Codex → Add Provider → Custom Configuration
1Provider Name:   RealRelay.ai2API Key:         sk-***3API Endpoint:    https://www.realrelay.ai/v14Upstream Format: Responses (native)5Default Model:   openai/gpt-5.3-codex

The editor has an auth.json part for the key and a config.toml part for the endpoint and model:

CC Switch → Codex → auth.json
{  "OPENAI_API_KEY": "sk-***"}
CC Switch → Codex → config.toml
1model_provider = "custom"2model = "openai/gpt-5.3-codex"3model_context_window = 40000045[model_providers.custom]6name = "RealRelay.ai"7base_url = "https://www.realrelay.ai/v1"8wire_api = "responses"9requires_openai_auth = true
  • API Endpoint is the only value that differs between the two: no /v1 for Claude Code, /v1 for Codex.

  • Upstream Format stays on the native option. Both tools then talk to RealRelay.ai directly, and CC Switch's local routing is not needed.

  • For Claude Code, RealRelay.ai accepts the key as ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY. For Codex, CC Switch writes the key into ~/.codex/config.toml when you switch, not into auth.json.

  • model_context_window tells Codex how large the model's window is, because RealRelay.ai's model list does not say. 400,000 fits openai/gpt-5.3-codex.

Then click Enable on the provider's card. Claude Code picks up the change without a restart. Restart Codex, or your terminal, after switching.

Verify

  1. 1

    Call the endpoint directly

    Run the request for the tool you set up, with your key. A JSON reply with an id (msg_… for Claude Code, resp_… for Codex) means the address, key and model work.

    Terminal · Claude Code endpoint
    1curl -sS "https://www.realrelay.ai/v1/messages" \2  -H "Authorization: Bearer sk-***" \3  -H "anthropic-version: 2023-06-01" \4  -H "content-type: application/json" \5  -d '{"model": "anthropic/claude-sonnet-4-6", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with OK"}]}'
    Terminal · Codex endpoint
    1curl -sS "https://www.realrelay.ai/v1/responses" \2  -H "Authorization: Bearer sk-***" \3  -H "content-type: application/json" \4  -d '{"model": "openai/gpt-5.3-codex", "input": "Reply with OK"}'
  2. 2

    Check which provider is active

    In CC Switch, the RealRelay.ai card should be the enabled one for that tool.

  3. 3

    Start the tool

    Start it in a project and run /status. The base URL should be RealRelay.ai and the model the one you chose. Send a short message; the reply confirms the whole path, and the request appears in the console's usage logs.

    Claude Code
    claude/status
    Codex
    codex/status

Models

  • Claude Code: set the main model and the Haiku, Sonnet and Opus models on the provider. Claude Code sends background work, such as titles, to the Haiku slot, so leaving it empty sends a model name RealRelay.ai does not list. Fetch Models next to the model field fills a picker from RealRelay.ai's model list.

  • Codex: add each model you want in /model to the provider's Model Mapping table, with its context window. When Default Model is empty, the first row is used. Codex reads the list only at startup, so restart it after a change.

  • To change models for every new session, edit the provider in CC Switch rather than the tool's own files; CC Switch rewrites those files the next time you switch.

Which models each endpoint serves is listed under Choosing a model. For Claude Code itself, see the Claude Code guide.

Troubleshooting

  • Nothing happens after Open CC Switch. CC Switch is not installed, or the browser blocked the link. Install it, start it once, then click the button again and allow the browser to open the app.

  • Two RealRelay.ai cards. Each click on an import link adds a new provider. Delete the extra card.

  • 404 from Claude Code. The Claude endpoint ends in /v1. Remove it.

  • 404 from Codex. The Codex endpoint is missing /v1. Add it.

  • Codex fails with a model error. The model is not served on /v1/responses. Use a Responses model such as openai/gpt-5.3-codex; plain openai/gpt-5.x, Claude and GLM models are Chat Completions only.

  • The card shows "Needs Routing". The upstream format is not the tool's native one. Set it back to Anthropic Messages (Native) for Claude Code or Responses (native) for Codex.

  • Codex still uses the old provider or model list. Restart Codex. If CC Switch shows a notice to restart the Codex daemon, use it.

  • 401. The key is wrong, disabled, or out of quota. Check it on the API keys page.

  • Claude Code returns 400 naming unknown fields such as context_management: add this to the provider's config to turn off experimental request fields.

    CC Switch → Claude Code → config → env
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"