From 639e27c3ce3164480ef6abbb5775285ea0f51aa4 Mon Sep 17 00:00:00 2001 From: Ruben De Smet Date: Wed, 29 Apr 2026 23:26:24 +0200 Subject: [PATCH] feat: add Mistral Medium 3.5 with reasoning support (#24996) --- packages/opencode/src/provider/transform.ts | 5 +++-- .../opencode/test/provider/transform.test.ts | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts index a8f2fcf308..b52c94cc09 100644 --- a/packages/opencode/src/provider/transform.ts +++ b/packages/opencode/src/provider/transform.ts @@ -760,9 +760,10 @@ export function variants(model: Provider.Model): Record mistralId.includes(id))) return {} return { high: { reasoningEffort: "high" }, } diff --git a/packages/opencode/test/provider/transform.test.ts b/packages/opencode/test/provider/transform.test.ts index c4831fa82f..a12165b4f0 100644 --- a/packages/opencode/test/provider/transform.test.ts +++ b/packages/opencode/test/provider/transform.test.ts @@ -2257,7 +2257,7 @@ describe("ProviderTransform.variants", () => { expect(result).toEqual({}) }) - test("mistral with reasoning returns variants", () => { + test("mistral models with reasoning support return variants", () => { const model = createMockModel({ id: "mistral/mistral-small-latest", providerID: "mistral", @@ -2274,6 +2274,23 @@ describe("ProviderTransform.variants", () => { }) }) + test("mistral-medium-3.5 with reasoning returns variants", () => { + const model = createMockModel({ + id: "mistral/mistral-medium-3.5", + providerID: "mistral", + api: { + id: "mistral-medium-3.5", + url: "https://api.mistral.com", + npm: "@ai-sdk/mistral", + }, + capabilities: { reasoning: true }, + }) + const result = ProviderTransform.variants(model) + expect(result).toEqual({ + high: { reasoningEffort: "high" }, + }) + }) + test("mistral without reasoning returns empty object", () => { const model = createMockModel({ id: "mistral/mistral-large",