fix(model-capabilities): disable thinking for minimax and non-thinking kimi

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-27 17:15:56 +09:00
parent d32300a6c5
commit 71c29c8fe0
3 changed files with 107 additions and 0 deletions
@@ -1,5 +1,6 @@
import { describe, expect, test } from "bun:test"
import { getModelCapabilities } from "./model-capabilities"
import { resolveCompatibleModelSettings } from "./model-settings-compatibility"
describe("resolveCompatibleModelSettings", () => {
@@ -467,6 +468,48 @@ describe("resolveCompatibleModelSettings", () => {
])
})
test("drops thinking for MiniMax M2.7 capabilities resolved from heuristics", () => {
// given
const capabilities = getModelCapabilities({
providerID: "volcengine",
modelID: "minimax-m2.7",
})
// when
const result = resolveCompatibleModelSettings({
providerID: "volcengine",
modelID: "minimax-m2.7",
desired: { thinking: { type: "enabled", budgetTokens: 4096 } },
capabilities,
})
// then
expect(result.thinking).toBeUndefined()
expect(result.changes[0]?.field).toBe("thinking")
expect(result.changes[0]?.reason).toBe("unsupported-by-model-metadata")
})
test("drops thinking for non-thinking Kimi K2.6 capabilities resolved from heuristics", () => {
// given
const capabilities = getModelCapabilities({
providerID: "volcengine",
modelID: "kimi-k2.6",
})
// when
const result = resolveCompatibleModelSettings({
providerID: "volcengine",
modelID: "kimi-k2.6",
desired: { thinking: { type: "enabled", budgetTokens: 4096 } },
capabilities,
})
// then
expect(result.thinking).toBeUndefined()
expect(result.changes[0]?.field).toBe("thinking")
expect(result.changes[0]?.reason).toBe("unsupported-by-model-metadata")
})
test("clamps maxTokens to the model output limit", () => {
const result = resolveCompatibleModelSettings({
providerID: "openai",