From ae25f4b25a4ede63ed32db47e48a0345054808e4 Mon Sep 17 00:00:00 2001 From: Alan Billi Date: Fri, 2 Oct 2026 17:27:49 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=B6=20fix:=20Price=20Mistral=20Large?= =?UTF-8?q?=203=20at=20$0.50=20/=20$1.50=20per=20MTok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `mistral-large-2512` (and `mistral-large-latest`, which now points to it) had no dedicated entry and fell back to the generic `mistral-large` key, billing at Mistral Large 2 rates ($2 / $6), 4x the actual price. - Add `mistral-large-2512` and `mistral-large-3` at $0.50 / $1.50 - Point the generic `mistral-large` fallback to the current model's price - Pin `mistral-large-2411` to its $2 / $6 rate - Drop the stale Sonnet 5 "revert after 2026-08-31" comments: Anthropic made the $2 / $10 pricing standard, so the scheduled increase won't happen Co-Authored-By: Claude Opus 5.5 (1M context) --- packages/data-schemas/src/methods/tx.spec.ts | 31 ++++++++++++++++++-- packages/data-schemas/src/methods/tx.ts | 7 +++-- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/packages/data-schemas/src/methods/tx.spec.ts b/packages/data-schemas/src/methods/tx.spec.ts index 3198ffb633d..14226cadd2a 100644 --- a/packages/data-schemas/src/methods/tx.spec.ts +++ b/packages/data-schemas/src/methods/tx.spec.ts @@ -2783,11 +2783,11 @@ describe('Claude Model Tests', () => { ); }); - it('should pin Claude Sonnet 5 to introductory $2 / $10 per MTok (through 2026-08-31)', () => { + it('should pin Claude Sonnet 5 to its standard $2 / $10 per MTok', () => { expect(tokenValues['claude-sonnet-5']).toEqual({ prompt: 2, completion: 10 }); }); - it('should apply introductory cache rates ($2.50 / $0.20) for Claude Sonnet 5', () => { + it('should apply standard cache rates ($2.50 / $0.20) for Claude Sonnet 5', () => { expect(cacheTokenValues['claude-sonnet-5']).toEqual({ write: 2.5, read: 0.2 }); }); @@ -2823,6 +2823,33 @@ describe('Claude Model Tests', () => { }); }); +describe('Mistral Large Pricing', () => { + it('should price Mistral Large 3 at $0.50 / $1.50 per MTok', () => { + const modelVariations = [ + 'mistral-large-2512', + 'mistral-large-3', + 'mistral-large-latest', + 'mistralai/mistral-large-2512', + ]; + + modelVariations.forEach((model) => { + expect(getMultiplier({ model, tokenType: 'prompt' })).toBe(0.5); + expect(getMultiplier({ model, tokenType: 'completion' })).toBe(1.5); + }); + }); + + it('should keep Mistral Large 2.1 (2411) at $2 / $6 per MTok', () => { + expect(getValueKey('mistral-large-2411')).toBe('mistral-large-2411'); + expect(getMultiplier({ model: 'mistral-large-2411', tokenType: 'prompt' })).toBe(2); + expect(getMultiplier({ model: 'mistral-large-2411', tokenType: 'completion' })).toBe(6); + }); + + it('should keep legacy Mistral Large 2402 / 2407 rates', () => { + expect(getMultiplier({ model: 'mistral-large-2402', tokenType: 'prompt' })).toBe(4); + expect(getMultiplier({ model: 'mistral-large-2407', tokenType: 'prompt' })).toBe(3); + }); +}); + describe('Premium Token Pricing', () => { const premiumModel = 'gemini-3.1'; const premiumEntry = premiumTokenValues[premiumModel]; diff --git a/packages/data-schemas/src/methods/tx.ts b/packages/data-schemas/src/methods/tx.ts index f1325c0cf0f..89ea6ccff13 100644 --- a/packages/data-schemas/src/methods/tx.ts +++ b/packages/data-schemas/src/methods/tx.ts @@ -196,7 +196,6 @@ export const tokenValues: Record 'claude-sonnet-4': { prompt: 3, completion: 15 }, 'claude-sonnet-4-5': { prompt: 3, completion: 15 }, 'claude-sonnet-4-6': { prompt: 3, completion: 15 }, - // Sonnet 5 introductory pricing through 2026-08-31; revert to { prompt: 3, completion: 15 } after. 'claude-sonnet-5': { prompt: 2, completion: 10 }, 'claude-sonnet-5-5': { prompt: 2, completion: 10 }, 'claude-sonnet-5.5': { prompt: 2, completion: 10 }, @@ -272,7 +271,10 @@ export const tokenValues: Record 'mistral-nemo': { prompt: 0.15, completion: 0.15 }, 'mistral-saba': { prompt: 0.2, completion: 0.6 }, 'pixtral-large': { prompt: 2.0, completion: 6.0 }, - 'mistral-large': { prompt: 2.0, completion: 6.0 }, + 'mistral-large': { prompt: 0.5, completion: 1.5 }, + 'mistral-large-2411': { prompt: 2.0, completion: 6.0 }, + 'mistral-large-2512': { prompt: 0.5, completion: 1.5 }, + 'mistral-large-3': { prompt: 0.5, completion: 1.5 }, 'mixtral-8x22b': { prompt: 0.65, completion: 0.65 }, kimi: { prompt: 0.6, completion: 2.5 }, moonshot: { prompt: 2.0, completion: 5.0 }, @@ -369,7 +371,6 @@ export const cacheTokenValues: Record = 'claude-sonnet-4': { write: 3.75, read: 0.3 }, 'claude-sonnet-4-5': { write: 3.75, read: 0.3 }, 'claude-sonnet-4-6': { write: 3.75, read: 0.3 }, - // Sonnet 5 introductory pricing through 2026-08-31; revert to { write: 3.75, read: 0.3 } after. 'claude-sonnet-5': { write: 2.5, read: 0.2 }, 'claude-sonnet-5-5': { write: 2.5, read: 0.2 }, 'claude-sonnet-5.5': { write: 2.5, read: 0.2 },