You give it two JSON documents. A snapshot says what each model can do, what it costs, how much context it has and what data it is authorised for, and when those facts were captured. A policy says what each task needs and which model each route sends it to, with an explicit fallback edge from one route to the next.
This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.
Run the checked-in example
# Check the worked example: passes, exits 0
node bin/model-routing-policy-checker.mjs \
--policy examples/routing-policy.json \
--snapshot examples/snapshot.json \
--config examples/checker.config.json
# The same run as machine-readable JSON
node bin/model-routing-policy-checker.mjs \
--policy examples/routing-policy.json \
--snapshot examples/snapshot.json \
--as-of 2026-09-14 --json
# A policy with a cheap-but-unsupported primary and a fallback cycle: exits 1
node bin/model-routing-policy-checker.mjs \
--policy examples/broken-policy.json \
--snapshot examples/snapshot.json
# Everything: lint, tests, both examples, packaging
npm run checkRead the result
A consumer piping stdout must handle the empty case. Emitting a fake report for a run that never started would be worse.
Scope
Every limit is enforced, overridable from the command line, and named in the finding when it is reached. Exceeding one is an incomplete result with no routing decision.