Every free and paid model source in one token pool — classified, ranked, swapped when one runs dry

Pool

Claude on the Max plan does the judging. Everything easy runs on free tokens, and when one free source runs dry the next takes over.

Each person's computer runs one Pool: OmniRoute (MIT) on 127.0.0.1:20128, holding that person's own free accounts. kun decides which sources exist and how they rank; Machine installs the Pool, takes the keys and shows its health.

Use it

You typeYou get
fClaude Code on the Pool (class code), or Nous direct when the Pool is not ready
f --pool longf on a named class
f --directf straight to Nous, skipping the Pool
oopencode on the Pool, class long by default (kun-oc.sh exports the Keychain key; /models picks a Zen model by hand)
o -m omniroute/codeopencode on a named class
lane poolEvery source: status, requests, success rate, plus the combos

Long sessions

One free source is one daily cap: opencode's keyless DeepSeek stops at "You've used today's free messages". A class is a stack of caps. The first healthy member serves, and when it is exhausted or rate-limited the next one serves under the same session, so the context survives the swap. Every source you connect adds its cap to every class it has a role in, so the horizon grows with each key (NVIDIA, Groq, OpenRouter, Mistral). A Zen API key puts DeepSeek Flash into long too.

For a run longer than one sitting, don't count on one session. Keep the plan as a checklist in an issue or a file, commit after each step, and loop short runs that each take the next unchecked step: f --pool long -p "<step>" (or a job on the free lane), or o run -m omniroute/long "<step>" with stdin closed. Claude Max reviews what the free runs produced. long "<goal>" does exactly this for you: see Long mode.

The classes

A class is one kind of work, served by a ranked chain of free models. Ask for the class by name (omniroute/long in opencode, f --pool long for Claude Code) and the Pool picks the model: the first healthy member serves, and when it is out of quota, rate-limited or failing, the next one does. .claude/scripts/harvest/combos.mjs builds each class from the roles of every connected source in providers.json, in catalog order, so connecting a source adds it to every class it has a role in.

ClassUse it forMembers today, in order (2026-11-26)Context
codeWriting and editing code with tools: the default for fHunyuan Flash, Solar Mini 4 (Nous) → Nemotron 3 Ultra, Gemma 4 31B (OpenRouter) → Gemini 3 Flash, 2.5 Flash → gpt-oss-120b, GLM 4.7 Flash, Qwen2.5 Coder 32B (Cloudflare)128K–1M
fastSmall steps: subagents, summaries, classification, triageHunyuan Flash, Solar Mini 4 → Nemotron 3.5 Lightning, Ling 3.2 Flash → Gemini Flash-Lite → GLM 4.7 Flash, gpt-oss-120b128K–1M
longLong sessions and big inputs: whole repos, long threads, a night's workHunyuan Flash, Solar Mini 4 → Nemotron 3 Ultra, Ling 3.2 Flash → Gemini 2.5 Flash → gpt-oss-120bevery member ≥128K, most 512K–1M
visionReading screenshots and imagesGemini 2.5 Flash → Cloudflare Gemma 4 26B—
thriftycode plus paid rungs at the end, for when free runs out and a paid source is switched onthe code chain; paid rungs only when enabled in providers.json—

How they swap, measured on 2026-11-26: Gemini had used its daily quota (cooling until 07:59 UTC), so vision was served by its second member. Before LongCat was replaced, long was served by its second member too. Nothing restarted; the caller saw an answer.

What may run on a class

Free sources are public: the privacy class in providers.json is public, and free tiers may log or train on prompts. So the classes carry our own work only: code, docs, research, drafts of internal material, media scripts. Anything holding a person's data (a lead's email, a school's WhatsApp message, a parent's name, a contract, a CRM record) and any secret stays on Claude Max: the build, crm and judge lanes in engine.json. This is the same rule as the free lane in Lanes.

