fix: preserve composer model selection in SDK bridge#18
Open
0xbentang wants to merge 1 commit into
Open
Conversation
The SDK bridge was mapping both composer-2.5 and composer-2.5-fast to
{ id: 'default' }, which routes to Cursor's Auto mode instead of the
specific Composer model. This caused usage to show as 'auto' rather than
'composer-2.5' in the Cursor dashboard, and meant Auto could route to
any model instead of Composer specifically.
Now maps:
- composer-2.5 -> { id: 'composer-2.5', params: [{ id: 'fast', value: 'false' }] }
- composer-2.5-fast -> { id: 'composer-2.5', params: [{ id: 'fast', value: 'true' }] }
- auto/default -> { id: 'default' } (unchanged)
The Cursor SDK model catalog has composer-2.5 as a single model with a
'fast' parameter, so the ModelSelection params field is the correct way
to select slow vs fast mode.
Refs standardagents#16
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
sdkModelSelection()now mapscomposer-2.5andcomposer-2.5-fastto proper{ id, params }ModelSelection objects instead of collapsing both to{ id: "default" }auto/defaultmodel still correctly maps to{ id: "default" }for users who explicitly want Cursor Auto modeCloses #16
Testing
vitest run scripts/cursor-sdk-local-agent-bridge.test.mjs— 56 tests passcomposer-2.5instead ofautoNotes
composer-2.5as a single model with afastparameter (true/falsevalues), so usingparamsin the ModelSelection is the correct SDK API.