From 8d489496608a9462a5f0449078000d327feb001f Mon Sep 17 00:00:00 2001 From: Mike Lyons Date: Fri, 16 Oct 2026 16:19:41 -0400 Subject: [PATCH 1/2] Bump bundled @anthropic-ai/claude-code to 2.1.301 Co-Authored-By: Claude Fable 5.1 --- package-lock.json | 72 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0966595..4626d929 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "@anthropic-ai/claude-code": "2.1.285", + "@anthropic-ai/claude-code": "2.1.301", "@dnd-kit/core": "^6.3.1", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", @@ -62,9 +62,9 @@ } }, "node_modules/@anthropic-ai/claude-code": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.285.tgz", - "integrity": "sha512-frr0DLmVHSDNjw+hC6ZmXMVQ8yH4nNmVcI4lVFzWt0bdPNZP7clOKsuLcqSdwQabIpe6A3NEc3TJfiBVD8B2Bg==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.301.tgz", + "integrity": "sha512-sEqs0D9IIc6GwbdMvss5GHOjLjhaoqbrZWdickLRlG6v4kT946t4pq3zFAmQdUpRgdv1CvtSLyRrrdp+hDS9ww==", "hasInstallScript": true, "license": "SEE LICENSE IN README.md", "bin": { @@ -74,20 +74,20 @@ "node": ">=22.0.0" }, "optionalDependencies": { - "@anthropic-ai/claude-code-darwin-arm64": "2.1.285", - "@anthropic-ai/claude-code-darwin-x64": "2.1.285", - "@anthropic-ai/claude-code-linux-arm64": "2.1.285", - "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.285", - "@anthropic-ai/claude-code-linux-x64": "2.1.285", - "@anthropic-ai/claude-code-linux-x64-musl": "2.1.285", - "@anthropic-ai/claude-code-win32-arm64": "2.1.285", - "@anthropic-ai/claude-code-win32-x64": "2.1.285" + "@anthropic-ai/claude-code-darwin-arm64": "2.1.301", + "@anthropic-ai/claude-code-darwin-x64": "2.1.301", + "@anthropic-ai/claude-code-linux-arm64": "2.1.301", + "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.301", + "@anthropic-ai/claude-code-linux-x64": "2.1.301", + "@anthropic-ai/claude-code-linux-x64-musl": "2.1.301", + "@anthropic-ai/claude-code-win32-arm64": "2.1.301", + "@anthropic-ai/claude-code-win32-x64": "2.1.301" } }, "node_modules/@anthropic-ai/claude-code-darwin-arm64": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-darwin-arm64/-/claude-code-darwin-arm64-2.1.285.tgz", - "integrity": "sha512-82pac0p/rTdZvxSspGJsEdqELADhd5aR9AC6JRSJx8kx8q0ggHjOHSCEH/LZeufREACAZv13TcsOPs0AMAptCQ==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-darwin-arm64/-/claude-code-darwin-arm64-2.1.301.tgz", + "integrity": "sha512-A4OcibtminZ9KlXX4ce/yhPVdPKWnJ6nK5vNGBdP1uPMp68KryG++C/J12EUeW9FvEhvwnHKX86eG9TkJkPcpg==", "cpu": [ "arm64" ], @@ -98,9 +98,9 @@ ] }, "node_modules/@anthropic-ai/claude-code-darwin-x64": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-darwin-x64/-/claude-code-darwin-x64-2.1.285.tgz", - "integrity": "sha512-iCewQN1vqZSQ1JdvM4NLm6GhhiEjmvdOrJM/mJBxhe/sPpr8yvouC3hR29Jcap15otWilL4fZ97C02K1kcKP0w==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-darwin-x64/-/claude-code-darwin-x64-2.1.301.tgz", + "integrity": "sha512-rMr/61VZ6nSY2BYaa8BrjmUGq6MyFFW7wzeGIiwEKueUqOYHc8f5CRvau8H9W5pjw7gIEY1kzSMLRV4PIWbg1g==", "cpu": [ "x64" ], @@ -111,9 +111,9 @@ ] }, "node_modules/@anthropic-ai/claude-code-linux-arm64": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-arm64/-/claude-code-linux-arm64-2.1.285.tgz", - "integrity": "sha512-vAvIr+MVnm5IrSq8KoJrZkoG3BFpLvVEqfrx15w7hWW+gcSYHPvN33lfkzXvs5L8MYXxNW0Ae86MLiCH+x4ldQ==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-arm64/-/claude-code-linux-arm64-2.1.301.tgz", + "integrity": "sha512-vMA8QVkLBqO8fZLaCecONZhatIRtoieIwCZ8npn8b0UvinZz40i5PhBIQ52fvhnZYdX16wFdTzhij3iL1RRL7w==", "cpu": [ "arm64" ], @@ -124,9 +124,9 @@ ] }, "node_modules/@anthropic-ai/claude-code-linux-arm64-musl": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-arm64-musl/-/claude-code-linux-arm64-musl-2.1.285.tgz", - "integrity": "sha512-eBtArV+9Byq2h861MTGypb+GgPNo9aVlNve5IGJ73184l3JdfxHDeMJeSqJMD0ms+0p1LegFwSpaKSFUa1bQqA==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-arm64-musl/-/claude-code-linux-arm64-musl-2.1.301.tgz", + "integrity": "sha512-tuHMsvgkjvslVS2zYO0x/GvhByGvN07Bbr+8H5CNgPrQg/yQrDhbNiyXDoQMEF922fwtZ2pm665swDfAxLkKpg==", "cpu": [ "arm64" ], @@ -137,9 +137,9 @@ ] }, "node_modules/@anthropic-ai/claude-code-linux-x64": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-x64/-/claude-code-linux-x64-2.1.285.tgz", - "integrity": "sha512-6qNST8qKemr+rD9zvUEwEq0UtWt0E5Js8bkbjh13/LM62FiGWcN6IqiJPxybJ2FNd+I3liXq6JYNv/vrGnmAow==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-x64/-/claude-code-linux-x64-2.1.301.tgz", + "integrity": "sha512-JNe0VzIuXdaBrtlh+fY2SX5AQLDf8BDfIKrylOWK528AZ/aAq2bJt4SBkPikZ0CvecUbL0YN22Xe7eltAWCJGg==", "cpu": [ "x64" ], @@ -150,9 +150,9 @@ ] }, "node_modules/@anthropic-ai/claude-code-linux-x64-musl": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-x64-musl/-/claude-code-linux-x64-musl-2.1.285.tgz", - "integrity": "sha512-NxKFgUzT3YV45ILRa3CdMu8k5J8mCXxMAxt533HKrQDTLrckGOzBxWrQkezo4ouK7nYQJNfPtiRZYit4GSmN0Q==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-linux-x64-musl/-/claude-code-linux-x64-musl-2.1.301.tgz", + "integrity": "sha512-WP+9Jwx00qbAKRT3162fwVqdaC0DIAoEGhd6AvGXjG136HTo05AVWfCVDpK0KxBjMyJ1yABxeaCXi6Bz1ZdOEg==", "cpu": [ "x64" ], @@ -163,9 +163,9 @@ ] }, "node_modules/@anthropic-ai/claude-code-win32-arm64": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-win32-arm64/-/claude-code-win32-arm64-2.1.285.tgz", - "integrity": "sha512-Ojd9blZQHYwJ+D7q7JAKv9QcUmmHuHHifZch9S+K6O7cJxtwJ84eu20+5bc/x9ZiKKaf4gqy5zZ7WomUWK3d9w==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-win32-arm64/-/claude-code-win32-arm64-2.1.301.tgz", + "integrity": "sha512-F16G7OeWK9s0ctZELvLo8bpIfGQjd3tmqoT9yI9GYofW6AzFex77STV+dYMvu96MR4mfegS9tDV3vgOw03AnzA==", "cpu": [ "arm64" ], @@ -176,9 +176,9 @@ ] }, "node_modules/@anthropic-ai/claude-code-win32-x64": { - "version": "2.1.285", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-win32-x64/-/claude-code-win32-x64-2.1.285.tgz", - "integrity": "sha512-7TR0I2gOkYBADZlazRQERyP9WHCOKTZPPUSYzoxHP5EdHNvd9ZRYfIHJwydRfECpm6EYjGZ9goB/ACPJOMVdww==", + "version": "2.1.301", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code-win32-x64/-/claude-code-win32-x64-2.1.301.tgz", + "integrity": "sha512-YXl7/bzqywOZlqMW+18zi52DbZJJD8K5exBI6p2tLs5ZVEUhsd+fPnI+FOTehpRRHQ4imtIRas5zkcb3ninNtw==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index 63ce64b6..4109bd96 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ } }, "dependencies": { - "@anthropic-ai/claude-code": "2.1.285", + "@anthropic-ai/claude-code": "2.1.301", "@dnd-kit/core": "^6.3.1", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", From b60259df58043eb2bd919e137362d0bc45c25c20 Mon Sep 17 00:00:00 2001 From: Mike Lyons Date: Fri, 16 Oct 2026 16:23:11 -0400 Subject: [PATCH 2/2] fix(pricing): price Haiku 5.5, which `haiku` now resolves to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2.1.301 changed what the bundled CLI resolves the `haiku` alias to: claude-haiku-4-5-20251001 → claude-haiku-5-5. Re-derived from the new binary's `init` event per the procedure in agent-registry.test.ts. claude-haiku-5-5 had no entry in pricing.ts, and rateFor's prefix fallback has no claude-haiku-5 key to catch it, so priceFor returned 0 — every Chat tab session on `haiku` would have billed $0 silently. The "resolves only to models pricing.ts can bill" test catches exactly this. Haiku 5.5 is the only model priced by prompt length ($0.10/$0.50 up to 100k prompt tokens, $0.50/$2.50 above it). RATES is keyed by model id alone with no access to a request's token count, so only the base tier is carried; long-context Haiku sessions under-report rather than over-report. Noted in a comment at the callsite. Cache reads are $0.01/MTok against $0.10 input — exactly the 0.1 default cacheReadMult, so no override is needed. Co-Authored-By: Claude Opus 5 --- src/shared/agent-registry.test.ts | 8 ++++---- src/shared/pricing.ts | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/shared/agent-registry.test.ts b/src/shared/agent-registry.test.ts index 352e875d..b6e605d9 100644 --- a/src/shared/agent-registry.test.ts +++ b/src/shared/agent-registry.test.ts @@ -16,7 +16,7 @@ import { isKnownModel } from './pricing' * a miss here costs a broken tab rather than a silent mischarge — still * worth catching at build time. * - * Derived from @anthropic-ai/claude-code 2.1.285. Re-derive after + * Derived from @anthropic-ai/claude-code 2.1.301. Re-derive after * bumping the pin — stop at `;` rather than `]`, or the bracketed * `sonnet[1m]` entries truncate the array mid-token: * strings -a node_modules/@anthropic-ai/claude-code-*\/claude \ @@ -33,13 +33,13 @@ const BUNDLED_CLI_ALIASES = new Set([ 'opusplan' ]) -/** What each offered alias resolved to under the bundled 2.1.285 binary. +/** What each offered alias resolved to under the bundled 2.1.301 binary. * `opusplan` is listed at its non-planning model, which is what a normal * turn bills against. */ const ALIAS_RESOLVES_TO: Record = { opus: 'claude-opus-5-5', sonnet: 'claude-sonnet-5-5', - haiku: 'claude-haiku-4-5-20251001', + haiku: 'claude-haiku-5-5', fable: 'claude-fable-5-1', best: 'claude-fable-5-1', opusplan: 'claude-sonnet-5-5' @@ -72,7 +72,7 @@ describe('CLAUDE_MODEL_ALIASES', () => { // The alias is never what gets billed — the CLI resolves it and the // resolved id is what lands in the transcript and reaches priceFor. // So every alias target needs pricing, or a session silently costs $0. - // Read out of the bundled 2.1.285 binary's `init` event; re-derive + // Read out of the bundled 2.1.301 binary's `init` event; re-derive // after bumping the pin with: // claude --model -p x --output-format stream-json --verbose for (const resolved of Object.values(ALIAS_RESOLVES_TO)) { diff --git a/src/shared/pricing.ts b/src/shared/pricing.ts index e7ffc8dc..c8bcdcef 100644 --- a/src/shared/pricing.ts +++ b/src/shared/pricing.ts @@ -65,6 +65,12 @@ const RATES: Record = { 'claude-sonnet-4-6': { in: 3, out: 15 }, 'claude-sonnet-4-5': { in: 3, out: 15 }, 'claude-sonnet-4': { in: 3, out: 15 }, + // Haiku 5.5 is the only model priced by prompt length: a request whose + // prompt exceeds 100k tokens bills at 5x these rates ($0.50/$2.50). We + // only carry the base tier — rateFor keys off the model id alone and has + // no access to the request's token count, so long-context Haiku sessions + // under-report. Accepted over billing $0 for an unpriced model. + 'claude-haiku-5-5': { in: 0.10, out: 0.50 }, 'claude-haiku-4-5': { in: 1, out: 5 }, // OpenAI (used by Codex) 'o3': { in: 10, out: 40, reasoning: 40 },