Skip to content

Commit 31c7326

Browse files
fix(cursor): add kimi-k3 with low/high/max effort tiers
Cursor serves Kimi K3 only as effort-suffixed wire ids (kimi-k3-low/-high/-max, verified via GetUsableModels 2026-07-28); the bare id returns Connect not_found. Add the base model to CURSOR_STATIC_MODELS (tier picker) and CURSOR_MODEL_EFFORT_TIERS so requests resolve to a suffixed variant, mirroring the native Kimi provider's K3 ladder.
1 parent ca7b104 commit 31c7326

4 files changed

Lines changed: 18 additions & 1 deletion

File tree

‎src/adapters/cursor/discovery.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export const CURSOR_STATIC_MODELS: readonly CursorModelInfo[] = normalizeCursorM
167167
// the request builder appends the per-model suffix (see effort-map.ts) and reasoning models
168168
// advertise effort so Codex exposes the tier picker. `supportsReasoningEffort` tracks whether the
169169
// model has *selectable effort tiers* (CURSOR_MODEL_EFFORT_TIERS), NOT merely whether it reasons:
170-
// gemini/grok/kimi/gpt-5-mini are reasoning models in the SOT but are sent bare (no tier picker).
170+
// gemini/grok/kimi-k2.7/gpt-5-mini are reasoning models in the SOT but are sent bare (no tier picker).
171171
...CURSOR_ROUTER_MODEL_IDS.map(id => ({ id, contextWindow: CONTEXT_200K, supportsReasoningEffort: false })),
172172

173173
{ id: "claude-sonnet-5", contextWindow: CONTEXT_200K, supportsReasoningEffort: true },
@@ -224,6 +224,9 @@ export const CURSOR_STATIC_MODELS: readonly CursorModelInfo[] = normalizeCursorM
224224
// take PR #73's supportsReasoningEffort for glm-5.2 (its effort-map tiers landed with the PR).
225225
{ id: "glm-5.2", contextWindow: CONTEXT_1M, supportsReasoningEffort: true },
226226
{ id: "kimi-k2.7-code", contextWindow: CONTEXT_262K },
227+
// kimi-k3: cursor.com/docs/models/kimi-k3; account-verified via GetUsableModels (2026-07-28) —
228+
// ships only as effort-suffixed kimi-k3-{low,high,max}, so the tier picker is exposed.
229+
{ id: "kimi-k3", contextWindow: CONTEXT_262K, supportsReasoningEffort: true },
227230

228231
{ id: "grok-4.5", contextWindow: 500_000, supportsReasoningEffort: true },
229232
{ id: "grok-4.5-fast", contextWindow: 500_000, supportsReasoningEffort: true },

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ const CURSOR_MODEL_EFFORT_TIERS: Record<string, readonly string[]> = {
2727
"claude-opus-5": ["low", "medium", "high", "xhigh", "max"],
2828
"claude-sonnet-5": ["low", "medium", "high", "xhigh", "max"],
2929
"glm-5.2": ["high", "max"],
30+
// GetUsableModels (2026-07-28) lists kimi-k3 only as effort-suffixed kimi-k3-{low,high,max};
31+
// the bare id returns not_found. Tiers mirror the native Kimi provider's K3 ladder.
32+
"kimi-k3": ["low", "high", "max"],
3033
// GetUsableModels (2026-07-09) lists grok-4.5-{medium,high,xhigh} and grok-4.5-fast-{medium,high,xhigh};
3134
// the bare "grok-4.5-fast" id was removed upstream and now returns not_found.
3235
"grok-4.5": ["medium", "high", "xhigh"],

‎tests/cursor-discovery.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ describe("Cursor discovery metadata", () => {
3636
expect(ids).toContain("gpt-5.5");
3737
expect(ids).toContain("glm-5.2");
3838
expect(ids).toContain("kimi-k2.7-code");
39+
expect(ids).toContain("kimi-k3");
3940
expect(ids).toContain("claude-opus-4-7-fast");
4041
// 260709 refresh: stale ids dropped from the static seed (cursor.com docs); gpt-5.5-extra
4142
// stays — it survives the live GetUsableModels filter (004_live_snapshot.md).

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ describe("Cursor per-model reasoning-effort suffix", () => {
6666
expect(modelIdFor("cursor/grok-4.5-fast", "xhigh")).toBe("grok-4.5-fast-xhigh");
6767
});
6868

69+
test("kimi-k3 maps to its live effort-suffixed variants", () => {
70+
expect(modelIdFor("cursor/kimi-k3", "low")).toBe("kimi-k3-low");
71+
expect(modelIdFor("cursor/kimi-k3", "medium")).toBe("kimi-k3-high");
72+
expect(modelIdFor("cursor/kimi-k3", "high")).toBe("kimi-k3-high");
73+
expect(modelIdFor("cursor/kimi-k3", "max")).toBe("kimi-k3-max");
74+
// Bare id (no requested effort) resolves to the model's top tier; upstream rejects the bare id.
75+
expect(modelIdFor("cursor/kimi-k3")).toBe("kimi-k3-max");
76+
expect(cursorModelEffortLadder("kimi-k3")).toEqual(["low", "high", "max"]);
77+
});
78+
6979
test("model ladders are deduped and sorted in canonical Codex order", () => {
7080
expect(cursorModelEffortLadder("claude-opus-4-8")).toEqual(["low", "medium", "high", "xhigh", "max"]);
7181
expect(cursorModelEffortLadder("glm-5.2")).toEqual(["high", "max"]);

0 commit comments

Comments
 (0)