Built into sc

Any model

Run Claude Code on your Claude plan, an API key, Codex, Grok, OpenCode, OpenRouter or a local server. A profile in config.toml maps each Claude Code role to a model.

The same agent, on three models-u picks one per launch

  • Claude Opuson your own Claude loginsc web research
  • Opus, with DeepSeek subagentsOpus talks to you; quick background work runs on DeepSeeksc -u claude-flash web research
  • DeepSeekfor the whole sessionsc -u fast web research

Its prompt, plugins and memory stay the same.

sc sends each model request Claude Code makes to the provider your profile names, with your own key or subscription. This is built into sc itself, not a plugin. Pick a row in the table below, follow its page to add the endpoint and a profile, then check and launch it.

  1. Check the profile

    sc profiles

    sc prints one row per profile and role: the model that role is sent to. A sonnet or haiku row the profile does not set is shown with a ↑ (^ on a terminal without Unicode) and the model it inherits; a fable row it does not set gets no row.

  2. Launch on it

    sc -u <profile> <project> <agent>

    Claude Code opens on that profile. Without -u, sc uses your top-level default_profile, or direct (plain Claude Code, no gateway) if it is unset.

The recommended setup, Claude Opus on the main loop and DeepSeek V4.1 Flash for subagents, is a five-step walkthrough.

What works#

ProviderHow you payAuthWire formatPage
Claude, on your Claude Code loginyour Claude planClaude Code’s own login: direct, or passthrough in a profileAnthropic, untouchedAnthropic and Claude
Anthropic APIper tokenAPI key, x-api-keyanthropic-messagesAnthropic and Claude
Any Anthropic-compatible APIthe provider’s termsAPI key, x-api-key or beareranthropic-messages, no translationAnthropic and Claude
OpenAI, DeepSeek, Groq, Together, Fireworks, any OpenAI-compatible APIper tokenAPI key, beareropenai-compatAny OpenAI-compatible API
OpenAI Responses APIper tokenAPI key, beareropenai-responsesAny OpenAI-compatible API
OpenCodeOpenCode subscriptionAPI key, beareropenai-compat; some models anthropic-messagesOpenCode
CodexChatGPT Plus or ProOAuth, sc auth codexopenai-responsesCodex
GrokSuperGrokOAuth, sc auth grokopenai-compatGrok
OpenRouterprepaid creditsAPI key, beareropenai-compatOpenRouter
Ollama, LM Studio, vLLM, llama.cppyour hardwarenone (any key string; the server ignores it)openai-compat or anthropic-messagesLocal models
Gemini over Google’s own API——gemini: not yet—

Gemini’s own API is not supported yet: format = "gemini" is reserved and answers 501. Gemini models on OpenRouter work.

How roles map to models

Claude Code names one of four tiers on every request:

TierAsked for by
opusthe main loop on Opus, and subagents that inherit it or ask for Opus
sonnetthe main loop on Sonnet, and subagents that ask for Sonnet
haikusubagents that ask for Haiku, and Claude Code’s small background requests
fablethe main loop or a subagent on Fable, the tier above Opus

A profile maps each tier to <endpoint>/<model-id>, and the gateway sends the request there. Profiles come in two shapes:

  • Hybrid: at least one role is on a passthrough endpoint. Claude Code keeps its login; passthrough and unmapped roles go to Anthropic unchanged, the rest to your endpoints.
  • Full gateway: every role is on your endpoints; your Claude login is not used.

What changes on a full gateway#

  • sc points Claude Code at the daemon on a loopback port with a placeholder token. The status line shows <profile> · <model> · <role>, and the /model picker lists <profile> · <endpoint>/<model>.
  • Claude Code’s auto-mode safety check needs a Claude main-loop model, so sc launches with --permission-mode bypassPermissions: tools run without prompts. Naming your own --permission-mode, or launching with -i, stops that. --permission-mode auto does not help here, because Claude Code falls back to its default mode and prompts on every tool.
  • sc sets CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1, which turns off Claude Code’s model-list probe, telemetry and other non-essential requests.
  • A Fable request fails unless the profile has a fable row.
  • Incognito (-i) works with a full-gateway profile. It refuses a hybrid, because a hybrid needs the daemon’s local proxy in the request path.

What changes on a hybrid#

sc adds no permission flag, and Claude Code’s checks work as in a plain session while the main loop is Claude. If a hybrid’s opus and sonnet rows (and fable, if set) are all passthrough, setting the top-level default_classifier to a [classifiers.<name>] table makes sc launch Claude Code in auto mode; Claude answers the safety check while the main loop is Claude (config.toml).

The chat relay accepts only direct, on either shape, because Claude Code channels need first-party Anthropic auth.

Next: The dashboard

View as Markdown