Skip to content

feat(llm): add Cursor provider and model picker - #223

Open
rmarinsky wants to merge 2 commits into
CyborgTests:mainfrom
rmarinsky:feat/llm-providers-cursor-foundry-bedrock
Open

rmarinsky wants to merge 2 commits into
CyborgTests:mainfrom
rmarinsky:feat/llm-providers-cursor-foundry-bedrock

Conversation

@rmarinsky

@rmarinsky rmarinsky commented Nov 23, 2026 •

Copy link
Copy Markdown

Adds Cursor as an LLM provider and a model list in the Add model form.

What changes

  • Cursor provider. Cursor has no chat API, so each request creates a Cloud Agent (no repo), polls its run, reads the reply, then deletes the agent. Official API only: POST /v1/agents, GET /v1/agents/{id}/runs/{runId}, DELETE /v1/agents/{id}.
  • Test connection checks the key (GET /v1/me) and that the model id is in GET /v1/models. It never starts an agent. If you type a display name ("Grok 4.6"), the error tells you the id (grok-4.6).
  • Model picker. The Model field lists the provider's models from the existing discover endpoint. Type to filter, click to fill the id. A typed id still works. This works for every provider.
  • One provider factory. An unknown provider now throws instead of falling back to OpenAI. The zod enums use the shared LLM_PROVIDER_TYPES.

Limits

  • 30 s to 3 min per call. Billed as Cloud Agent usage on the Cursor plan.
  • temperature and max tokens are ignored. Token counts are estimated. At most 5 screenshots.
  • No retries: a retry would start a second agent.

Screenshots

Local run on a demo report (fake data), model grok-4.6 through Cursor.

Model picker: type to filter, pick, the field gets the id.

Model picker

Cursor as primary model Picker filtered by "grok"
Models Picker
Test analysis Report failure summary
Test analysis Report summary

How to test

  1. pnpm test:backend. Provider tests mock fetch; no key needed.
  2. Settings → LLM → Add model → Cursor, paste a crsr_… key, pick a model, Test connection, Enable, Make primary.
  3. Upload a report with failures.

Checked locally with a real key on two reports: 5 test analyses, a report summary and a project summary all completed, and no agents were left behind.

Azure AI Foundry and AWS Bedrock moved to #224.

rmarinsky and others added 2 commits November 23, 2026 12:52
- One exhaustive createProvider() factory; unknown provider types throw
  instead of silently routing to OpenAI.
- Test-connection probe moved onto the provider (probe()), so each
  provider verifies with its own wire format.
- Azure AI Foundry: OpenAI subclass, /openai/v1 URL normalization,
  api-key + Bearer headers.
- AWS Bedrock: OpenAI subclass for bedrock-runtime /openai/v1; tolerates
  a missing /models.
- Cursor: official Cloud Agents API (POST /v1/agents, poll run, read
  run.result, DELETE agent); discover parses items[].
- UI: new dropdown entries with default base URL, placeholders, hints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop Azure AI Foundry and AWS Bedrock from this PR (follow-up issue).
- Test connection: Cursor checks the model id against GET /v1/models and
  suggests the id when a display name was typed.
- Key check (GET /v1/me) uses the request timeout instead of 5 s.
- Model field lists the provider's models (type to filter, pick writes id).
- More provider tests from mutation testing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rmarinsky rmarinsky changed the title feat(llm): add Cursor, Azure AI Foundry and AWS Bedrock providers feat(llm): add Cursor provider and model picker Nov 23, 2026

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.

1 participant