Skip to content

[WRONG BRANCH] fix(cursor): gate synthetic Ultra (1m) catalog rows on discovered Max Mode capability - #357

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-max-mode-visibility-issue
Draft

[WRONG BRANCH] fix(cursor): gate synthetic Ultra (1m) catalog rows on discovered Max Mode capability#357
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-max-mode-visibility-issue

Conversation

@luvs01

@luvs01 luvs01 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Cursor discovery collects a maxModeModels capability but the catalog filter admitted synthetic Ultra rows (e.g. kimi-k3-1m) whenever the base model was present, falsely advertising 1M/Max Mode when the account lacked Max Mode.
  • The change intends to make the authoritative catalog honest about Max Mode availability so clients are not shown unsupported Ultra picker rows that would later produce rejected requests.

Description

  • Require the discovered Max Mode capability when admitting synthetic Ultra rows by extending filterCursorConfiguredModelsByLiveDiscovery with a maxModeLiveIds parameter and checking it for Ultra entries in src/adapters/cursor/discovery.ts.
  • Propagate liveResult.maxModeModels from discovery into the catalog filter call in src/codex/catalog/provider-fetch.ts so the capability signal is consulted when discovery succeeds.
  • Add regression tests in tests/cursor-ultra-mode.test.ts that assert the synthetic kimi-k3-1m row is included only when Max Mode is discovered and hidden when Max Mode is absent.
  • Keep the existing degraded/static fallback behavior unchanged: discovery failures still fall back to the configured static seed per existing policy.

Testing

  • Ran bun test tests/cursor-ultra-mode.test.ts tests/cursor-discovery.test.ts tests/cursor-uncallable-quarantine.test.ts and observed all tests in those files passed (26 passed, 0 failed).
  • Ran bun run typecheck and the repository typecheck completed successfully.
  • Ran the full suite with bun run test and validated the change; the overall run encountered two unrelated failures in tests/lab-evidence-sanitization.test.ts that are not caused by this patch and were observed during the full-suite run.
  • Verified git diff --check and focused repository checks before committing the three modified files: src/adapters/cursor/discovery.ts, src/codex/catalog/provider-fetch.ts, and tests/cursor-ultra-mode.test.ts.

Codex Task

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 88d375e3-5f63-4c8a-9c98-776b8e3f2428


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 28, 2026
@github-actions github-actions Bot changed the title fix(cursor): gate synthetic Ultra (1m) catalog rows on discovered Max Mode capability [WRONG BRANCH] fix(cursor): gate synthetic Ultra (1m) catalog rows on discovered Max Mode capability Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft August 28, 2026 04:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6fbf39911

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1311 to +1315
const available = filterCursorConfiguredModelsByLiveDiscovery(
configured,
liveResult.models,
liveResult.maxModeModels ?? [],
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve capability filtering when every configured row is rejected

When a Cursor provider explicitly configures only kimi-k3-1m and successful discovery returns a Kimi base model without any maxModeModels, this filter correctly produces an empty list, but the immediately following available.length > 0 ? available : configured restores and caches the unsupported synthetic row. The catalog therefore still advertises the 1M selector to accounts lacking the discovered capability; a successful nonempty discovery should remain authoritative even when no configured rows survive, rather than falling back to configured.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant