feat(cursor-proxy): support model selection via CURSOR_MODEL env var#3421
Closed
aulorbe wants to merge 1 commit into
Closed
feat(cursor-proxy): support model selection via CURSOR_MODEL env var#3421aulorbe wants to merge 1 commit into
aulorbe wants to merge 1 commit into
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
aafe08b to
7ac7ef6
Compare
… tests - Export promptModelPicker for testability - Filter models to Cursor-compatible providers (OpenAI, Anthropic, Google, xAI) with tool/function calling support - Add 12 unit tests covering: provider filtering, tool filtering, fetch failure fallback, cancel handling, spinner messages, and empty filter results
7ac7ef6 to
2dddbcc
Compare
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
Stacked on #3420.
The Cursor proxy previously hardcoded
"openrouter/auto"for all OpenRouter API calls, always reportedClaude Sonnet 4.6as the default model, and offered no way to pick a different model.This PR:
modelEnvVar: "CURSOR_MODEL"to the Cursor agent config so the orchestrator injects the user's model choice into.spawnrc/api/v1/modelsendpoint (cached after first fetch, falls back to a default if it fails)CURSOR_MODELfrom the environment and forwards it to OpenRouter; the unary proxy'sGetDefaultModelForCliandGetUsableModelsresponses reflect the configured modelUsers can set their preferred model via:
MODEL_IDenv var~/.config/spawn/preferences.jsonTest plan
bunx @biomejs/biome check src/passesbun test src/__tests__/cursor-proxy.test.ts— all 13 tests passbun test src/__tests__/cmd-interactive-cov.test.ts— all 10 tests pass