DepartmentOn the free classesOn Claude Max
techfeatures, fixes, refactors, tests, docs (code, long)review of what the free runs produced, anything with secrets
video / imagescripts, storyboards, shot lists, captions drafts (long, vision)final approval stays human
marketingpublic copy drafts, research, calendars (long, fast)publishing goes through /approve
salesmarket research, public company lookups (fast)CRM, follow-ups, warm and cold outreach, email replies (crm lane)
supportreading public docs, reproducing a bug on a demo tenant (code)WhatsApp messages, user accounts, replies to schools (build lane)

The sources

.claude/machine/providers.json is the catalog: tier, sign-up link, the keychain name of the key, limits, privacy class, best models per role.

TierMeaningStatus today (lane pool)
keylessno accountOpenCode Zen: direct-ok inside opencode only; a Zen API key adds it to the Pool
freeaccount, no cardNous, Gemini: connected. NVIDIA, Groq, Mistral: needs-key (Groq refuses hotmail sign-ups: use Google). Antigravity: needs-sign-in
free-cappedfree with a hard capCloudflare Workers AI: connected. OpenRouter: connected 2026-11-26, key kun-pool with a $0 credit limit so it can only reach :free models (50 requests/day)
paidoff until funded and decidedOpenRouter top-up, DeepSeek, Cerebras: off
plana subscription, never pooledClaude Max: only in native Claude Code

Add a source

Settings → Model → OmniRoute → Providers → the source → Get key → paste → Save and connect → Test. The key goes to this computer's credential store only, and the Pool re-ranks at once. Three connected sources turns the Free model keys connected step green.

SourceKey fromNote
NVIDIAbuild.nvidia.com, API keysNemotron 3 Ultra 550B, about 40 requests a minute
Google AI Studioaistudio.google.comGemini Flash
Groqconsole.groq.comfastest
Mistralconsole.mistral.aipick the free Experiment plan
OpenRouteropenrouter.ai, Keysset an expiry and a credit limit of 0

Privacy

Free-tier terms bind the account holder, so every key is the teammate's own and lives only in their credential store (service org.databayt.kun.machine). Free providers may read prompts: client data and secrets stay on Claude. The company pays $0; any paid rung is off until funded and recorded with /decide.

Scheduled jobs on the pool

A scheduled job opts in through the free lane in .claude/engine.json: name it in jobs.$lanes (a prefix) or set jobs.<job>.lane to free. kun-claude.sh then runs the job through kun-free.sh on combo long instead of the Max plan, writes the ledger row with lane free and cost 0, and keeps running while the plan is parked. If the free run fails, it retries once on haiku. Same data rule as above: only jobs that touch no client data or secrets belong on it. See Lanes.

The ledger

harvest.mjs runs every 30 minutes (launchd job harvest) and writes ~/.claude/state/harvest.json: per source its status, requests, tokens, success rate and quota. It also feeds Hermes's one-hour Nous key into the Pool and unlocks connections a dead model locked. lane pool, health.sh, Settings → Health and f all read it.

Setup steps

Readiness steps in the agents stage, each with an automatic fix except the last:

StepDoes
omniroute.cliinstalls OmniRoute
omniroute.servicelaunchd service, loopback only, API key required, random admin password
pool.readymints the client key, connects every source with a key, builds the combos
pool.jobinstalls the 30-minute ledger job
pool.keysyou: add three free keys as above

Known traps

  • OmniRoute assumes a 32,768-token window for any model its catalog lacks, and Claude Code's prompt alone is about 34k. providers.json carries the real context window.
  • A 410 on one model (Cloudflare retired kimi-k2.6) locks the whole connection for 24 hours. Keep dead models out of roles; harvest.mjs unlocks and names the model.
  • Nous's Anthropic endpoint wants Authorization: Bearer, not x-api-key.
  • opencode run reads a non-tty stdin as the prompt and waits forever; scripts close stdin.

If a step fails: tail ~/Library/Logs/omniroute.log and cat ~/.claude/logs/harvest.out.