fix(server): probe Cursor thinking options per model - #4180
Open
fidelix wants to merge 2 commits into
Open
Conversation
Cursor ACP only reports thought_level for the current model, so the catalog was copying Haiku's Off/On onto Grok 4.6 until the next probe happened to land on Grok. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
| Filename | Overview |
|---|---|
| packages/server/src/server/agent/providers/acp-agent.ts | Adds the shared per-model thinking catalog resolver and safely removes inherited metadata from failed non-current model probes. |
| packages/server/src/server/agent/providers/cursor-acp-agent.ts | Opts Cursor catalog discovery into the shared per-model resolver. |
| packages/server/src/server/agent/providers/kimi-acp-agent.ts | Replaces Kimi’s local resolver implementation with the equivalent shared resolver. |
| packages/server/src/server/agent/providers/cursor-acp-agent.test.ts | Covers model-specific options, single-model discovery, and both current and non-current probe failures. |
| packages/server/src/server/agent/providers/kimi-acp-agent.test.ts | Updates failed-probe expectations to ensure foreign thinking options are omitted. |
Sequence Diagram
sequenceDiagram
participant C as Catalog discovery
participant A as Cursor or Kimi ACP
C->>A: session/new
A-->>C: models and current model options
loop Each advertised model
C->>A: session/set_config_option(model)
alt Probe succeeds
A-->>C: model-specific thought_level options
C->>C: Store options on that model
else Probe fails
A-->>C: Error
C->>C: Retain current-model session options or omit metadata
end
end
C-->>C: Publish resolved catalog
Reviews (2): Last reviewed commit: "fix(server): drop inherited thinking opt..." | Re-trigger Greptile
…e fails A rejected model switch was leaving the probe session's thinking list on the failed model, so Grok could still advertise Haiku's Off/On. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #4177
Type of change
Reasoning
Cursor ACP only reports thinking levels for the model that is currently selected. The catalog probe then copied that one list onto every Cursor model.
If the probe session defaulted to Haiku, Grok 4.6 inherited Off/On. If it defaulted to Grok, every model inherited Low/Medium/High/Extra High. A daemon restart sometimes flipped which list you got. The composer was showing the cached catalog faithfully; it was not inventing Off/On.
Kimi already opted into a per-model catalog probe. Cursor now uses the same helper: during
fetchCatalog, switch each model withsession/set_config_optionand read that model'sthought_level.If a switch fails, the catalog no longer keeps another model's thinking list. Non-current models omit thinking options. The current model keeps the options from
session/new.Goals
Non-goals
QA
Before (failing test, no catalog resolver on Cursor):
That is the bug:
fetchCatalognever switched models, so every model kept Haiku's Off/On.After:
Also ran
acp-agent.test.tsnever switches models during catalog discovery— still green.Failed-probe coverage: a rejected switch on Grok omits thinking options instead of keeping Haiku's Off/On. If the current model's switch fails, that model's
session/newoptions stay.Live cursor-agent ACP (2026.08.25-3e8eec8), same host as #4177:
session/newdefaulted toclaude-haiku-4-5:thought_levelidthinking, values Off/On (false/true)session/set_config_optiontogrok-4.6:thought_levelideffort, values Low / Medium / High / Extra High (low/medium/high/xhigh), currentxhighThat matches the screenshot: Grok 4.6 showing Off/On because the catalog was probed while Haiku was current.
To pick up the fix on an existing daemon, refresh providers (Settings) or restart the daemon. Opening the thinking menu does not re-probe.
cursor-agent acpprobe on WSL2Checklist
npm run typecheckpassesnpm run lintpassesnpm run formatpasses