Skip to content

fix: use Cursor model_id when model is missing or blank - #2490

Open
vladikkuzn wants to merge 1 commit into
git-ai-project:mainfrom
vladikkuzn:fix/cursor-cli-model-unknown
Open

vladikkuzn wants to merge 1 commit into
git-ai-project:mainfrom
vladikkuzn:fix/cursor-cli-model-unknown

Conversation

@vladikkuzn

@vladikkuzn vladikkuzn commented Nov 22, 2026 •

Copy link
Copy Markdown

Cursor hooks with a missing or blank model discarded the documented model_id; blank values also created a separate empty model bucket in stats. The preset now uses the first nonblank model, then model_id, then unknown, preserving a selected value verbatim and keeping existing legacy-model precedence.

Fixes #2489.

Proof: both new regressions failed before the fix. task test TEST_FILTER=cursor passed (136 unit and 41 integration tests), as did task build, task lint, task fmt, and task format:check.

An isolated scratch-repository replay used the built binary, real trace2-driven commits, and stdin pre/post hooks. Each case attributed one accepted AI line:

Payload Before stats key After stats key
Only model_id: "model-id" cursor::unknown cursor::model-id
Whitespace model, populated model_id cursor:: cursor::model-id
Whitespace model only cursor:: cursor::unknown
Populated legacy model plus model_id cursor::legacy-slug cursor::legacy-slug

This fixes the documented payload handling, but does not establish that all observed CLI/ACP unknown models are resolved. A live capture was attempted and blocked by CLI authentication. Both fields absent still means unknown; a literal nonblank model: "unknown" retains existing precedence. No global model settings are used, and existing notes are not rewritten.

Council review

Rounds: 1

Delegate Round 1
Claude Opus 5.5 9/10
GPT-6.1 Sol 9.5/10
Grok 4.7 9/10

Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high reasoning effort. Sol verdict: approved.

Created with GPT-6.1 Terra in Codex, orchestrated by GPT-6.1 Sol in Codex.


Devin Review

@CLAassistant

CLAassistant commented Nov 22, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

This branch has not been deployed

No deployments
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.

Cursor preset ignores model_id and preserves empty model values

2 participants