Routing Policy

Omegon's routing layer selects concrete provider/model combinations for each inference request based on three constraints: capability tier, thinking level, and context class.

Selection Flow

  1. Filter to authenticated providers — only models with configured API keys or active OAuth sessions are considered
  2. Match capability tier — filter to models that satisfy the requested tier (higher tiers can serve lower requests)
  3. Check context floor — exclude models whose context ceiling is below the session's required minimum
  4. Apply provider preference — order by the operator's provider preference (default: Anthropic first)
  5. Check cooldowns — exclude providers/models that are in a cooldown period from recent failures
  6. Select best candidate — first viable match wins

Downgrade Classification

When a model switch would change the context class, the harness classifies the transition:

ClassificationActionExample
CompatibleAuto-reroute (silent)Legion → Clan (1 class, within floor)
Compatible with CompactionAuto-compact if safeFloor bridgeable, no pin crossed
DegradingOperator confirmation requiredLegion → Squad (3-class drop)
IneligibleExcluded from candidatesTier mismatch, thinking constraint

Failure Recovery

Upstream failures are classified into recovery actions:

Route Matrix

A reviewed snapshot of provider/model context ceilings is embedded in the binary at compile time. Runtime routing never trusts live provider claims. The matrix is updated through a scheduled refresh pipeline that detects drift, classifies changes, and requires human review for context decreases or route removals.