Repository navigation
fix(pricing): current Anthropic rates, [1m] and version-safe resolution, 1h cache writes (UM-1591) - #1696
Conversation
…on, 1h cache writes (UM-1591) Refresh the LiteLLM snapshot (now carries claude-opus-5-5, sonnet-5-5, haiku-5-5 and fable-5-1 at the published Anthropic rates) and drop the hand-written Anthropic overrides. Rates are pinned in a new test against the Anthropic pricing page read 2026-10-17. Resolution: strip the [1m] marker (no premium on Claude 4.6+), fold dotted Claude versions, and stop the prefix fallback from matching a shorter version key (claude-opus-5-5[1m] was priced as Opus 5, +69%; claude-fable-5-1 as Fable 5, +40%). Unknown versions now report unpriced. Pricing: add a cacheCreation1h bucket (aliases cacheWrite1h, cacheWriteOneHour, metadata cacheTtl=1h) and a long-prompt tier with its own threshold (Haiku 5.5 over 100k tokens pays 5x). MiniMax M3 priced, M3.1 Flash Preview left unpriced (plan-only). Cost check now reports pricingStatus, a 5m..1h band for untyped cache writes, and applies the Haiku tier from per-row prompt size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rows (UM-1591) An exporter flush can combine many requests, so averaging prompt tokens per row could price short requests at the 5x tier. The point estimate now always uses the standard tier, and the long tier only widens derivedCostUpperBoundUsd. The tier is applied only by callers that know per-request prompt size (deriveTokenCostUsd with longContext). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Business Rules ValidationTask: 5773430482 — Provision Canonical iOS Records to Unblock Widget Fix Delivery FindingsMUST_FIX: PR scope does not match the task scopeRequirement: "Provision Canonical iOS Records" with active bundle IDs "Usage Monitor app: MUST_FIX: No evidence in this PR diff of implementing any of the three acceptance-criteria bundle IDsRequirement: AC #1 "Usage Monitor app: MUST_FIX: No evidence in this PR diff of honoring the legacy-record blacklistRequirement: "Do not use the legacy records SUGGESTION: Push Notifications capability not visible in this PR diffRequirement: "The Client app also needs Push Notifications." INFO: Rollout doc link not enforced by any code change in this PR diffRequirement: "Implementation and exact portal steps: Requirements Verified
Analysis performed by Kodus AI Business Rules Validator
|
Fixes UM-1591
Summary
Updates Anthropic API-equivalent pricing and token-cost derivation so that current model rates and 1-hour cache writes are priced correctly. The change corrects previously over- or under-estimated costs caused by fuzzy model matching,
[1m]context markers, missing 1-hour cache rates, and long-prompt tiers.Key changes
Current Anthropic rates
Version-safe model resolution
[1m]/[...]markers and normalizes dotted Claude versions (claude-opus-5.5→claude-opus-5-5).claude-opus-5-5no longer resolves toclaude-opus-5, and unknown versions such asclaude-opus-5-9are reported as unpriced instead of borrowing another model’s rates.-20251001,-latest, and-20260401.1-hour cache writes
cacheCreation1htoken bucket with aliases (cacheWrite1h,cacheWriteOneHour, etc.).metadata.cacheTtl/metadata.ttlvalues indicating a 1-hour TTL.Long-prompt tiers
Cost check reporting
pricingStatus(priced/unpriced/no-tokens),derivedCostUpperBoundUsd, andhasLongPromptTier.Tests
Adds and updates tests covering:
[1m]and dotted-version normalization.[1m]models.Review note
An automated review reported one medium finding: “Business logic gap detected based on PR requirements.” No specific file, line, or failing scenario was provided with the finding, so it could not be tied to a concrete code path in the supplied changes.