cursor 0.2.26: a picker model whose usable id is its other family goes as that id
ysm119 on Discord, after 0.2.25: claude-haiku-5-5-thinking still failed its Test with no answer. A Team account's picker can have Claude Haiku 5.5 with thinking as its default, while cursor-agent models lists Haiku only as claude-haiku-5-5 (no thinking). modelsOf looked up the usable ids of the default's family alone, found none, and every Haiku id went out as a picker variant (claude-haiku-5-5-thinking-high, -low, ...) the account doesn't have. modelsOf now falls back to the same model's family with thinking or without it, so each variant id goes as the id the account lists. Run: bun test packages/cursor (311 pass, 0 fail) and bun scripts/check.mjs cursor (ok), in a sandbox HOME. Broken by hand: with the fam lookup back to the default's family only, the new context.test.mjs test is red (17 pass, 1 fail). Not tried: a real Team account whose list has Haiku without thinking; the owner's Cursor account doesn't show this shape. The fixture is built from the report's ids, not captured bytes.
This commit is contained in:
@@ -440,3 +440,19 @@ test("a picker model with thinking variants only takes an id 0.1.x listed withou
|
||||
const raw = await usable(tok())
|
||||
expect(request(raw, "claude-haiku-5-5-low", "", undefined).id).toBe("claude-haiku-5-5-thinking-low")
|
||||
})
|
||||
|
||||
// ysm119 on Discord again, after 0.2.25: claude-haiku-5-5-thinking still
|
||||
// failed its test. A Team account's picker can have Claude Haiku 5.5, its
|
||||
// default with thinking, while cursor-agent models lists Haiku under one id
|
||||
// of another family (claude-haiku-5-5, no thinking). The entry's family was
|
||||
// its default's alone, which the account hasn't got, so every Haiku id went
|
||||
// out as a picker variant Cursor answers "AI Model Not Found".
|
||||
test("a picker model whose usable id is of its other family, with or without thinking, goes as that id", async () => {
|
||||
const opus = OPUS55_USABLE.filter((m) => /-(medium|high)(-fast)?$/.test(m.modelId))
|
||||
for (const haiku of [["claude-haiku-5-5"], ["claude-haiku-5-5-thinking"], ["claude-haiku-5-5-low", "claude-haiku-5-5-high"], ["claude-haiku-5-5-thinking-low"]]) {
|
||||
fakeAPI(PICKER, [...opus, ...REST_USABLE, ...haiku])
|
||||
const raw = await usable(tok())
|
||||
for (const id of ["claude-haiku-5-5-thinking", "claude-haiku-5-5", "claude-haiku-5-5@300k", "claude-haiku-5-5@1m", "claude-haiku-5-5-thinking-high", "claude-haiku-5-5-low", "claude-haiku-5-5-thinking-low"])
|
||||
for (const effort of ["", "none", "low", "medium", "high", "max"]) expect([haiku, id, effort, haiku.includes(request(raw, id, effort, undefined).id)]).toEqual([haiku, id, effort, true])
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user