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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user