From 0aba3db519e18ec14e493e561869a57451aa7d82 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 9 Dec 2025 21:06:23 +0000 Subject: [PATCH] feat: add Mistral Devstral 2 model support - Add Devstral 2 models (devstral-latest, devstral-medium-latest, devstral-2512) - Add Devstral Small 2 models (labs-devstral-small-2512, devstral-small-latest) - Update all models to 256k context window - Set image support for all new models as per documentation - Configure pricing: Devstral 2 at $0.4/$2.0 per M tokens, Devstral Small 2 at $0.1/$0.3 per M tokens Fixes #9951 --- packages/types/src/providers/mistral.ts | 42 +++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/packages/types/src/providers/mistral.ts b/packages/types/src/providers/mistral.ts index 25546e5a42..6dbea16d00 100644 --- a/packages/types/src/providers/mistral.ts +++ b/packages/types/src/providers/mistral.ts @@ -15,15 +15,53 @@ export const mistralModels = { inputPrice: 2.0, outputPrice: 5.0, }, - "devstral-medium-latest": { + // Devstral 2 models - https://docs.mistral.ai/models/devstral-2-25-12 + "devstral-latest": { maxTokens: 8192, - contextWindow: 131_000, + contextWindow: 256_000, supportsImages: true, supportsPromptCache: false, supportsNativeTools: true, inputPrice: 0.4, outputPrice: 2.0, }, + "devstral-medium-latest": { + maxTokens: 8192, + contextWindow: 256_000, + supportsImages: true, + supportsPromptCache: false, + supportsNativeTools: true, + inputPrice: 0.4, + outputPrice: 2.0, + }, + "devstral-2512": { + maxTokens: 8192, + contextWindow: 256_000, + supportsImages: true, + supportsPromptCache: false, + supportsNativeTools: true, + inputPrice: 0.4, + outputPrice: 2.0, + }, + // Devstral Small 2 - https://docs.mistral.ai/models/devstral-small-2-25-12 + "labs-devstral-small-2512": { + maxTokens: 8192, + contextWindow: 256_000, + supportsImages: true, + supportsPromptCache: false, + supportsNativeTools: true, + inputPrice: 0.1, + outputPrice: 0.3, + }, + "devstral-small-latest": { + maxTokens: 8192, + contextWindow: 256_000, + supportsImages: true, + supportsPromptCache: false, + supportsNativeTools: true, + inputPrice: 0.1, + outputPrice: 0.3, + }, "mistral-medium-latest": { maxTokens: 8192, contextWindow: 131_000,