Make Codex and Claude Code subscriptions go further: a local model router that gives routine agent work to economical models and keeps your strongest model for the hard parts.
Decision models, routing and competence
Code map · Architecture · Gateway map · Decision API v1
Built-in decision models supply judgments for HiRoute routing policy. Custom extensions select a category/group directly; HiRoute owns candidate execution for both. Difficulty routing uses one task scope and regular/primary groups; custom routing first selects a task category, then its regular/optional primary group. Tool selection is protocol documentation only, with no current runtime or product entry.
Start with a user path
Frozen configuration
The publication projection keeps branch/reasoning execution keys distinct from source binding identities. Credential admission and attempt leases use the frozen source binding to check current Native membership.
Decision domain types own immutable saved connection revisions and judgment settings; definition types own categorical/ordinal questions. Plans freeze the selected connection. Built-in execution freezes prompts, thresholds and rubric; new custom execution omits judgment while source drafts keep parked values. Editing a connection or draft does not reinterpret a published plan or historical stage. Branch overrides are complete copies; a category without primary candidates needs no degree question.
Desktop calls connections decision models or custom extensions; CLI retains
decision services list/apply/test. Writes reuse Operations, protected input and
existing Secret storage. Custom HTTP belongs to a saved connection, not inline
rest authoring. Current development v1 replaces the earlier decision shape;
the custom-extension v1 shape has no old-format negotiation. New native publications freeze historical problem applicability in the existing System One
wire envelope. Earlier built-in frozen publications keep their original execution semantics.
Editor input/readback has no native protocol or background selection. Effective native authoring records the current internal protocol, with a fixed eight-turn background. Compiled execution freezes actual fixed/effective content and digest. Legacy omission remains frozen execution support only and is registered for supported old publications and retained Operation validation, which checks the original editor against already sealed settings without replaying completed effects. Default assessments resolve to the current default at the next edit/publication; custom text stays exact. The released-input adapter recognizes exact legacy default instructions and all criteria. Existing publications are never rewritten; assessment inheritance and thresholds keep their existing owners. Desktop has one connection test with the current request example; CLI/acceptance retains the explicit maximum-shape diagnostic.
Provider and routing policy
Bailian, OpenRouter Jev, TypeSafe and compatible connections share the typed
model/state/questions adapter. Endpoint/model/limits are connection settings.
See System One mapping for
provider-specific configuration and custom v1
for the extension boundary. Add a separate adapter only for an actual incompatible
wire protocol; a provider name alone does not justify one.
The native adapter binds each question to a category, degree or historical assessment, then reduces only the selected path. Custom extensions receive route shape and safe history, choose category/group directly, and own their policy and context trimming. HiRoute retains candidate selection and relay. The custom codec verifies actual preceding-stage Plan/connection identity locally and discards assessment if the response changes category. Trimming inside the assessment target marks that assessment partial; loss of an earlier prefix does not by itself invalidate the scored stage.
C allocation partitions prior context, actual assessed stage and latest user. It reserves the third question before target admission, removes optional background first and never refills history after a partial target frees question bytes. Already-bounded interrupted/unknown turns stay in the continuous background suffix; execution status and target-score eligibility are separate. The shared immutable native category v1 template feeds native compilation; transport consumes the frozen decision. Freeze records default/custom assessment intent for every scope before hashing. Legacy native wording has its own current definition, independent of the C fixture. C applicability only gates an otherwise eligible low-score protection opportunity. Invalid or unavailable applicability retains that opportunity conservatively; category, degree, rubric validity, inheritance and relay retain their separate owners.
For built-in connections, group_policy.rs uses the current simple probability and applicable complete
assessment for the same category, plan revision and rubric. Each new user turn
runs a fresh decision: it neither preserves an old upgrade cursor nor blindly
returns to regular. Missing/partial scores remain unrated. Recognized tool
continuations reuse the frozen decision only while history and authority permit.
ContextHold binds exact route,
version, protocol, authorization and session; unrelated plan publication does not
invalidate that route, and each request still reauthorizes. Message-prefix continuity is
separate from system-instruction validity: history entry
distinguishes continuing, shortened, otherwise rewritten and unavailable checkpoints. Turn history
records the opening cause on completion; timeline projection
prefers it over legacy ledger inference. Boundary regressions
cover persistence, unknown evidence and old canonical bytes.
The ingress adapters normalize
supported protocol history into the same representation before prefix checks;
Chat reasoning aliases share one state while their native fields remain intact.
The planner always prefers a valid held candidate within the newly selected group, including an in-group backup; retired follow-up fields survive only at serialized compatibility boundaries. It reuses eligibility, protocol projection and bounded relay. Regular candidates may relay to the same category's primary group; primary exhaustion fails. Duplicate candidate identities are tried once. Same-turn continuations can retain an actual primary availability relay, but that fact neither rewrites the original decision nor survives a new user turn.
Observation and public consumers
Execution receipts and quality queries own evidence identity: actual category/group/candidate position, model/reasoning, plan revision and frozen rubric. Opening selection probability/reason is distinct from a later competence score. Summary and drill-down use the same identity; missing or partial assessments do not enter averages.
All-decision C summaries
read the existing route events and safe-fact projection, independently of stage
pages and score/model filters. The existing observation query v2 opts in with include_routing_observations;
omission preserves released fields, authorization and cursor bindings. The Application reader retains the released identity for existing queries under current Local Control admission.
Product presentation
shows counts, denominators, cohorts and coverage; it does not infer accuracy.
Every current classifier decision records its protocol. Known non-C decisions stay
separate, so mixed current scopes retain rates; authenticated supported pre-applicability records also count as known non-C. The existing bounded projection refresh retains format/routing/time evidence from verified carriers; unproven records and projection gaps remain partial. Plan identity alone never proves a protocol. Content-only deletion retains safe evidence; full fact retention/deletion removes it.
The model row projection
associates configured candidates with retained execution by declared position and
reasoning, not display name or a freshly materialized model ID. The shared stage
view reads recorded execution facts even if the current plan has changed.
The observation plan-quality samples CLI exposes the same query; its
command registry, generated manifests
and CLI entry tests must remain aligned.
| Published surface | Canonical owner / check |
|---|---|
| Custom extension protocol and samples | API guide, examples, generator, OpenAPI |
| Official optional Jev service | Extension, with the same v1 contract |
| Website decision pages and downloads | Renderer, content preparation, website checks |
| UI/CLI instructions | Website guides, standalone CLI |
| Routing cost explanations and FAQ | Bilingual articles, homepage, frozen-evidence cache calculation |
| Illustrations and native screenshots | Component capture, fixture checks, asset provenance |
Documentation fixtures and native windows with constructed observation records illustrate the product. Neither capture method proves live-provider behavior or answer quality; acceptance records must identify the actual revision and scenario.
The session timeline uses a read-specific selection to expose opening historical-protection evidence while preserving the stored decision. The protection evidence guard checks complete matching Plan, revision, time and branch scope before placing a released-decision count beside protected stages. Product requirements belong to smart-saving routing and session history.
Custom observations carry extension identity and an optional bounded reason without a competence floor. Complete scores remain scored coverage and may enter averages; competence rates use only complete stages with a real floor, and custom protocol decisions never enter threshold replay. Current custom execution requires absent judgment; Domain Plan validation and Gateway snapshot installation reject the old present-judgment shape. Current publication/Operation scenarios preserve parked source exactly and reject inconsistent sealed inputs, without a custom-only normalization adapter. Native frozen validation and the common observation boundaries retain supported historical bytes and reject new authority under old schemas.