Skip to content

fix: preserve composer model selection in SDK bridge#18

Open
0xbentang wants to merge 1 commit into
standardagents:mainfrom
0xbentang:fix/sdk-model-selection
Open

fix: preserve composer model selection in SDK bridge#18
0xbentang wants to merge 1 commit into
standardagents:mainfrom
0xbentang:fix/sdk-model-selection

Conversation

@0xbentang
Copy link
Copy Markdown

Summary

  • sdkModelSelection() now maps composer-2.5 and composer-2.5-fast to proper { id, params } ModelSelection objects instead of collapsing both to { id: "default" }
  • auto/default model still correctly maps to { id: "default" } for users who explicitly want Cursor Auto mode

Closes #16

Testing

  • vitest run scripts/cursor-sdk-local-agent-bridge.test.mjs — 56 tests pass
  • Built macOS app locally and confirmed Cursor usage dashboard shows composer-2.5 instead of auto

Notes

  • The Cursor SDK model catalog has composer-2.5 as a single model with a fast parameter (true/false values), so using params in the ModelSelection is the correct SDK API.

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

Seems like everything is routed to auto

1 participant