Skip to main content

CoeOS SE (Simple Edition) — a benchmark-composed LLM router exposed as an OpenAI-compatible API. Routes each request to the model proven best on that skill axis.

Project description

CoeOS SE

One OpenAI-compatible endpoint. Every request routed to the model proven best at that skill.

CoeOS SE is a benchmark-composed LLM router. Instead of picking one frontier model and living with its weak spots, you call a single virtual model — coeos — and each request is classified into a skill axis (debugging, long-form writing, planning, GDPR analysis, …) and relayed to the model that benchmarks proved best on that axis. Streaming, tools, reasoning_effort, thinking budgets — everything passes through untouched.

Not a fusion. Not an ensemble. One classification, one call, to the proven-best model per skill — cheaper and faster than multi-model fusion approaches, and grounded in empirical scores rather than an algorithm.

client (model:"coeos")
   │
   ▼ classify → skill axis        (explicit header, or a fast decider LLM)
CoeOS SE
   │
   ▼ axis → model                 (the TMB Settings: data, not code)
OpenRouter

Quickstart

docker compose up -d
# or: pip install . && coeos-se

Open http://localhost:4600/dashboard, paste your OpenRouter key. That's the whole setup — the bundled routing table (TMB Settings) is imported on first boot, and CoeOS SE polls GitHub daily and offers you the newer table when it lands.

Then point any OpenAI client at it:

from openai import OpenAI

client = OpenAI(base_url="http://localhost:4600/v1", api_key="unused")
r = client.chat.completions.create(
    model="coeos",
    messages=[{"role": "user", "content": "Find the bug in this stack trace: …"}],
)
# → classified as `debug`, served by the model that holds the panel record on it.

Works as-is with agents (Cline, Aider, and anything OpenAI-compatible): set the base URL, use model coeos.

How routing works

  1. Explicit axis — an agent that knows what phase it's in sends x-coeos-axis: plan_spec and skips classification entirely.
  2. Decider LLM — otherwise a small fast model reads the request and picks the single best-matching axis from the configured menu.
  3. Default axis — if classification is ambiguous or the decider is unavailable, the configured default (e.g. code_general) applies.

The chosen axis binds a logical model (e.g. glm-5.2), and the registry maps it to its native OpenRouter id (z-ai/glm-5.2). If the proven-best model can't be served (no key), you get a clear 503 — CoeOS never silently routes to a different model.

Every response carries x-coeos-axis, x-coeos-model and x-coeos-provider headers so you can observe each decision; counters are on the dashboard and GET /admin/coeos/decisions.

You can also bypass the router: call a logical model directly (model: "glm-5.2") or an explicit OpenRouter id (model: "or:z-ai/glm-5.2").

The TMB Settings — routing as data

The taxonomy and bindings live entirely in a JSON file — nothing is hard-coded. Each axis carries its benchmark provenance:

{
  "key": "debug",
  "label": "Debugging",
  "model": "glm-5.2",
  "description": "Find and fix a bug in provided code, stack-trace analysis.",
  "bench": "C02 49/50 (panel record)",
  "verified": true
}

Settings ship exclusively from this repo (the canonical coeos_se/settings/TMB-Settings-SE.json on main) — no manual import. The dashboard shows the running snapshot and offers Update from GitHub when a newer one lands; CoeOS SE also polls daily and surfaces the offer (never applies silently).

The current snapshot binds 18 skill axes, scored by the TMB benchmark panel (30+ models, 5 bench suites) under a hardened judging protocol: the judge scores each grading criterion in isolation (notes-only) and the harness computes every total mechanically — no LLM ever writes a verdict or adds numbers. Models move monthly; the table is regenerated when the panel does. Watch the repo for updates.

Adding an axis = adding a JSON entry. Five axes or fifty, same engine.

Works with your tools — both wire protocols

CoeOS SE speaks OpenAI (/v1/chat/completions) and Anthropic (/v1/messages, streaming included). Point Claude Code at it with ANTHROPIC_BASE_URL — claude tier names route automatically (opus/sonnet → coeos, haiku → the fast axis). Codex, Cline, Continue, OpenCode, Aider and any OpenAI SDK use <base>/v1 + model coeos.

Open /endpoints on a running server for copy/paste setup snippets per client.

API surface

Endpoint Purpose
POST /v1/chat/completions OpenAI surface (coeos, logical, or or:<id>)
POST /v1/messages (+ /count_tokens) Anthropic surface (Claude Code, Anthropic SDKs)
GET /endpoints copy/paste client setup snippets
GET /v1/models CoeOS + the registry's logical models
GET /admin/army the model roster (display names)
GET /admin/settings-update (+ /apply) check / apply the latest TMB Settings from GitHub
GET /admin/coeos/decisions routing counters
PUT /admin/providers/openrouter set / clear the key
GET /health status

Set COEOS_API_KEY to require a bearer key on /v1/* and /admin/*.

Configuration

One file (coeos-config.json, or COEOS_CONFIG): the OpenRouter key + the imported settings. The key can also come from the OPENROUTER_API_KEY env var. See .env.example. CoeOS SE polls COEOS_SETTINGS_URL (the TMB Settings on GitHub) every COEOS_UPDATE_INTERVAL seconds (default 24 h).

Why cloud-only? (and what the full CoeOS is)

CoeOS SE is the Simple Edition: OpenRouter, keys only, by design. The full CoeOS runs inside OdyssAI-X — the same benchmark-composed routing over your own hardware: local MLX model pools, distributed clusters, cloud fallback, and the sovereign local regime where no request leaves your network. SE is a taste of that, in one docker compose up.

Development

pip install -e ".[dev]"
pytest
coeos-se --port 4600

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coeos_se-0.3.1.tar.gz (466.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coeos_se-0.3.1-py3-none-any.whl (457.7 kB view details)

Uploaded Python 3

File details

Details for the file coeos_se-0.3.1.tar.gz.

File metadata

  • Download URL: coeos_se-0.3.1.tar.gz
  • Upload date:
  • Size: 466.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for coeos_se-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5f2acfd0ec54f372382aeba1fac12da3c1327176113c6c58b658c01ec48a3953
MD5 3cde103e462855bc9ae6fdbd796ffe04
BLAKE2b-256 b094c358ebb94b92cf6bcecb2a4521a99214d3e0242fede5334ecece4ed4669d

See more details on using hashes here.

File details

Details for the file coeos_se-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: coeos_se-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 457.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for coeos_se-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e50cddc18b78fabca86dd2b714b27fbc6d542fceb92aadf4dd52c90d64ad5f7
MD5 50d53c58426fc14b1c98328d700cca7e
BLAKE2b-256 d2c1cd57b8265058e680ae2e00a520d3ae69dfb16097102b771a076ce69d5397

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page