SferenceCode

Route your coding agents through sference: one command per harness, open models behind the same agent loop, and per-engineer spend you can see.

SferenceCode

SferenceCode runs your coding agents on open models. Claude Code, Pi, opencode, Codex, and Cursor keep working exactly as they do today — the harness, the tools, the workflow — but the model calls behind them go to sference instead of a closed provider.

You get open-model token prices, a per-request audit trail, and per-engineer spend attribution. The agent loop is unchanged.

Why route a coding agent

Coding agents are the most token-hungry thing most teams run: a single refactor is hundreds of model calls, each resending a long system prompt and tool definitions. That is exactly the workload where open-model prices and prefix caching compound.

Closed providerSferenceCode
Price per 1M tokensfrontier pricing0.20 / 0.60 (GLM-5.3-Flash) to 3.00 / 15.00 (Kimi-K3)
Cached inputpremium cache-writeno cache-write charge; cached input at 10–35% of input
Per-engineer attributionusually per keyper key, per harness, per engineer
Model choicethe provider's lineupany catalog model, or your own fine-tune

One command per harness

curl -fsSL https://raw.githubusercontent.com/s-ference/sference/main/install.sh | sh
sference auth login --api-key 'sk_...'

Then launch your harness:

HarnessCommandPage
Claude Codesference launch claudeClaude Code
Pisference launch piPi
opencodesference launch opencodeopencode
Codex CLIsference launch codexCodex
Cursorsference launch cursor (configures Cursor; does not start it)Cursor

Each launcher points that harness at sference and starts it (Cursor is configured only). Your existing providers and logins stay available.

What the launchers write

sference launch <harness> edits only that harness's config — ~/.pi/agent/models.json for Pi, ~/.config/opencode/opencode.json for opencode, and so on. Run it with --dry-run to print the config and command without launching anything.

Per session or per machine?

There are two ways to put Claude Code on sference. Pick by whether you want to keep Claude models in the mix.

sference launch claudeSference Switch
ScopeThe session it startsEvery Claude Code session on the Mac, after a one-time sference-switch claude on
Claude modelsNone. Every alias, sub-agents included, runs on one sference modelKept. Requests you don't route to sference go to Anthropic with your normal login
RoutingOne model per session; change it with /model or --modelPer model family, for example sonnet on GLM and opus on Anthropic
PlatformsmacOS, Linux, WindowsmacOS only (beta)
Codexsference launch codex for one session (Codex)Opt-in profile, codex --profile sference

Use the launcher for scripted runs, CI, and sessions you want entirely on open models. Use Switch when you want open models as part of your everyday Claude Code setup without giving up Claude.

Choosing a model

ModelInput / output per 1MUse for
zai-org/GLM-5.3-Flash0.20 / 0.60Fast edits, formatting, small refactors, agent routing
zai-org/GLM-5.31.20 / 4.20General coding turns; the default for most harnesses
deepseek-ai/DeepSeek-V4.1-Flash-10170.50 / 1.50Long-context work at low cost
moonshotai/Kimi-K33.00 / 15.00Hard planning turns, multi-file reasoning

Start on GLM-5.3, move routine turns to Flash, and reserve Kimi-K3 for the turns that actually need it. Live ids and rates: GET https://api.sference.com/v1/models.

Coming soon: sference/auto is not available on the public API yet.

What to expect

It is a compatibility layer. Open models plan differently and call tools less reliably than frontier closed models on long repo work. It is genuinely useful for scripted runs, bulk refactors, and cost-sensitive loops. Validate on your own repository before committing a workflow.

Two calls per prompt is normal. Claude Code fires a separate title-generation request alongside your turn. sference detects it, caps it, and forces reasoning off so it does not burn tokens. Seeing two requests per prompt is expected.

Thinking works, signatures do not. Reasoning models stream thinking blocks that render normally, but signature is empty; multi-turn thinking continuity is best-effort.

Prefix caching is the main lever. Every agent turn resends the system prompt and tool definitions. Keep them stable and first, and those tokens bill at the cached rate. See Prompt caching.

Spend attribution

Every request records the key that made it, so spend splits by engineer and by harness. GET /control/v1/usage/by-key and GET /control/v1/activity give the breakdown; see Usage & analytics.

Give each engineer their own key (or their own harness profile) and the console's usage view answers "who spent what" without any instrumentation on your side.