Skip to content

Commit 12a2eee

Browse files
lidge-junjun
andauthored
feat(cursor): seed claude-fable-5-1 at 1M ahead of the Cursor lineup update (lidge-jun#3211)
Pre-register Claude Fable 5.1 on the Cursor surface under the three spellings Cursor has used for Claude ids (claude-fable-5-1, claude-fable-5.1, claude-5.1-fable), each with a 1M window, the full effort ladder, a thinking variant, and a verified-derived price overlay at the Anthropic list price. Any live id containing fable now infers a 1M window. Co-authored-by: jun <[email protected]>
1 parent cf25546 commit 12a2eee

7 files changed

Lines changed: 77 additions & 2 deletions

File tree

‎src/adapters/cursor/catalog.ts‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,36 @@ export const CURSOR_CAPABILITIES: Record<string, CursorCapability> = {
106106
thinking: { levels: FULL, order: T },
107107
},
108108
},
109+
// 260902 preemptive: Claude Fable 5.1 seeded ahead of Cursor's lineup update, mirroring
110+
// claude-fable-5 (same 1M window and full effort ladder). Cursor has spelled Claude ids
111+
// both Anthropic-style (`claude-opus-4-7`, thinking-then-effort) and version-first
112+
// (`claude-4.6-opus`, effort-then-thinking), so all three plausible spellings are seeded;
113+
// the live GetUsableModels filter drops whichever the roster does not expose. Collapse to
114+
// the one real spelling once it is observed.
115+
"claude-fable-5-1": {
116+
window: CONTEXT_1M,
117+
defaultVariant: "thinking",
118+
variants: {
119+
regular: { levels: FULL },
120+
thinking: { levels: FULL, order: T },
121+
},
122+
},
123+
"claude-fable-5.1": {
124+
window: CONTEXT_1M,
125+
defaultVariant: "thinking",
126+
variants: {
127+
regular: { levels: FULL },
128+
thinking: { levels: FULL, order: T },
129+
},
130+
},
131+
"claude-5.1-fable": {
132+
window: CONTEXT_1M,
133+
defaultVariant: "thinking",
134+
variants: {
135+
regular: { levels: FULL },
136+
thinking: { levels: FULL, order: E },
137+
},
138+
},
109139
"claude-sonnet-5": {
110140
window: CONTEXT_1M,
111141
defaultVariant: "thinking",

‎src/adapters/cursor/discovery.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export function inferCursorContextWindow(modelId: string): number {
3030
if (id.includes("1m")) return CONTEXT_1M;
3131
if (id.startsWith("gemini-")) return CONTEXT_1M;
3232
if (id === "glm-5.3" || id === "glm-5.2") return CONTEXT_1M;
33+
// 260902: every Fable is a 1M model; catch live spellings the seed does not carry.
34+
if (id.includes("fable")) return CONTEXT_1M;
3335
if (id.startsWith("gpt-5.6-")) return CONTEXT_1M;
3436
if (id.startsWith("gpt-5") || id === "gpt-5-codex") return CONTEXT_272K;
3537
if (id.startsWith("grok-4.5") || id.startsWith("grok-4.6")) return 500_000;
@@ -291,6 +293,11 @@ export const CURSOR_STATIC_MODELS: readonly CursorModelInfo[] = normalizeCursorM
291293
// quarantined regular wire id for the bare slug).
292294
{ id: "claude-opus-5", contextWindow: CONTEXT_1M, supportsReasoningEffort: true },
293295
{ id: "claude-fable-5", contextWindow: CONTEXT_1M, supportsReasoningEffort: true },
296+
// 260902 preemptive: Fable 5.1 seeded ahead of Cursor's lineup update (mirrors fable-5) under
297+
// the three spellings Cursor has used for Claude ids; see CURSOR_CAPABILITIES.
298+
{ id: "claude-fable-5-1", contextWindow: CONTEXT_1M, supportsReasoningEffort: true },
299+
{ id: "claude-fable-5.1", contextWindow: CONTEXT_1M, supportsReasoningEffort: true },
300+
{ id: "claude-5.1-fable", contextWindow: CONTEXT_1M, supportsReasoningEffort: true },
294301

295302
{ id: "composer-1", contextWindow: CONTEXT_200K },
296303
{ id: "composer-2.5", contextWindow: CONTEXT_200K },

‎src/adapters/cursor/effort-map.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ const CURSOR_MODEL_EFFORT_TIERS: Record<string, readonly string[]> = {
2323
// max is always the top tier (canonical order: low < medium < high < xhigh < max), confirmed
2424
// against Anthropic's effort ladder docs and Cursor's live model lineup.
2525
"claude-fable-5": ["low", "medium", "high", "xhigh", "max"],
26+
// 260902 preemptive: Fable 5.1 seeded ahead of Cursor's lineup update (mirrors fable-5) under
27+
// the three spellings Cursor has used for Claude ids.
28+
"claude-fable-5-1": ["low", "medium", "high", "xhigh", "max"],
29+
"claude-fable-5.1": ["low", "medium", "high", "xhigh", "max"],
30+
"claude-5.1-fable": ["low", "medium", "high", "xhigh", "max"],
2631
"claude-opus-4-7": ["low", "medium", "high", "xhigh", "max"],
2732
// Opus Fast tiers from the 260822 GetUsableModels dump (devlog .../300): the wire
2833
// exposes {base-without-fast}-{effort}-fast only; suffix derivation at the bottom of
@@ -49,6 +54,9 @@ const CURSOR_MODEL_EFFORT_TIERS: Record<string, readonly string[]> = {
4954
"claude-opus-4-7-thinking-fast": ["low", "medium", "high", "xhigh", "max"],
5055
"claude-sonnet-5-thinking": ["low", "medium", "high", "xhigh", "max"],
5156
"claude-fable-5-thinking": ["low", "medium", "high", "xhigh", "max"],
57+
"claude-fable-5-1-thinking": ["low", "medium", "high", "xhigh", "max"],
58+
"claude-fable-5.1-thinking": ["low", "medium", "high", "xhigh", "max"],
59+
"claude-5.1-fable-thinking": ["low", "medium", "high", "xhigh", "max"],
5260
"claude-4.6-opus-thinking": ["high", "max"],
5361
"claude-4.5-opus-thinking": ["high"],
5462
"claude-4.6-sonnet-thinking": ["medium"],
@@ -113,6 +121,9 @@ const CURSOR_THINKING_FAMILIES: Readonly<Record<string, { source: string; order:
113121
"claude-opus-4-7-thinking-fast": { source: "claude-opus-4-7-fast", order: "thinking-then-effort" },
114122
"claude-sonnet-5-thinking": { source: "claude-sonnet-5", order: "thinking-then-effort" },
115123
"claude-fable-5-thinking": { source: "claude-fable-5", order: "thinking-then-effort" },
124+
"claude-fable-5-1-thinking": { source: "claude-fable-5-1", order: "thinking-then-effort" },
125+
"claude-fable-5.1-thinking": { source: "claude-fable-5.1", order: "thinking-then-effort" },
126+
"claude-5.1-fable-thinking": { source: "claude-5.1-fable", order: "effort-then-thinking" },
116127
"claude-4.6-opus-thinking": { source: "claude-4.6-opus", order: "effort-then-thinking" },
117128
"claude-4.5-opus-thinking": { source: "claude-4.5-opus", order: "effort-then-thinking" },
118129
"claude-4.6-sonnet-thinking": { source: "claude-4.6-sonnet", order: "effort-then-thinking" },

‎src/usage/expected-prices.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ export const EXPECTED_PRICE_OVERLAYS: readonly ExpectedPriceOverlay[] = [
100100
// bundle collapses anthropic-apikey onto anthropic).
101101
{ provider: "anthropic", modelId: "claude-fable-5-1", cost4: CLAUDE_FABLE_51, source: `anthropic official Claude Fable 5.1 ${ANTHROPIC_PRICING}; cache hit = 0.025x base input`, verifiedAt: "2026-09-02", status: "verified" },
102102
{ provider: "anthropic-apikey", modelId: "claude-fable-5-1", cost4: CLAUDE_FABLE_51, source: `anthropic official Claude Fable 5.1 ${ANTHROPIC_PRICING}; cache hit = 0.025x base input`, verifiedAt: "2026-09-02", status: "verified" },
103+
// Cursor seeds Fable 5.1 preemptively under three spellings (adapters/cursor/catalog.ts);
104+
// the model-level vendor fallback only searches jawcode metadata, which has no Fable 5.1
105+
// row yet, so each Cursor spelling needs its own overlay. Vendor list price, like the
106+
// cursor/claude-opus-5 row.
107+
{ provider: "cursor", modelId: "claude-fable-5-1", cost4: CLAUDE_FABLE_51, source: `anthropic official Claude Fable 5.1 ${ANTHROPIC_PRICING}; cache hit = 0.025x base input; vendor list price applied to the Cursor surface`, verifiedAt: "2026-09-02", status: "verified-derived" },
108+
{ provider: "cursor", modelId: "claude-fable-5.1", cost4: CLAUDE_FABLE_51, source: `anthropic official Claude Fable 5.1 ${ANTHROPIC_PRICING}; cache hit = 0.025x base input; vendor list price applied to the Cursor surface`, verifiedAt: "2026-09-02", status: "verified-derived" },
109+
{ provider: "cursor", modelId: "claude-5.1-fable", cost4: CLAUDE_FABLE_51, source: `anthropic official Claude Fable 5.1 ${ANTHROPIC_PRICING}; cache hit = 0.025x base input; vendor list price applied to the Cursor surface`, verifiedAt: "2026-09-02", status: "verified-derived" },
103110
// claude-opus-5 is exposed by three providers but absent from the jawcode bundle, so
104111
// cost resolution returned null and the Logs `~$` column rendered an em dash. The
105112
// model-level vendor fallback only searches jawcode metadata, never overlays, so one

‎tests/cursor-discovery.test.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ describe("Cursor discovery metadata", () => {
5757
expect(ids).toContain("glm-5.2");
5858
expect(ids).toContain("kimi-k2.7-code");
5959
expect(ids).toContain("kimi-k3");
60+
// 260902 preemptive seed: Fable 5.1 registered ahead of Cursor's lineup update, at 1M,
61+
// under the three spellings Cursor has used for Claude ids.
62+
for (const spelling of ["claude-fable-5-1", "claude-fable-5.1", "claude-5.1-fable"]) {
63+
expect(ids).toContain(spelling);
64+
expect(cursorModelContextWindows(CURSOR_STATIC_MODELS)[spelling]).toBe(1_000_000);
65+
}
66+
// Any live Fable spelling the seed does not carry still infers a 1M window.
67+
expect(inferCursorContextWindow("claude-fable-6")).toBe(1_000_000);
6068
// Umbrella merge (devlog 260828): fast duplicate rows folded into bases.
6169
expect(ids).not.toContain("claude-opus-4-7-fast");
6270
// 260709 refresh: stale ids dropped from the static seed (cursor.com docs); gpt-5.5-extra

‎tests/cursor-effort-suffix.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ describe("#2569 Cursor explicit-thinking variants", () => {
244244
["claude-opus-4-8-thinking-fast", "xhigh", "claude-opus-4-8-thinking-xhigh-fast"],
245245
["claude-sonnet-5-thinking", "medium", "claude-sonnet-5-thinking-medium"],
246246
["claude-fable-5-thinking", "xhigh", "claude-fable-5-thinking-xhigh"],
247+
["claude-fable-5-1-thinking", "xhigh", "claude-fable-5-1-thinking-xhigh"],
248+
["claude-fable-5.1-thinking", "xhigh", "claude-fable-5.1-thinking-xhigh"],
249+
// Version-first spelling follows the 4.x families: marker at the END.
250+
["claude-5.1-fable-thinking", "max", "claude-5.1-fable-max-thinking"],
247251
// The marker moves to the END for these families.
248252
["claude-4.6-opus-thinking", "max", "claude-4.6-opus-max-thinking"],
249253
["claude-4.5-opus-thinking", "high", "claude-4.5-opus-high-thinking"],

‎tests/usage-cost.test.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ describe("resolveMatchedPrice", () => {
195195
expect(price?.sourceRef).toContain("0.025x");
196196
}
197197
expect(resolveMatchedPrice("anthropic-pb51d9b", "claude-fable-5-1")?.cost4).toEqual(COST4);
198+
// Cursor seeds the id preemptively under three spellings and jawcode has no row, so
199+
// each carries its own (derived) overlay rather than falling through to null.
200+
for (const spelling of ["claude-fable-5-1", "claude-fable-5.1", "claude-5.1-fable"]) {
201+
expect(resolveMatchedPrice("cursor", spelling), spelling).toMatchObject({ cost4: COST4, source: "expected", status: "verified-derived" });
202+
}
198203
// The cheaper cache-hit rate must not leak onto Fable 5, which stays at 0.1x.
199204
expect(resolveMatchedPrice("anthropic", "claude-fable-5")?.cost4.cacheRead).toBe(1);
200205
});
@@ -292,13 +297,16 @@ describe("resolveMatchedPrice", () => {
292297
expect(resolveMatchedPrice("openrouter", "anthropic-claude-3.5-sonnet")).toBeNull();
293298
});
294299

295-
test("16. shipped overlay membership: 58 keys, including Fable 5.1, Opus 5 and compatibility prices", () => {
296-
expect(EXPECTED_PRICE_OVERLAYS.length).toBe(58);
300+
test("16. shipped overlay membership: 61 keys, including Fable 5.1, Opus 5 and compatibility prices", () => {
301+
expect(EXPECTED_PRICE_OVERLAYS.length).toBe(61);
297302
expect(EXPECTED_PRICE_OVERLAYS.some(row => row.status === "unverified")).toBe(false);
298303
const keys = new Set(EXPECTED_PRICE_OVERLAYS.map(row => `${row.provider}/${row.modelId}`));
299304
for (const expected of [
300305
"anthropic/claude-fable-5-1",
301306
"anthropic-apikey/claude-fable-5-1",
307+
"cursor/claude-fable-5-1",
308+
"cursor/claude-fable-5.1",
309+
"cursor/claude-5.1-fable",
302310
"anthropic/claude-opus-5",
303311
"cursor/claude-opus-5",
304312
"kiro/claude-opus-5",

0 commit comments

Comments
 (0)