Skip to content

Dont show models in selector #22

Closed

Description

@outluch

when I try to change model in chat - tells Loading models, and then No models available

Activity

  1. michaelandrewgamble commented on May 22, 2026

    @michaelandrewgamble

    Confirming on Cursor 3.5.17 with CursorRemote 0.1.45 (macOS 25.1.0, Apple Silicon, Node bundled with extension).

    Symptom: opening the model selector in the web client shows "Loading models…" briefly, then "No models available". Server logs show no errors — extraction silently fails.

    I ran a CDP probe against the Cursor renderer and found two selector regressions, not one. Patching selectors.json alone won't be enough.

    Regression 1 — trigger selector (in selectors.json)

    Selector Matches in Cursor 3.5.17
    .composer-unified-dropdown-model (currently shipped) 0
    .ui-model-picker__trigger (new) 1 ✅

    Live DOM dump of the new trigger:

    ```html

    Opus 4.7 Extra High

    ```

    For comparison, the mode dropdown still uses .composer-unified-dropdown (with extra Tailwind decorators: composer-unified-dropdown !border-none !rounded-full), which is why mode switching keeps working. Cursor seems to have just refactored the model picker into its own component family (ui-model-picker__*).

    Regression 2 — menu detection (hardcoded in dist/server/bundle.mjs)

    openModelMenuAndReadOptions (around the line that calls dist/server/bundle.mjs:533) does:

    ```js
    document.querySelector('[data-testid="model-picker-menu"]') !== null
    ```

    …and throws "Model picker did not open" if false.

    In current Cursor, zero elements have any data-testid containing the substring "model". That testid was removed. So even after fixing the trigger, this check will fail, the catch path will run, and you'll get the empty-list result we're seeing.

    Suggested fix

    1. selectors.json — add the new trigger as the primary strategy, keep the old one as fallback:
      ```json
      "modelDropdown": {
      "strategies": [
      ".ui-model-picker__trigger",
      ".composer-unified-dropdown-model"
      ]
      }
      ```

    2. bundle.mjs / source for openModelMenuAndReadOptions — replace the hardcoded [data-testid="model-picker-menu"] check with something that doesn't depend on a testid Cursor no longer ships. Two options I'd consider:

      • Look for any role=menu / [role="menu"] that became visible after the trigger click and contains a child whose text matches a known model name (Auto, Opus, Sonnet, GPT, etc.). More resilient to future Cursor renames.
      • Or read aria-controls from the trigger after clicking (it's null before click, but Cursor likely populates it on open) and resolve via document.getElementById.

    Scope

    Everything else in CursorRemote works fine on 3.5.17 — sending prompts, mode switching, approvals, agent state, message rendering. Only the web client's model picker is affected. The displayed "current model" (read from the trigger button text) is still correct, so users have a workaround: change the model from the IDE itself.

    Offer

    Happy to run more CDP probes against my Cursor instance to confirm any candidate fix before you cut a release — just tell me what selectors/queries to test.

  2. added a commit that references this issue on May 27, 2026
  3. len5ky commented on May 27, 2026

    @len5ky
    Owner

    @michaelandrewgamble thank you, that report saved me a probe pass and made the fix straightforward.

    Shipped in v0.1.46. Both regressions you identified are addressed:

    1. Trigger selector. selectors.json now lists .ui-model-picker__trigger as the primary modelDropdown strategy with .composer-unified-dropdown-model as a legacy fallback, so old Cursor builds still work.
    2. Menu detection. The hardcoded [data-testid="model-picker-menu"] check is gone from all nine callsites in command-executor.ts. Replaced with a cascade: legacy testid first, then resolve via the trigger's aria-controls attribute, then any visible [role="menu"][data-state="open"], then any visible [role="menu"]. First hit wins.

    While verifying locally on Cursor 3.5.33 I also caught two follow-on bugs in the same area:

    • Each model row now has an inner Edit button (React-generated id like _r_ld_), and the row's textContent concatenated the model name with "Edit" (so labels rendered as Opus 4.7 Extra HighEdit). The Edit buttons were also being extracted as separate "models". Fixed by filtering out items nested inside other candidates and stripping descendant <button> text from labels.
    • React useId ids change on every render, so they couldn't be used as stable model identifiers. Detected and routed through synthesized label::<text> ids instead.

    All paths (web client, Telegram, plan widget) now go through one shared helper, so the read and write sides can't drift. Verified end-to-end on Cursor 3.5.33 (Windows). You're credited in the v0.1.46 changelog. Closing.

    Also added scripts/probe-model-picker.ts for next time Cursor reskins this. Dumps trigger aria-controls, the resolved menu, and a sample of items.

  4. added a commit that references this issue on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions