cyberine
UsageRun recipes

Machine-readable route recommendation — cyberine route --json (T62)

cyberine route --json "<task>" emits a stable JSON object designed for non-Cyberine callers (e.g. a Claude Code subagent dispatcher) that need to ask Cyberine "what tier should this task run at" without spinning up a fleet. Human-readable output is unchanged when --json is omitted.

Stable schema (fields always present):

{
  "task": "...",
  "tier": "trivial | standard | complex",
  "kind": "qa | code-small | code-large",
  "confidence": 0.9,
  "source": "deterministic | llm",
  "workers": ["claude", "codex"],
  "perWorkerModel": { "claude": "claude-sonnet-4-6", "codex": "(default)" },
  "recommendedModelTier": "sonnet | opus",
  "recommendedMode": "swarm | compete",
  "llmReasoning": "...",
  "workerDetails": [ ... ],
  "reasons": [ "..." ],
  "routing": { "version": 2, "candidates": [ ... ], "...": "see Routing-explain below" }
}

recommendedModelTier maps the routing result to an Anthropic model tier so callers do not need to interpret kind/tier themselves:

kind / tierrecommendedModelTier
qa or trivialsonnet
code-small or standardsonnet
code-large or complexopus

perWorkerModel is a flat record of worker-id -> resolved model string (variant-aware, but env overrides are NOT reflected — the override wins at dispatch time, not here).

workerDetails carries full per-worker profile metadata (variant choice, cost model, tier) for callers that need deeper inspection.

# Ask Cyberine what tier to use for a task — shell-out friendly
cyberine route --json "refactor the auth module across many files"
# -> recommendedModelTier: "opus"

cyberine route --json "what is 2+2"
# -> recommendedModelTier: "sonnet"

cyberine route --json "fix the off-by-one bug in pagination"
# -> recommendedModelTier: "sonnet"

# Parse with jq
cyberine route --json "analyze this codebase" | jq '{tier, kind, recommendedModelTier, workers}'