Repository navigation
v1.91.352.0 feat(benchmark): particle-1 awareness, OpenRouter gateway provider, preregistered model panel (GSTA-173) - #3631
Conversation
…y provider, preregistered model panel (GSTA-173) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…A-173) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ositive on key) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…del panel in the paid count and test-of-test baseline Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…sses on Windows Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A settings.json env block's ANTHROPIC_API_KEY was sent to the OpenRouter base URL as x-api-key; --setting-sources '' loads no settings source. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s row Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…mark-models row Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ticle-1 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # docs/skills.md
E2E Evals: ✅ PASS125 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $31.92 rule/judge cost | reconcile exit: 0 Profile: pr / mode Full gate restored by:
Rule and judge shards
Fail-closed reconciliationSliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry. Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
What changed
gstack-model-benchmark --dry-run --models claude,particle,deepseek: main skips particle and deepseek as unknown providers; this branch runs both through OpenRouter.Before/after as text: gstack-model-benchmark --dry-run --models claude,particle,deepseek: main skips particle and deepseek as unknown; this branch runs them through OpenRouter
gstack now knows particle-1 (Particle AI, released October 28, 2026) and has measured it on its own task panel.
lib/pricing.tspricesparticle-1($0.25 input, $0.03 cached, $1.00 output per 1M tokens, from Particle's billing page) anddeepseek-v4.1-flash-1017(OpenRouter's rates). Provider-prefixed ids likeparticle-ai/particle-1resolve to these rows.particle-1(bare,particle-ai/orparticle/) counts as the DeepSeek family, because Particle post-trained it on DeepSeek V4.1 Flash. A particle-1 outside voice is never treated as independent of a DeepSeek one. Other Particle ids stay unknown, which fails safe.gstack-model-benchmark --models particle,deepseekruns those models in Claude Code through OpenRouter (OPENROUTER_API_KEY;GSTACK_GATEWAY_BASE_URLoverrides the endpoint). The child process gets no Anthropic credential and runs with--setting-sources '', so no user, project or local settings file is loaded. Every Claude Code model alias and the subagent model are pinned to the arm's model, and a run that billed any other model is reported as aMODEL_MIXerror. One registry (test/helpers/providers/registry.ts) now feeds the CLI, its dry run and the runner, so an unknown or unready provider can't silently fall back to claude.test/skill-e2e-model-panel.test.ts, periodic tier, kept out of the periodic CI census) runs 5 gstack-shaped tasks × 4 models × 3 trials. Each cell is scored by a hidden deterministic check, priced from its own tokens, and admitted under a $15 spend ledger. A free selftest proves every check fails on its seed fixture and passes on a reference answer, and pins the INFRA classes, cost math and wording rule.The panel is easy: 58 of 59 scored cells passed. It shows particle-1 handles small gstack-shaped tasks at about one-fifth of Sonnet's cost per task. It does not show parity on harder work, and the results doc says so.
Why
Garry asked for gstack to know particle-1 and to suggest people try it. Crew rules require a measured number behind any published claim, so this PR builds the measurement first. The one-line suggestion (docs/model-policy.md, setup and upgrade, the Capy skill) comes in a follow-up PR after #3608, using the line the preregistered rule produced.
Blast radius
ClaudeAdaptertakes optionalenvironmentandstrictoptions, and with neither set its argv and environment are unchanged; the existing claude adapter tests pass at the frozen tree (free tier, remote run).resultFromClaudeOutputalso reportsmodelsBilledandcacheWrite, which only the gateway and the panel read.gstack-model-benchmarkacceptsparticleanddeepseek, an all-unknown--modelslist now exits 1, and its unknown-provider warning lists every valid name. The panel never runs in the periodic census, so it spends nothing unless someone selects it.Known gap
One DeepSeek cell hit the 8-minute timeout and was classified INFRA (no result event), although
classifyCell's comment says a timeout after work is scored. Results stand as computed. Fixing it changes the instrument, so it's left for the next preregistered run (TODOS.md).Approvals
Source: gstack-approvals record for garrytan/gsta-173-particle-1 (display only; not an approval citation).
Summary
Garry asked for particle-1 to be a first-class model in gstack and for gstack to suggest trying it, backed by a measured claim. gstack now prices and classifies particle-1, can run it (and DeepSeek V4.1 Flash) inside Claude Code through OpenRouter for benchmarks, and ships the preregistered panel that produced the published numbers.
Settings-key leak, found and fixed in review. The adversarial pass found that a gateway run still loaded the user's
~/.claude/settings.json. AnANTHROPIC_API_KEYset there would reach the OpenRouter base URL as anx-api-keyheader, even though the child environment carried no Anthropic credential. A local stub server standing in for OpenRouter recorded the header. The fix passes--setting-sources ''on every gateway run, a test pins that argv, and the skill's data-sharing sentence now says exactly what reaches OpenRouter. The fix-check reproduced the leak and the fix with the real Claude Code CLI (2.1.312) against the stub: with the flag, nox-api-key, CLAUDE.md content or MCP context reached it.Preregistration and results in one PR (gate
prereg-with-results, gate_id 96de5edb8f3d). The review flagged that the panel's rules and its results land together. The origin ref reflog proves their order. The preregistration d209821 was pushed at 2026-10-30T01:05:03Z, run 2026-10-30-0105 started at 2026-10-30T01:05:42Z (its first spend-ledger admission), and the results 31befac were pushed at 01:22:03Z. GStack Minder (Captain, merge owner) dispositioned it keep, justified on 2026-10-31. The unattended review logger still records it asopen, because it forcesopenon every gate finding in a non-interactive session.Base merge. origin/main (4eae3ef) was merged in once under GStack Minder's rule 19 grant. The only conflict was
docs/skills.md, and the resolution keeps main's/captainrow and this PR's/benchmark-modelsrow. The PR diff against main is unchanged at 51 files, +1488 −42. The receipt carry refused because a context line next to this PR's row changed, so GStack Minder approved a rule 30(b) exception on 2026-10-31: one reviewer checked the merge resolution (no findings) and the receipt was written at d43e8e4.Test Coverage
New code paths are covered by the free tests that touch them:
lib/pricing.ts(5 changed tests),benchmark-models/SKILL.md(.tmpl)(4 and 3),bin/gstack-model-benchmark(2) andlib/outside-voice-runner.ts(1), plus the gateway argv pin, the strict error-envelope test and the panel selftest.Tests ran: free (remote Ubicloud pregate at merged tree 6b54c838) 18267
Pre-Landing Review
Pass 1 (12 findings) fixed both blocking ones: the panel was included in the periodic CI census, and an all-unknown
--modelslist fell back to claude. Pass 2 was clean from seven specialists, with one red-team note. The native adversarial pass found the settings-key leak above; it was fixed under GStack Minder's rule 23 grant and the fix-check was clean. The AGENTS.md docs fix and the base-merge resolution each had their own clean fix-check.REVIEW_LOOP: passes=2 blocking_found=4 deferred=0 noted=3 fixed=7 scope=frozen fix_checks=3 dispatches=16
Gate edits: 45 listed, 8 read, 1 finding — 0 kept, 0 restored, 1 open
prereg-with-resultstest/skill-e2e-model-panel.test.ts(dispositioned keep, justified, by GStack Minder, Captain and merge owner, 2026-10-31; see Summary)Outside review: unverified. Codex (codex-cli 0.166.0, gpt-6-astra) ran twice and wrote "no actionable defects" in prose both times, but neither output carried a tagged verdict (
untagged_review), so cross-family coverage is missing, not passed.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
test/helpers/model-panel-harness.ts:188classifyCell comment now states timeout-without-result INFRA as policy while docs/evals/particle-1-2026-10.md:39 calls it a known gapbin/gstack-model-benchmark:73--models with an empty value still falls back to claude (existing contract pinned by 'empty --models list falls back to claude default')test/helpers/providers/gateway.ts:96gateway cache-write pricing could double count if OpenRouter reports cache-miss tokens in both input and cache_creation fields; unverified without a paid callExploratory QA
The leak was reproduced and the fix verified end to end with the real Claude Code CLI against a local stub of the OpenRouter endpoint. No paid calls were made during /ship.
Design Review
No frontend files changed — design review skipped.
Eval Results
The model panel ran once before /ship, as preregistered (run 2026-10-30-0105, $2.09 spent plus $0.15 counted at its reservation, under a $15 hard stop); every cell is in docs/evals/particle-1-2026-10.md. /ship did not rerun it, because a preregistered paid eval is not rerun to confirm a result. The panel is excluded from the periodic census.
Plan Completion
PR A of the approved particle-1 plan is complete: pricing and family, the OpenRouter gateway provider and registry, the preregistered panel and its results. PR B (the one-line suggestion in docs/model-policy.md, setup and upgrade, the Capy skill line, and the GSTA-168 handoff) is deferred until #3608 and this PR merge.
Verification Results
Leak reproduction and fix: PASS (stub server, real Claude Code CLI). Free tier: PASS at the reviewed tree bbb9a105 (17995 tests, 0 failed) and at the merged tree 6b54c838 (18267 tests, 0 failed). macOS named regressions and the Windows free shards: PASS at 53b337e (workflow dispatch runs 41163294203 and 41163297397) and at the merged head d43e8e4 (PR runs 41164892899 and 41164892775).
TODOS
No TODO items completed in this PR. Added a model-panel entry: score a timed-out cell's working tree, filter the summary by runId, and drain the worker pool on error.
Documentation
Status: updated. One factual fix in AGENTS.md, no blockers.
Scope: base 53db038, head 4129ad5, 50 changed files (no staged, unstaged or untracked changes). The relevant docs are README, AGENTS.md, CLAUDE.md, docs/skills.md, benchmark-models/SKILL.md(.tmpl), changelog.d fragment, TODOS.md and docs/evals/particle-1-2026-10.md. Banned-terms check: none.
Documentation health:
Coverage debt:
gstack-model-benchmark --models particle,deepseekhas reference coverage (the CLI header, SKILL.md and the changelog fragment) but no how-to or tutorial.skill-e2e-model-panelis documented only in the eval report and TODOS.md, with no contributor reference such as docs/TESTING_INTERNALS.md. Consider /document-generate. No architecture diagram drift found.Test plan
UBI_OWNER=gsta173 gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands: 17995 tests ran, 0 failed ($0.07) at tree bbb9a105; 18267 tests ran, 0 failed ($0.06) at the merged tree 6b54c838free-tests.ymlmacos-named-regressions (workflow dispatch run 41163294203): successwindows-free-tests.yml(workflow dispatch run 41163297397): successANTHROPIC_API_KEYin settings.json; with--setting-sources ''nox-api-keyarrivesPlan: /home/user/.capy/drive/captain-gstack-minder/renders/GSTA-173/plan.md
🤖 Generated with Claude Code