The variants came from BUDGETS (low, medium, high, max), while thinking() already read xhigh. magpie fits an effort the model doesn't offer to the nearest it does, so Claude Code's xhigh on a moved Kiro was recorded and sent as max: 166 of the reporter's requests on 10-14, after the built-in, which takes xhigh, had served it as xhigh the day before. BUDGETS now has xhigh at 50k, the budget thinking() and the built-in's kiroThinkingBudget give it, so what Kiro is asked is unchanged; only the level magpie records and passes is. Both configModel and runtimeModel read BUDGETS. Run: bun test across the repo (TMPDIR+HOME in the scratchpad), all pass; the new effort.test.mjs fails on the old BUDGETS. Not tried with a real Kiro account (none signed in on this machine).
16 lines
866 B
JavaScript
16 lines
866 B
JavaScript
import { test, expect } from "bun:test"
|
|
import { _internal } from "./index.mjs"
|
|
|
|
// Claude Code's levels are low, medium, high, xhigh and max: a thinking
|
|
// model offers each, so xhigh isn't routed as max (#120)
|
|
test("a thinking model offers xhigh as its own level", () => {
|
|
const m = { id: "claude-opus-5.5", name: "Claude Opus 5.5", context: 200000 }
|
|
for (const got of [_internal.configModel(m), _internal.runtimeModel(m)]) {
|
|
expect(Object.keys(got.variants)).toEqual(["low", "medium", "high", "xhigh", "max"])
|
|
expect(got.variants.xhigh).toEqual({ thinking: { type: "enabled", budgetTokens: 50000 } })
|
|
}
|
|
expect(_internal.thinking({ output_config: { effort: "xhigh" } }, "claude-opus-5.5")).toBe(50000)
|
|
// a model that doesn't think offers none
|
|
expect(_internal.configModel({ id: "deepseek-3.2", name: "DeepSeek" }).variants).toBeUndefined()
|
|
})
|