Repository navigation
fix(cursor-cli): stop pinning catalog default parameters on other models - #705
Conversation
`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]>
|
No actionable comments were generated in the recent review.
|
| 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: 
4
-
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.
Summary
cursor/list_available_modelsreports Cursor's built-in parameter defaults for each model, not the user's remembered per-model settings (for example, Grok 4.7 is advertised withfast=trueeven 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 throughcursorModelSelection(), which explicitly configuredfast=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):session/newconfigOptions reflect the user's actual settings.cursorModelRef(value)). Selecting it only setsmodel, 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 yieldsfast=falsewith 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 intest/capabilities.test.ts("Cursor catalog parameter defaults") fail without thesrcchange.["model", …]fast, and the effective Ref keeps the user'sfast=falsenpm run typecheck: passednpx eslint .: passednode tools/check-boundaries.mjs: passednpx prettier --checkon changed files: passedManual:
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'sfast=false.Not verified:
fast=truestill 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.