Skip to content

fix(variants): normalize enum keys and drop 'none' for provider parity#48

Merged
justin-carper merged 1 commit into
mainfrom
fix/variant-mapping-parity
Jun 24, 2026
Merged

fix(variants): normalize enum keys and drop 'none' for provider parity#48
justin-carper merged 1 commit into
mainfrom
fix/variant-mapping-parity

Conversation

@justin-carper

Copy link
Copy Markdown
Collaborator

Problem

Surveyed all 29 models in the real Cursor catalog (cached model discovery) and compared variant output against models.dev standard providers. Two mapping inconsistencies found on GPT models:

Issue Cursor Standard (models.dev)
Top-tier label extra-high xhigh
Reasoning-off value none surfaced as a selectable variant none = implicit default (no variant selected)

Fix

buildModelVariants enum reasoning branch (src/model-variants.ts):

  1. Skip nonenone = reasoning OFF = the model's default when no variant is selected. Surfacing it as a selectable entry is meaningless; it's dropped from the enum loop.
  2. Alias extra-highxhigh — the variant KEY normalizes to xhigh so the cycler label matches standard providers. The param VALUE sent to Cursor's API stays extra-high (Cursor's wire format, unchanged). Collision-prefix logic now uses the display key.

Behavior matrix (after fix)

Model Before After Standard
gpt-5.5 none, low, medium, high, extra-high, fast low, medium, high, xhigh, fast effort[none|low|medium|high|xhigh] + fast
gpt-5.4 none, low, medium, high, extra-high, fast low, medium, high, xhigh, fast effort[none|low|medium|high|xhigh] + fast
gpt-5.3-codex low, medium, high, extra-high, fast low, medium, high, xhigh, fast (not in models.dev)
gpt-5.4-mini none, low, medium, high, xhigh low, medium, high, xhigh effort[none|low|medium|high|xhigh]
claude-opus-4-8 low, medium, high, xhigh, max, fast (unchanged) effort[low|medium|high|xhigh|max] + fast
claude-opus-4-5 thinking (unchanged — bool-only) effort[low|medium|high] + budget_tokens

Out of scope

  • Boolean-only thinking models (no effort enum on Cursor; only reasoning control available) — unchanged
  • fast toggle placement (UX/categorization concern, not a mapping bug) — unchanged
  • context enum (intentionally unsupported; consistent with models.dev) — unchanged

Tests

4 new tests in test/model-variants.test.ts:

  1. extra-highxhigh rename (key normalizes, wire value preserved)
  2. none dropped from reasoning enum
  3. Realistic GPT shape: reasoning=[none,low,medium,high,extra-high] + fastlow, medium, high, xhigh, fast with fast:false baked in
  4. Collision guard: effort=xhigh + reasoning=extra-high → second prefixed reasoning-xhigh

Verification

  • npx vitest run194 passed (18 files) (+4)
  • npx tsc --noEmit → exit 0
  • Catalog simulation across all 29 cached models: GPT models now show xhigh (not extra-high) and no none; Claude and boolean-only models unchanged

Cursor GPT models expose a 'none' reasoning value (reasoning OFF) and
label the top tier 'extra-high'. Standard opencode providers (models.dev)
use 'xhigh' for that tier and treat 'none' as the implicit default, not a
selectable level. The cycler therefore showed 'none' and 'extra-high' as
variant keys, breaking parity with how the same models appear under other
providers.

Skip 'none' in the enum reasoning branch — it's the model default (no
variant selected). Alias 'extra-high' to 'xhigh' for the variant KEY so
the picker label matches the standard; the param VALUE sent to Cursor's
API stays 'extra-high' (wire format unchanged). The collision-prefix guard
now uses the display key.

Tests: extra-high→xhigh rename, none dropped, realistic GPT shape
(none+extra-high+fast composition), and an extra-high/xhigh collision guard.
@justin-carper justin-carper merged commit 46e196d into main Jun 24, 2026
6 checks passed
@justin-carper justin-carper deleted the fix/variant-mapping-parity branch June 24, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant