Every field of one decision-ledger row — the top-level record and its notable sub-blocks (routing decision, governance, cost, and the response-cache honesty ledger) — with JSON name, type, and meaning.
Last updated
On this page
The decision ledger is an append-only JSONL file: one JSON object per line per proxied request.
This page documents the wire schema of that object field-by-field. The schema is v: 1 and evolves
additive-only — a breaking change bumps the top-level v.
Top-level record
Field
Type
Meaning
v
int
Schema version (currently 1).
ts
string
Request arrival, RFC3339 with ms, UTC.
req_id
string
Server-minted request id; equals the x-tt-request-id response header.
The provider that served the request — its own identity, decoupled from dialect. Omitempty.
signals
signals is an open map of every registered signal provider’s output. Values are heterogeneous:
numeric sub-scores (float64), a token estimate (int under token_est), and the string
complexity_tier. Example:
The calibrated quality the router consulted for the chosen tier. Omitempty; absent = no quality consult. See decision.predicted.
decision.model_rewrite
Field
Type
Meaning
from
string
The client-requested model.
to
string
The model actually served.
decision.candidates[]
Each element (core.Candidate):
Field
Type
Meaning
tier
string
Candidate tier.
eligible
bool
Whether the candidate passed filters.
score
float
Score, or null when unscored.
decision.predicted
The quality-consult witness: the calibrated quality figure the router read for the tier it
chose, written only when a selector actually consulted candidate.quality.* at decision time.
An absent block is the fact “this row was decided without quality evidence” — it shows as the
quality_absent term in decision.explain, and it is never backfilled (backfilling would
retroactively claim the router saw a number it never saw). Because the block is written only on a
real consult, every field is always emitted: a lcb of 0 here is a real consulted zero, not
an absence. See Quality-aware routing for how the figure
changes a route.
Field
Type
Meaning
metric
string
The metric consulted, e.g. groundedness.
tier
string
The chosen tier this prediction is for.
lcb
float
The decision value — the Clopper–Pearson lower bound the router gated on (not the mean; routing on a point estimate is the overconfidence anti-pattern).
mean
float
The segment’s calibrated mean. Disclosure only — never the decision value.
confidence
float
The artifact’s nominal coverage (1 − α).
n
int
Observations behind the prediction.
segment
string
The Mondrian segment key metric | tier | model | endpoint — the model is the one served, not requested.
artifact_id
string
The active qcal_ artifact consulted (qcal_<compactTS>_<sha8>).
quality_ver
string
The quality-view version that was consulted.
decision.governance
Present iff governance engaged (a key resolved, limits were evaluated, shadow verdicts were
produced, or a suspension was in effect). Absent means governance did not touch the request.
The firing limit and the holder’s node. Omitted on a 401. See below.
enforcement
object
Posture and disclosed bound. Omitted on 401/403. See below.
decision.refused_by_limit.refused_by
Field
Type
Meaning
limit_id
string
Id of the firing limit. Omitempty.
limit_type
string
Limit type, e.g. budget_usd. Omitempty.
unit
string
Limit unit, e.g. usd. Omitempty.
node
string
The holder’s own node. Always present.
period
string
Reset period, e.g. month. Omitempty.
resets_at
string
RFC3339 reset time. Omitempty.
retry_after_s
int
Retry-after seconds. Omitempty.
observed
float
Observed value at breach; omitted (not 0) when the store cannot report it.
limit
float
The configured limit; omitted when unavailable.
decision.refused_by_limit.enforcement
Field
Type
Meaning
posture
string
enforcing | fail_closed.
approximate
bool
The refusal used a disclosed approximate bound.
bound
object
Quantitative bound terms. Omitempty. See below.
note
string
Human bound caveat. Omitempty.
enforcement.bound
Field
Type
Meaning
tee_lag_rows
int
Rows the accounting tee lags by. Always emitted (a 0 is meaningful).
dropped_rows
int
Rows dropped from accounting. Always emitted.
in_flight_reserved
int
Current TPM/lease reservation view. Omitempty.
estimate_skew_p95
float
Rolling reconcile-delta p95. Omitempty.
convergence_lag_rows
int
Convergence lag in rows. Omitempty.
decision.response_cache
The response-cache honesty ledger. Written unconditionally whenever the cache engaged (ran a
lookup or a store); absent means the cache did not engage. outcome and stored are always
present; every other field is omitempty and carried only when its class of row bears it (e.g.
kind/similarity/verified on a hit, bypass_reason on a bypass). A present block with
stored: false is the meaningful fact “the cache engaged but this row’s response was not written.”
Field
Type
Meaning
outcome
string
hit | would_hit | miss | bypass | error. Always present.
kind
string
Matcher kind on a hit/would_hit, e.g. exact | semantic. Omitempty.
rule
string
Cache rule id that governed the request. Omitempty.
strategy
string
Matcher name. Omitempty.
entry_sha7
string
Stored entry id (short hash). Omitempty.
source_req_id
string
Provenance: the req_id of the original request that produced the entry. Omitempty.
age_ms
int
Age of the stored entry at serve time. Omitempty.
similarity
float
Semantic match score. Omitempty (semantic only).
threshold
float
Match threshold (the calibrated T* when a verified policy is active). Omitempty.
verified
bool
Verifier verdict: true | false | absent (no verifier). Omitempty.
scope_sha7
string
The scope key (short hash). Omitempty.
stored_provider
string
Provider that produced the stored response. Omitempty.
stored_model
string
Model that produced the stored response. Omitempty.
source_usage
object
The source row’s usage block. Omitempty (a bypass/miss omits it).
saved
object
Typed counterfactual savings (StageCost shape). Omitempty. See below.
saved_basis
string
Audit string: how saved was computed. Omitempty.
embed_cost
object
Embedding spend when metered (StageCost shape). Omitempty. See below.
stored
bool
This row’s response was written to cache. Always present (false is meaningful).
bypass_reason
string
On a bypass: client_off | stream_binary | tool_calls | over_budget | …. Omitempty.
lookup_us
int
Lookup wall time (µs). Omitempty.
embed_us
int
Embedding wall time (µs). Omitempty.
serving_tier
string
Cross-tier provenance: l1 | l2 | l3 — which tier served the hit. Omitempty.
recall_exact
bool
Semantic hit: true = exact-KNN recall; false = ANN (a disclosed approximation). Omitempty.
recall_config
string
Semantic ANN hit: the recall backend’s config, e.g. hnsw(m=16,ef_search=200). Omitempty.
verified_active
bool
A verified-semantic policy governed this decision. Omitempty.
verified_calibrated
bool
A calibrated T* replaced the static threshold (licenses the saving). Omitempty.
verified_samples
int
Labeled observations the calibration considered. Omitempty.
verified_bound
float
Wilson lower bound on the correct-serve rate at T*. Omitempty.
saved / embed_cost (StageCost)
Both saved and embed_cost use the typed money shape — never a bare float. An unpriced value
sets unpriced: true rather than a silent $0.
Field
Type
Meaning
usd
float
Dollar amount.
estimated
bool
The amount is an estimate.
unpriced
bool
The stage could not be priced; usd is not a real dollar amount.
usage
Normalized token accounting (core.Usage), reused directly by the ledger.
Field
Type
Meaning
input_tokens
int
Prompt tokens.
output_tokens
int
Completion tokens.
cache_read_tokens
int
Provider prompt-cache read tokens.
cache_write_tokens
int
Provider prompt-cache write tokens.
cache_write_detail
object
TTL split of the cache-write tokens: { ephemeral_5m_tokens, ephemeral_1h_tokens }. Omitted when absent.
reasoning_tokens
int
Reasoning/thinking tokens.
total_tokens
int
Total tokens.
source
string
Provenance of the counts: provider | estimated | absent | replay (a cache-served row).
cost
The priced outcome with provenance. Only ledger.CostFrom can construct a priced cost, so
usd never carries a dollar figure without a resolved key.
Field
Type
Meaning
usd
float
Dollar cost. Not a real amount when unpriced is true.
pricing_key
string
The catalog key the price resolved under, e.g. anthropic/claude-haiku-4-5.
pricing_snapshot
string
Price provenance, source@date#sha7, e.g. litellm@2026-07-10#c3f1a2.
estimated
bool
The cost is an estimate.
would_usd
object
Per-tier shadow economics: {tier: usd}. null when not computed.
unpriced
bool
The pricing lookup missed. When true, aggregates must exclude-and-disclose the row, never sum its zero. Omitempty.
Shadow-judge verdict, joined by the reader from a companion row; else null. Omitempty.
mcp
Per-tool MCP attribution; [] before any tool ran. Each element:
Field
Type
Meaning
tool
string
Tool name.
server
string
MCP server name.
calls
int
Number of calls to this tool.
result_bytes
int
Total result bytes returned.
input_tokens_attributed
int
Input tokens attributed to this tool.
estimated
bool
Always true — the attribution is a char/4 estimate, never a provider figure.
dims
Business-dimension attribution — explicit headers only, never inferred from content. Omitempty.
user/tenant/feature/tags come from x-tt-* headers; team/key are the server-stamped
principal dims when governance resolves an authenticated key.
Field
Type
Meaning
user
string
From x-tt-user. Omitempty.
tenant
string
From x-tt-tenant. Omitempty.
feature
string
From x-tt-feature. Omitempty.
tags
object
Bounded free-form {k: v} from x-tt-tag-<k>. Omitempty.
team
string
Stamped principal dim: resolved team node. Omitempty.
key
string
Stamped principal dim: resolved kid. Omitempty.
units
Non-token billable units, present only on non-token endpoints (images/audio/…). When present,
all four keys are emitted — it is a complete unit statement.
Field
Type
Meaning
images
int
Billable images.
seconds
float
Billable seconds.
characters
int
Billable characters.
requests
int
Billable request units.
disclosures
The row-level honesty ledger. Omitempty.
Field
Type
Meaning
translation
object
Cross-dialect translation loss. Written on every translated row (an empty {from,to} is itself the fact “translated, nothing lost”).
disclosures.translation
Field
Type
Meaning
from
string
Source dialect.
to
string
Target dialect.
dropped_params
array
Parameters dropped in translation. Omitempty.
approximations
array
Approximations made in translation. Omitempty.
Companion rows
The ledger stays append-only: async labels are appended as separate rows keyed on req_id, not
mutated in place. Readers join them onto the primary row.