fix(model-capabilities): honor root thinking flags

This commit is contained in:
Ravi Tharuma
2026-03-25 15:41:12 +01:00
parent 613ef8eee8
commit 7c0289d7bc
2 changed files with 21 additions and 0 deletions
+16
View File
@@ -115,6 +115,22 @@ describe("getModelCapabilities", () => {
})
})
test("respects root-level thinking flags when providers do not nest them under capabilities", () => {
const result = getModelCapabilities({
providerID: "custom-proxy",
modelID: "gpt-5.4",
runtimeModel: {
supportsThinking: true,
},
bundledSnapshot,
})
expect(result).toMatchObject({
canonicalModelID: "gpt-5.4",
supportsThinking: true,
})
})
test("accepts runtime variant arrays without corrupting them into numeric keys", () => {
const result = getModelCapabilities({
providerID: "openai",