Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-9220: fix(usage): price Claude Fable 5.2 on Cursor (#10570)

Jiayuan Zhangd93147be43a1
diff --git a/packages/views/runtimes/utils.test.ts b/packages/views/runtimes/utils.test.ts
index ea94e924e9..24a92dcefe 100644
--- a/packages/views/runtimes/utils.test.ts
+++ b/packages/views/runtimes/utils.test.ts
@@ -799,6 +799,7 @@ describe("estimateCost", () => {
expect(cost("claude-opus-5-5-high")).toBeCloseTo(opus55, 5);
expect(cost("claude-opus-5-5-max")).toBeCloseTo(opus55, 5);
expect(cost("claude-fable-5-1-thinking-high")).toBeCloseTo(10 + 50 + 0.25 + 12.5, 5);
+ expect(cost("claude-fable-5-2-xhigh")).toBeCloseTo(8 + 40 + 0.2 + 10, 5);
// Thinking after the effort level, and the older `claude-4.6-sonnet` naming.
expect(cost("claude-4.6-sonnet-medium-thinking")).toBeCloseTo(3 + 15 + 0.3 + 3.75, 5);
expect(cost("gpt-5.5-extra-high")).toBeCloseTo(5 + 30 + 0.5, 5);
diff --git a/packages/views/runtimes/utils.ts b/packages/views/runtimes/utils.ts
index 7f8c29e904..260576a4d6 100644
--- a/packages/views/runtimes/utils.ts
+++ b/packages/views/runtimes/utils.ts
@@ -523,6 +523,7 @@ const MODEL_PRICING: Record<
"cursor/claude-opus-4-7-fast": { input: 30, output: 150, cacheRead: 3, cacheWrite: 37.5 },
"cursor/claude-4.6-opus": { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 },
"cursor/claude-4.5-opus": { input: 5, output: 25, cacheRead: 0.5, cacheWrite: 6.25 },
+ "cursor/claude-fable-5-2": { input: 8, output: 40, cacheRead: 0.2, cacheWrite: 10 },
"cursor/claude-fable-5-1": { input: 10, output: 50, cacheRead: 0.25, cacheWrite: 12.5 },
"cursor/claude-fable-5": { input: 10, output: 50, cacheRead: 1, cacheWrite: 12.5 },
"cursor/claude-sonnet-5-5": { input: 2, output: 10, cacheRead: 0.1, cacheWrite: 2.5 },
diff --git a/server/internal/metrics/cursor_pricing.go b/server/internal/metrics/cursor_pricing.go
index 50245db5b0..a2f8ca8599 100644
--- a/server/internal/metrics/cursor_pricing.go
+++ b/server/internal/metrics/cursor_pricing.go
@@ -47,6 +47,7 @@ var cursorModelPrices = buildCursorPrices([]struct {
{"claude-opus-4-7-fast", 30, 150, 3, 37.5},
{"claude-4.6-opus", 5, 25, 0.5, 6.25},
{"claude-4.5-opus", 5, 25, 0.5, 6.25},
+ {"claude-fable-5-2", 8, 40, 0.2, 10},
{"claude-fable-5-1", 10, 50, 0.25, 12.5},
{"claude-fable-5", 10, 50, 1, 12.5},
{"claude-sonnet-5-5", 2, 10, 0.1, 2.5},
diff --git a/server/internal/metrics/cursor_pricing_test.go b/server/internal/metrics/cursor_pricing_test.go
index 3cca23ab98..f77e4025f3 100644
--- a/server/internal/metrics/cursor_pricing_test.go
+++ b/server/internal/metrics/cursor_pricing_test.go
@@ -12,6 +12,7 @@ func TestPriceForRuntimeModelCursorVariants(t *testing.T) {
{"claude-opus-5-thinking-max", "claude-opus-5"},
{"claude-4.6-sonnet-medium-thinking", "claude-4.6-sonnet"},
{"claude-fable-5-1-thinking-high", "claude-fable-5-1"},
+ {"claude-fable-5-2-xhigh", "claude-fable-5-2"},
{"gpt-5.5-extra-high", "gpt-5.5"},
{"gpt-5.6-sol-none", "gpt-5.6-sol"},
{"gpt-5.3-codex-xhigh", "gpt-5.3-codex"},
@@ -53,6 +54,7 @@ func TestPriceForRuntimeModelCursorRates(t *testing.T) {
{"claude-opus-4-7-high-fast", 30, 150, 3, 37.5},
{"claude-opus-5-5-high-fast", 8, 40, 0.4, 10},
{"claude-opus-5-high-fast", 10, 50, 1, 12.5},
+ {"claude-fable-5-2-xhigh", 8, 40, 0.2, 10},
{"gpt-5.5-high-fast", 12.5, 75, 1.25, 0},
{"gemini-3.6-flash-high", 1.5, 7.5, 0.15, 0},
{"gemini-3.5-flash", 1.5, 9, 0.15, 0},