pi 1.0.2: bump @earendil-works/pi-ai + pi-agent-core 0.87.1 → 1.0.2

All imports and Agent seams survive (verified pre-bump). Fallouts, all
catalog drift handled by the documented refresh path:
- sync-pricing.ts: catalog schema v6 keys are type-qualified (chat:id);
  price chat models only, strip the prefix so PRICES keys stay provider:id
- prices.ts regenerated (1537 keys); auth-keys gains the typesafe provider
- test pins: glm-5.3-flash contextWindow 1048576→1048575, cacheRead
  0.05→0.03 (activity-feed, model-catalog, render-activity-dock, usage)

Inherited free: at-capacity retry, unfinished-tool-call error handling,
model samplingParams no longer dropped on direct stream().
This commit is contained in:
amosblomqvist
2026-10-04 19:50:20 +03:00
parent 5653a394ac
commit 02e7840b2f
9 changed files with 252 additions and 200 deletions
+3 -3
View File
@@ -42,10 +42,10 @@ test("sumSteps folds steps; absent stays absent until a value appears", () => {
test("callCost: glm-5.3-flash math — fresh input, cached read, output", () => {
const cost = callCost(call({ inputTokens: 100_000, outputTokens: 20_000, cacheReadTokens: 10_000 }), "openrouter:z-ai/glm-5.3-flash");
assert.ok(cost !== null);
// fresh 90k @ $0.15/M + cached 10k @ $0.05/M + output 20k @ $0.5/M
// fresh 90k @ $0.15/M + cached 10k @ $0.03/M + output 20k @ $0.5/M
// (pi-ai catalog prices — regenerated tables, scripts/sync-pricing;
// prices drifted in pi-ai 0.87.1, owner's cost fix 2026-09-29)
assert.ok(Math.abs(cost! - (0.0135 + 0.0005 + 0.01)) < 1e-9);
// glm-5.3-flash cacheRead corrected 0.05 → 0.03 in pi 1.0.2)
assert.ok(Math.abs(cost! - (0.0135 + 0.0003 + 0.01)) < 1e-9);
});
test("callCost: cache writes bill at the cacheWrite rate", () => {