fix(provider): preserve MiniMax defaults
This commit is contained in:
parent
40bd3fdfb2
commit
f86fdb9712
2 changed files with 23 additions and 12 deletions
|
|
@ -684,10 +684,7 @@ function googleThinkingVariants(model: Provider.Model): Record<string, Record<st
|
|||
|
||||
function minimaxM3ThinkingVariants(model: Provider.Model): Provider.Model["variants"] {
|
||||
if (!model.api.id.toLowerCase().includes("minimax-m3")) return
|
||||
if (
|
||||
(model.providerID === "kilo" && model.api.npm === "@ai-sdk/openai-compatible") ||
|
||||
(model.providerID === "vercel" && model.api.npm === "@ai-sdk/gateway")
|
||||
) {
|
||||
if (model.providerID === "kilo" && model.api.npm === "@ai-sdk/openai-compatible") {
|
||||
return {
|
||||
none: { reasoning: { enabled: false } },
|
||||
thinking: { reasoning: { enabled: true } },
|
||||
|
|
|
|||
|
|
@ -3091,6 +3091,12 @@ describe("ProviderTransform.reasoningVariants", () => {
|
|||
expect(ProviderTransform.reasoningVariants(model([]), target("@ai-sdk/openai"))).toEqual({})
|
||||
})
|
||||
|
||||
test("preserves fixed reasoning for the paid OpenCode MiniMax M3 route", () => {
|
||||
expect(
|
||||
ProviderTransform.reasoningVariants(model([]), target("@ai-sdk/openai-compatible", "minimax-m3", "opencode")),
|
||||
).toEqual({})
|
||||
})
|
||||
|
||||
test.each([
|
||||
["@openrouter/ai-sdk-provider", { reasoning: { effort: "high" } }],
|
||||
["@ai-sdk/anthropic", { thinking: { type: "adaptive" }, effort: "high" }, "claude-opus-4-6"],
|
||||
|
|
@ -3271,6 +3277,22 @@ describe("ProviderTransform.reasoningVariants", () => {
|
|||
thinking: { thinking: { type: "adaptive" } },
|
||||
},
|
||||
],
|
||||
[
|
||||
"opencode",
|
||||
"@ai-sdk/anthropic",
|
||||
{
|
||||
none: { thinking: { type: "disabled" } },
|
||||
thinking: { thinking: { type: "adaptive" } },
|
||||
},
|
||||
],
|
||||
[
|
||||
"opencode-go",
|
||||
"@ai-sdk/anthropic",
|
||||
{
|
||||
none: { thinking: { type: "disabled" } },
|
||||
thinking: { thinking: { type: "adaptive" } },
|
||||
},
|
||||
],
|
||||
[
|
||||
"nvidia",
|
||||
"@ai-sdk/openai-compatible",
|
||||
|
|
@ -3295,14 +3317,6 @@ describe("ProviderTransform.reasoningVariants", () => {
|
|||
thinking: { reasoning: { enabled: true } },
|
||||
},
|
||||
],
|
||||
[
|
||||
"vercel",
|
||||
"@ai-sdk/gateway",
|
||||
{
|
||||
none: { reasoning: { enabled: false } },
|
||||
thinking: { reasoning: { enabled: true } },
|
||||
},
|
||||
],
|
||||
])("maps MiniMax M3 toggle options for %s", (providerID, npm, expected) => {
|
||||
expect(
|
||||
ProviderTransform.reasoningVariants(model([{ type: "toggle" }]), target(npm, "minimaxai/minimax-m3", providerID)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue