From 639e27c3ce3164480ef6abbb5775285ea0f51aa4 Mon Sep 17 00:00:00 2001 From: Ruben De Smet Date: Wed, 29 Apr 2026 23:26:24 +0200 Subject: feat: add Mistral Medium 3.5 with reasoning support (#24996) --- packages/opencode/src/provider/transform.ts | 5 +++-- packages/opencode/test/provider/transform.test.ts | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts index a8f2fcf30..b52c94cc0 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 c4831fa82..a12165b4f 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", -- cgit v1.2.3