unhardcoded
the trust object

Traces & replay

The trace schema, how replay reproduces a decision, and the conformance guarantee.

Trace schema

Every completion carries a trace: a structured, replayable record of how the model was chosen. It is the proof object, which models were considered, why each passed or failed, what was used, and how to reproduce it.

decision_trace
deepseek-v4-flashrejected · cmp bench_intelligence ge 0.5
minimax-m2.7rejected · cmp bench_intelligence ge 0.5
deepseek-v4-proranked #1 · chosen
glm-5.1ranked #2 · cascade
gpt-5.5ranked #3 · cascade
deepseek-v4-prodecision_path · attempted · 412 ms
policy_fingerprint 301140696-1054914287 · sigma-pol/v2
policy_fingerprint
A cheap cache key for the normalized policy, two decimal lanes like 301140696-1054914287; identical terms share it. Full identity is a host-side sha256 of the canonical encoding.
chosen
{ model_family, served_model_id, price_in, price_out } for the model that served the call.
ranked[]
The survivors in selection order: { provider, model_family, served_model_id, tier, price_out, score }. The first is the pick; the rest are the cascade.
rejected[]
Each filtered-out candidate with the rule that dropped it: { model_family, reason }, e.g. cmp bench_intelligence ge 0.5.
decision_path[]
The ordered attempt log: { event, provider_id, attempt, latency_ms, error_kind? }. Every failover hop is an attempted entry here.
total_latency_ms
Total routing + inference time. A workflow instead returns flow_fingerprint and flow_nodes[], one trace per node.

Replay. Identity is the sha256 of the policy's canonical encoding, so given the trace and the catalog snapshot the same policy and inputs reproduce the same decision, on the host or your own machine.

Conformance

A policy should mean the same thing wherever it runs. Canonical encoding, an sha256 identity, the reference interpreter, and a shared set of golden vectors are what hold that together.

same policy = same inputs = same catalog = same seed = same result. The semantics use only correctly-rounded arithmetic, so a conforming host replays the golden vectors (tests/golden/sigma_pol_v2.json in the engine repo) and reproduces every decision bit-for-bit. Identical terms encode to identical bytes and therefore share one sha256 identity across hosts.

← Back to docs