Quickstart
June 24, 2026 ยท View on GitHub
This quickstart uses the real gateway-smoke app in the repository. It is the fastest way to see
role-model route a request and emit explainable runtime artifacts.
Prerequisites
- Node.js 24
- pnpm 10.x
Run the smoke flow
From the repository root:
pnpm install
pnpm run smoke
The smoke app lives at role-model-router/apps/gateway-smoke/ and routes a synthetic request through the
reference router.
What the smoke request looks like
The smoke run asks the router to satisfy a request with these requirements:
roleHintId: "coder"taskType: "coder.edit"requiredCapabilities: ["code.read", "code.write"]preferredCapabilities: ["reasoning.multi_step"]requiredModalities: ["text"]needsTools: truestrategy: "balanced"preferLocal: truebudgetLimit: 0.01
That request is matched against the sample endpoint metadata in
testdata/endpoint-metadata/sample-endpoints.json.
What gets emitted
The smoke run writes artifacts under runtime-output/gateway-smoke/:
| File | What it shows |
|---|---|
router-decision.json | the chosen endpoint, eligibility results, scores, and selection reasons |
trace-spans.json | the high-level routing phases and their timing |
trace-events.jsonl | event-level trace output |
usage-events.jsonl | request accounting metadata |
observed-performance.json | the measured profile aggregated for the chosen endpoint |
What you should see
In the current baseline, the smoke flow chooses cli.local.coder.
Why:
- it satisfies the required
code.readandcode.writecapabilities - it supports text output and tools
- it matches the local preference
- the other sample endpoints are excluded for missing required capability
The resulting router-decision.json records:
chosen_endpoint_id: "cli.local.coder"- exclusion reason code
CAPABILITY_MISSINGfor the non-coder endpoints - selection reasons including
BEST_TOTAL_SCORE,DECLARED_PROFILE_USED,MEASURED_PROFILE_USED, andLOCAL_PREFERENCE_APPLIED
Inspect the artifacts
Start with these files:
runtime-output/gateway-smoke/router-decision.jsonruntime-output/gateway-smoke/trace-spans.jsonruntime-output/gateway-smoke/usage-events.jsonlruntime-output/gateway-smoke/observed-performance.json
Together they show the main four outputs the protocol cares about:
- decision: what the router chose and why
- trace: how routing progressed
- usage: what the request consumed
- observed performance: how the chosen endpoint behaved