openpencil/scripts/ab-corpus
Fini e10b3a37c9 fix(ab-corpus): kimi-2.6 alias fell through to Bailian instead of Ark
The Ark router regex was `/^kimi-k2\.6/i` — required the `k`
prefix. But mapKimiArkId's alias list accepted both `kimi-k2.6`
AND `kimi-2.6` (no-prefix form). Result: `kimi-2.6` failed the
Ark regex, fell through to the generic `/^kimi/i` branch, got
routed to Bailian — which doesn't host K2.6. Bailian would
return HTTP 400 "model not supported" with no hint that the id
belonged on Ark.

Fix: Ark router regex now `/^kimi-k?2\.6(-ark)?$/i` — optional
`k` prefix + optional `-ark` suffix, anchored at end to prevent
accidentally matching a hypothetical later version. mapKimiArkId
normalizes all four accepted aliases (kimi-k2.6, kimi-2.6,
kimi-k2.6-ark, kimi-2.6-ark) to the canonical on-Ark id.

Same latent bug fixed on the glm-5.1 route: regex `/^glm-5\.1/i`
would prefix-match a hypothetical `glm-5.10` and wrongly route it
to Ark. Tightened to `/^glm-5\.1(-coding|-ark)?$/i` with the same
anchored-end + suffix-allowlist pattern.

Caught by Codex stop-hook review during 2026-04-22 session.
2026-04-22 11:10:00 +08:00
..
clients chore(ab-corpus): route glm-5.1 + kimi-k2.6 through 方舟 CP (Ark) 2026-04-22 11:05:00 +08:00
apply.ts feat(scripts): ab-corpus harness with multi-provider model adapters 2026-04-20 23:53:23 +08:00
build-prompt.ts feat(scripts): ab-corpus harness with multi-provider model adapters 2026-04-20 23:53:23 +08:00
real-model.ts fix(ab-corpus): kimi-2.6 alias fell through to Bailian instead of Ark 2026-04-22 11:10:00 +08:00
run.ts fix(ai-skills): keep corpus barrel browser-safe (drop loadCorpus re-export) 2026-04-21 00:43:48 +08:00
stub-model.ts feat(scripts): ab-corpus harness with multi-provider model adapters 2026-04-20 23:53:23 +08:00
write-report.ts feat(scripts): ab-corpus harness with multi-provider model adapters 2026-04-20 23:53:23 +08:00