DragonLair.ai
Get access

Explainability headers (X-Darouter-*)

Ships Decision trail headers on chat/completions. Treat them as evidence of what the control plane decided — not as quality grades.

Common headers

HeaderMeaningMaturity
X-Darouter-Selected-ModelConcrete model after auto/virtual resolutionShips
X-Darouter-Route-ExplanationWhy this route/offer wonShips
X-Darouter-Decision-IDOpaque id for GET /v1/optimizer/decisions/{id}Ships
X-Darouter-Governance-ExplanationHard governance outcome before rankingShips
X-Darouter-Cache-ReasonClosed-enum cache-aware rank reasonShips
X-Request-IDCorrelation id for portal Logs browseShips

Carbon-related observe headers (when present) do not change Select. No live carbon grams routing.

How to use them

  1. Log Selected-Model + Decision-ID on every production call.
  2. In portal Logs, browse recent traces keyboard-free; open a row for metadata-only detail.
  3. In portal Routing, paste Decision-ID to inspect attempts and outcomes.

OpenAPI + decision lookup

Headers are response metadata on compatible routes such as POST /v1/chat/completions. Persist X-Darouter-Decision-ID and resolve via OpenAPI:

  • GET /v1/optimizer/decisions/{decision_id}
  • GET /v1/optimizer/decisions/{decision_id}/outcomes

Full field contracts live in /v1/openapi.json — not a cookbook tree.