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 provider | SferenceCode | |
|---|---|---|
| Price per 1M tokens | frontier pricing | 0.20 / 0.60 (GLM-5.3-Flash) to 3.00 / 15.00 (Kimi-K3) |
| Cached input | premium cache-write | no cache-write charge; cached input at 10–35% of input |
| Per-engineer attribution | usually per key | per key, per harness, per engineer |
| Model choice | the provider's lineup | any 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:
| Harness | Command | Page |
|---|---|---|
| Claude Code | sference launch claude | Claude Code |
| Pi | sference launch pi | Pi |
| opencode | sference launch opencode | opencode |
| Codex CLI | sference launch codex | Codex |
| Cursor | sference 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 claude | Sference Switch | |
|---|---|---|
| Scope | The session it starts | Every Claude Code session on the Mac, after a one-time sference-switch claude on |
| Claude models | None. Every alias, sub-agents included, runs on one sference model | Kept. Requests you don't route to sference go to Anthropic with your normal login |
| Routing | One model per session; change it with /model or --model | Per model family, for example sonnet on GLM and opus on Anthropic |
| Platforms | macOS, Linux, Windows | macOS only (beta) |
| Codex | sference 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
| Model | Input / output per 1M | Use for |
|---|---|---|
zai-org/GLM-5.3-Flash | 0.20 / 0.60 | Fast edits, formatting, small refactors, agent routing |
zai-org/GLM-5.3 | 1.20 / 4.20 | General coding turns; the default for most harnesses |
deepseek-ai/DeepSeek-V4.1-Flash-1017 | 0.50 / 1.50 | Long-context work at low cost |
moonshotai/Kimi-K3 | 3.00 / 15.00 | Hard 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.
Claude Code
One-command launch: every model alias pinned to one sference model, switch with /model.
Sference Switch
Keep Claude models and route per model family to sference, from a macOS menu bar app.
Pi
Provider block in ~/.pi/agent/models.json, picker scoped to sference.
opencode
sference provider in opencode.json with the full catalog in the picker.
Usage & analytics
Per-key and per-member spend attribution.
Requests at scale
Move tens of thousands of requests through sference without serializing them one by one.
Sference Switch
A macOS app and local gateway that routes Claude Code between Anthropic and sference model by model, so Claude models keep working alongside open models. Codex is supported through an opt-in profile.