Repository navigation
fix(controls): send a thinking level as the model's effort/reasoning param (#119) - #150
Merged
Merged
Conversation
…param (#119) Cursor ignores params a model doesn't advertise, so "thinking": "medium" on grok-4.6 silently ran at Cursor's default (high). When the discovered catalog shows the model's thinking param can't carry the value, resolveControls moves it to the model's reasoning-level param (effort/reasoning; xhigh -> extra-high where needed) and the language model logs a one-time warning. An explicit effort/reasoning value still wins; unknown catalogs are unchanged.
…param win Review round 1: a language-model test now seeds models-latest.json and asserts grok-4.6 receives effort:medium, so unplugging the catalog lookup fails a test. An explicit value on any reasoning param (not only the first) now suppresses the thinking remap.
Merged
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.
Summary
Fixes #119. When a model can't take a
thinkinglevel, the provider now sends it as the param the model actually reads. Example:thinking: mediumongrok-4.6was sent unchanged; Cursor ignored it and ran at its default (high). The provider now sendseffort: medium.Behavior
resolveControlstakes the model's advertised params. Ifthinkingisn't a valid value of the model'sthinkingparam, or the model has none, it moves to the first reasoning param (effort/reasoning) that accepts the value.xhighmaps toextra-highwhere Cursor spells it that way.effort/reasoningparam wins;thinkingis dropped.warnOnce.thinkingarg is already documented as true/false only.Verification
npm run prepublishOnly: 656 tests pass, typecheck + build OK.test/controls.test.ts, plus 1 intest/language-model.test.tsthat seeds a catalog and asserts grok-4.6 receiveseffort: medium.Closes #119