Skip to content

fix(cursor-cli): stop pinning catalog default parameters on other models - #705

Merged
BytePioneer-AI merged 1 commit into
BytePioneer-AI:mainfrom
ump45nose:fix/cursor-cli-no-catalog-default-fast
Nov 3, 2026
Merged

BytePioneer-AI merged 1 commit into
BytePioneer-AI:mainfrom
ump45nose:fix/cursor-cli-no-catalog-default-fast

Conversation

@ump45nose

Copy link
Copy Markdown
Contributor

Summary

cursor/list_available_models reports Cursor's built-in parameter defaults for each model, not the user's remembered per-model settings (for example, Grok 4.7 is advertised with fast=true even when the user turned Fast off). cursorCatalog() baked those defaults into the Model Ref of every non-live model. Selecting such a model then went through cursorModelSelection(), which explicitly configured fast=true / context, overriding the user's settings and moving sessions onto the more expensive Fast variant. Desktop remembers the selected Ref, so subsequent threads kept using Fast.

Change (packages/adapters/cursor-cli/src/models.ts):

  • The live model keeps its parameterized Ref, since session/new configOptions reflect the user's actual settings.
  • Every other catalog model is offered as a bare Ref (cursorModelRef(value)). Selecting it only sets model, and Cursor applies the user's remembered parameters natively. This matches how Cursor's own model switch behaves (verified over ACP: set_config_option(model=grok-4.7) alone yields fast=false with the user's settings). The effective Ref is still derived from the configuration Cursor confirms after the switch, so thinking / parameter display is unchanged.

Selection of explicitly parameterized Refs (legacy path) is untouched.

Related issues

Fixes #704

Test plan

Automated (macOS arm64, Node 26):

  • npx tsc -b && npx vitest run --config tests/vitest.config.js packages/adapters/cursor-cli: 18 files, 200/200 passed. The two new tests in test/capabilities.test.ts ("Cursor catalog parameter defaults") fail without the src change.
    • non-live catalog models are offered bare, and selecting one issues only ["model", …]
    • switching to another catalog model never configures fast, and the effective Ref keeps the user's fast=false
  • npm run typecheck: passed
  • npx eslint .: passed
  • node tools/check-boundaries.mjs: passed
  • npx prettier --check on changed files: passed

Manual:

  • Probed cursor-agent 2026.10.22-27dcf5f over ACP (session/new, cursor/list_available_models, session/set_config_option) to confirm that the catalog reports defaults (grok-4.7 fast=true), while the live session and a bare model switch use the user's fast=false.

Not verified:

  • No end-to-end run in Codex Desktop. A Ref that Desktop already stored with fast=true still applies through the legacy explicit-parameter path until the user re-picks the model. That is intended, because an explicit Ref is honored as-is.

`cursor/list_available_models` reports Cursor's built-in parameter
defaults for every model rather than the user's remembered per-model
settings. Grok, for example, is advertised with `fast=true` even when the
user has turned Fast off in Cursor CLI.

The catalog baked those defaults into every non-live Model Ref, so
choosing such a model in Desktop explicitly configured `fast=true` (and
the default context) and silently moved sessions onto the more
expensive Fast variant. Desktop then remembered that Ref for new
threads.

Offer non-live models as bare Refs so selection only switches the model
and Cursor applies the user's own parameters. The live model keeps its
confirmed parameters, and the effective Ref is still derived from the
configuration Cursor confirms after the switch.

Signed-off-by: Vincent <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between b3094d5 and a49a712.

Files selected for processing: 2
  • packages/adapters/cursor-cli/src/models.ts
  • packages/adapters/cursor-cli/test/capabilities.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Recent review details
Context from checks skipped due to timeout: 5
  • GitHub Check: CodeRabbit
  • GitHub Check: Check macos-15
  • GitHub Check: Check ubuntu-22.04
  • GitHub Check: Check Linux ARM64
  • GitHub Check: Check windows-latest
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 1
Source excerpt: `codexhost` runs external Agent Harnesses as independent Threads inside Codex Desktop, preserving the official shell and native Codex path.

CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/adapters/cursor-cli/src/models.ts
  • packages/adapters/cursor-cli/test/capabilities.test.ts
Learnings: 1
Common learnings
Learnt from: CR
Repo: BytePioneer-AI/codex-host PR: 0
File: .agents/skills/codexhost-pre-push-checks/SKILL.md:0-0
Timestamp: 2026-10-31T06:53:01.023Z
Learning: Applicability reference:
AGENTS.md: # Repository Guidelines
## Repository Skills
| Task | Skill |
| --- | --- |
| Selecting local checks before pushing or claiming checks pass | [codexhost-pre-push-checks](.agents/skills/codexhost-pre-push-checks/SKILL.md) |

Source excerpt:
# codexhost 推送前检查

## 按改动面选择

规则:每个行为改动至少有一个“回归时会失败”的测试或检查;没有现成的就补一个或说明缺口。不要因为即将提交就重复跑刚通过的检查。
Additional comments: 2
packages/adapters/cursor-cli/src/models.ts: 1

70-81: LGTM!

packages/adapters/cursor-cli/test/capabilities.test.ts: 1

398-467: LGTM!

Summary

Summary by CodeRabbit

  • 问题修复
    • 模型目录中的当前模型继续显示正在使用的参数;其他模型不再沿用当前模型的参数值。
    • 切换到其他模型时,将使用该模型已记忆的参数设置。

Cursor 模型目录现在只为当前模型保留配置参数。其他模型使用裸 Ref。新增测试验证切换模型时只提交模型,并采用 Cursor CLI 返回的记忆参数。

Changes: Cursor 目录模型参数

Layer / File(s) Summary
目录 Ref 与模型切换
packages/adapters/cursor-cli/src/models.ts, packages/adapters/cursor-cli/test/capabilities.test.ts
当前模型继续使用带参数的 Ref;其他模型改用裸 Ref。新增测试覆盖模型选择、参数提交及记忆参数返回。

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

  • BytePioneer-AI/codex-host#568:该 PR 修改 Cursor Ref 与 Thinking 选项的约定,和本 PR 在 models.ts 中定义 Ref 内容的实现直接相关。

Suggested reviewers: bytepioneer-ai

Merge Risk: Minimal · up to a49a7

No actionable merge-blocking issue was identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed 标题“fix(cursor-cli): stop pinning catalog default parameters on other models”准确描述了主要变更:非实时模型不再在目录中固定默认参数,改用不带参数的基础 Ref。变更集中在 packages/adapters/cursor-cli/src/models.ts 及对应测试,标题与之相符。标题为英文,长度约 72 个字符,符合简…
Description check Passed 描述说明了问题根因(cursor/list_available_models 返回内置默认参数,cursorCatalog() 将其写入非实时模型的 Ref)、具体修改(实时模型保留带参数的 Ref,其他模型使用 cursorModelRef(value))、测试计划以及关联问题 #704。描述与变更集直接相关,内容完整。
Linked Issues check Passed PR 满足 #704 的编码要求。cursorCatalog() 保留当前模型的实际配置;非当前模型使用 cursorModelRef(model.value),因此选择非当前模型只发送 model,不会显式发送 fast 或 context。测试验证了非当前模型使用裸 Ref、选择操作仅配置模型,并在 Cursor 返回用户记忆的 fast=false 后生成有效 Ref…
Out of Scope Changes check Passed 变更范围与 #704 直接相关。packages/adapters/cursor-cli/src/models.ts 修复目录 Ref 的参数固定行为,test/capabilities.test.ts 增加对应回归测试。未发现与该问题无关的功能变更。
Full details: Title check

Explanation

标题“fix(cursor-cli): stop pinning catalog default parameters on other models”准确描述了主要变更:非实时模型不再在目录中固定默认参数,改用不带参数的基础 Ref。变更集中在 packages/adapters/cursor-cli/src/models.ts 及对应测试,标题与之相符。标题为英文,长度约 72 个字符,符合简洁要求。

Full details: Linked Issues check

Explanation

PR 满足 #704 的编码要求。cursorCatalog() 保留当前模型的实际配置;非当前模型使用 cursorModelRef(model.value),因此选择非当前模型只发送 model,不会显式发送 fast 或 context。测试验证了非当前模型使用裸 Ref、选择操作仅配置模型,并在 Cursor 返回用户记忆的 fast=false 后生成有效 Ref。

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@BytePioneer-AI
BytePioneer-AI merged commit 9172c3f into BytePioneer-AI:main Nov 3, 2026
5 checks passed
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.

[Bug] Cursor CLI 会把未选中的模型固定为 Cursor 目录默认参数,导致 Grok 默认走 Fast

2 participants