pi-smart-router 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +54 -0
  2. package/package.json +4 -1
package/README.md CHANGED
@@ -854,6 +854,9 @@ Contributors must run `npm run build` before publishing or consuming the library
854
854
  | `npm run routing:eval-harness:corpus-smoke` | Harness summary on TwinRouterBench CI corpus subset (`tests/eval/corpus/twinrouterbench`) |
855
855
  | `npm run routing:assert-release-gates:corpus-report` | Soft-feed: assert corpus vs absolute gates with `--report-only` (exit 0; does not gate releases) |
856
856
  | `npm run routing:ingest-twinrouterbench` | Convert TwinRouterBench `question_bank.jsonl` → CI subset / full corpus JSON |
857
+ | `npm run routing:ingest-llmrouterbench` | Convert LLMRouterBench BaselineRecord JSONL → static-track subset JSON |
858
+ | `npm run routing:llmrouterbench-regret` | Offline regret / CS report on vendored LLMRouterBench subset (optional; not PR CI) |
859
+ | `npm run routing:community-bench` | Privacy-safe community bench report (Track A TwinRouterBench + optional Track B/C) |
857
860
  | `npm run benchmark:encoder` | Compare MiniLM vs Granite encoder latency on held-out agent turns |
858
861
 
859
862
  ### Offline eval harness (agent-native routing)
@@ -900,6 +903,57 @@ npm run routing:eval-replay
900
903
 
901
904
  **Deferred:** RouterBench classic (outcome-matrix) smoke is out of scope for SP-188; prefer TwinRouterBench static track + dogfood for #95.
902
905
 
906
+ #### LLMRouterBench offline regret (SP-192 / SP-193)
907
+
908
+ Optional local / nightly report on the **pinned code/tool subset** — not part of PR CI (no full HF corpus download).
909
+
910
+ | Item | Location / command |
911
+ |------|--------------------|
912
+ | **Pinned upstream** | HF `NPULH/LLMRouterBench` `@0e5af1b84bf73437a01a1849c0f1d2468baa93fc` + git schema `@c77cb0506949d8f959e97967d2fefca0e8ff1b05` (MIT) |
913
+ | **CI subset** | `tests/eval/corpus/llmrouterbench/ci-subset.json` (≤20 synthetic offline records) |
914
+ | **Provenance / refresh** | `tests/eval/corpus/llmrouterbench/PROVENANCE.md` (quarterly pin refresh; re-run report after catalog/subset changes) |
915
+ | **Regenerate subset** | `npm run routing:ingest-llmrouterbench -- --input <jsonl> --output tests/eval/corpus/llmrouterbench/ci-subset.json --limit 20 --prefer-code-tool` |
916
+ | **Regret / CS report** | `npm run routing:llmrouterbench-regret` |
917
+ | **Community Track C** | `npm run routing:community-bench -- --llmrouterbench` (same vendored subset; optional) |
918
+
919
+ PR CI continues to smoke TwinRouterBench only (`routing:eval-harness:corpus-smoke`). Absolute `config/release-gates.json` thresholds are unchanged. See [Contribute a community bench report](#contribute-a-community-bench-report) for Track A + optional Track C sharing.
920
+
921
+ #### Contribute a community bench report
922
+
923
+ Share a privacy-safe setup fingerprint + Track A (TwinRouterBench) gate result with maintainers. No SMTP auto-send and no upload server — you copy artifacts yourself.
924
+
925
+ **Maintainer contact** (must match the CLI footer constant `COMMUNITY_BENCH_MAINTAINER_CONTACT`):
926
+
927
+ `https://github.com/beettlle/pi-smart-router/issues/new?labels=community-bench`
928
+
929
+ ```bash
930
+ # Track A offline smoke (vendored TwinRouterBench corpus — no network)
931
+ npm run routing:community-bench -- \
932
+ --output /tmp/community-bench-report.json \
933
+ --email-file /tmp/community-bench-report.txt
934
+
935
+ # Optional Track C: offline LLMRouterBench regret/CS on the vendored subset (no full HF download)
936
+ npm run routing:community-bench -- \
937
+ --llmrouterbench \
938
+ --output /tmp/community-bench-report.json \
939
+ --email-file /tmp/community-bench-report.txt
940
+ ```
941
+
942
+ **How to send:**
943
+
944
+ 1. **Email `.txt`** — open `/tmp/community-bench-report.txt` (or your `--email-file` path). It includes a `Subject:` line, privacy blurb, fingerprint, Track A PASS/FAIL, and optional Track C metrics. Paste into your mail client; attach `community-bench-report.json` if useful. Do **not** expect the CLI to send mail.
945
+ 2. **GitHub issue** — open the [maintainer contact](https://github.com/beettlle/pi-smart-router/issues/new?labels=community-bench) URL, or run with `--print-issue-body` and paste stdout into a new issue. Issues list: https://github.com/beettlle/pi-smart-router/issues
946
+
947
+ **Tracks:**
948
+
949
+ | Track | Corpus | When |
950
+ |-------|--------|------|
951
+ | **A (required)** | [TwinRouterBench CI corpus](#twinrouterbench-ci-corpus-sp-186--sp-187--sp-188) (`tests/eval/corpus/twinrouterbench`) | Always |
952
+ | **B (optional)** | Dogfood export (`--dogfood-export PATH`) | Skips with an explicit reason until [#95](https://github.com/beettlle/pi-smart-router/issues/95) adapter lands — never invents labels |
953
+ | **C (optional)** | [LLMRouterBench offline subset](#llmrouterbench-offline-regret-sp-192--sp-193) (`tests/eval/corpus/llmrouterbench`) | `--llmrouterbench` or `--full`; offline only |
954
+
955
+ PR CI does **not** download full TwinRouterBench / LLMRouterBench corpora. Absolute gate thresholds in `config/release-gates.json` are unchanged by this CLI.
956
+
903
957
  Sample fixtures under `tests/eval/fixtures/twinrouterbench/` remain the small adapter unit-test inputs and are unchanged by corpus ingest.
904
958
 
905
959
  Capability scores in `config/benchmark-profiles.json` are grounded from public leaderboard snapshots under `tests/fixtures/benchmark-leaderboards/` (and optional **recorded** live snapshots under `tests/fixtures/benchmark-leaderboards/recorded/`). Each artifact records provenance (`source_urls`, `scrape_date`, `catalog_freeze_date`) in its header.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-smart-router",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Auto-model router middleware for the pi.dev coding agent",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -73,7 +73,10 @@
73
73
  "routing:eval-harness:smoke": "tsx scripts/eval/run-harness.ts --summary-only",
74
74
  "routing:eval-harness:corpus-smoke": "tsx scripts/eval/run-harness.ts --fixtures tests/eval/corpus/twinrouterbench --summary-only",
75
75
  "routing:assert-release-gates:corpus-report": "tsx scripts/eval/assert-release-gates.ts --fixtures tests/eval/corpus/twinrouterbench --report-only",
76
+ "routing:community-bench": "tsx scripts/eval/community-bench.ts",
76
77
  "routing:ingest-twinrouterbench": "tsx scripts/eval/ingest-twinrouterbench-corpus.ts",
78
+ "routing:ingest-llmrouterbench": "tsx scripts/eval/ingest-llmrouterbench-subset.ts",
79
+ "routing:llmrouterbench-regret": "tsx scripts/eval/llmrouterbench-regret-report.ts",
77
80
  "routing:ingest-swe-gym": "tsx scripts/ingest-swe-gym-labels.ts",
78
81
  "routing:ingest-fc-rewardbench": "tsx scripts/ingest-fc-rewardbench-labels.ts",
79
82
  "routing:ingest-twinrouterbench-weak": "tsx scripts/ingest-twinrouterbench-weak-labels.ts",