Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (antigravity): clone the tier rate pair per row and tighten the family-label assertion
[._.]/ Adam Eivya38fbb824105
diff --git a/server/lib/modelPricing.js b/server/lib/modelPricing.jsindex 500f2c500b..ff766f24f8 100644--- a/server/lib/modelPricing.js+++ b/server/lib/modelPricing.js@@ -53,7 +53,10 @@ const EXACT_RATES = {// Anthropic'claude-fable-5': [10.0, 50.0],'claude-mythos-5': [10.0, 50.0],- ...Object.fromEntries(OPUS_MODEL_IDS.map((id) => [id, OPUS_TIER_RATES])),+ // Cloned per row so each key owns its pair exactly as the hand-written rows+ // above and below do — sharing one array across five keys would make any+ // future edit to one opus row silently rewrite the whole tier.+ ...Object.fromEntries(OPUS_MODEL_IDS.map((id) => [id, [...OPUS_TIER_RATES]])),'claude-sonnet-5': [2.0, 10.0], // intro pricing through 2026-08-31 ($3/$15 after)'claude-sonnet-4-6': [3.0, 15.0],'claude-sonnet-4-5': [3.0, 15.0],diff --git a/server/lib/modelPricing.test.js b/server/lib/modelPricing.test.jsindex 0acb158089..9449aeb8a1 100644--- a/server/lib/modelPricing.test.js+++ b/server/lib/modelPricing.test.js@@ -55,7 +55,11 @@ describe('resolveModelRates', () => {// a null or synthetic label would silently break both.it('reports a family label that is itself an exact table id at the same rates', () => {const viaFamily = resolveModelRates('claude-code', 'opus');- expect(viaFamily.rateModel).toEqual(expect.any(String));+ // Shape-matched rather than hardcoded to the current head id, so the next+ // opus bump doesn't have to edit this suite — that per-bump edit is what+ // the refactor removed. The exact-resolution check below is what actually+ // pins the pointer to a real table key.+ expect(viaFamily.rateModel).toMatch(/^claude-opus-\d/);expect(resolveModelRates('claude-code', viaFamily.rateModel)).toMatchObject({rateModel: viaFamily.rateModel,inputPer1M: viaFamily.inputPer1M,