Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Cursor custom models fail with opaque ACP Invalid value; OpenRouter ids cannot run on cursor-agent #13267

Closedluisfelipesena(GitHub profile, opens in a new tab) opened this issue 1 comment

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Open Settings → Providers → Cursor → Models.
  2. Add a custom model such as deepseek/deepseek-v4.1-flash (OpenRouter-style id also works in Cursor IDE BYOK).
  3. Start a thread with that model selected and send a message.

Expected behavior

Either the model runs, or T3 refuses it with a clear message that cursor-agent only accepts the Cursor account catalog and that OpenRouter/BYOK ids belong on OpenCode (or Claude with ANTHROPIC_BASE_URL).

Actual behavior

Session start fails with a raw ACP validation dump:

Invalid value 'deepseek/deepseek-v4.1-flash' for session config option 'model': expected one of default, grok-4.7, ...

Impact

Major degradation or frequent failure

Environment

  • T3 Code (local build / Alpha)
  • cursor-agent 2026.09.18 (also reproduced on earlier builds)
  • macOS Darwin arm64

Additional context

Root cause (probed live):

  1. T3 merges CursorSettings.customModels into the picker via providerModelsFromSettings.
  2. On session start, applyCursorAcpModelSelection → setModel → AcpSessionRuntime.validateConfigOptionValue rejects any id outside the live ACP select options from session/new.
  3. Even bypassing that gate, cursor-agent itself rejects the id (Cannot use this model) and Cursor policy excludes the CLI from BYOK. Pointing apiEndpoint at https://openrouter.ai/api/v1/cursor returns [unimplemented] / is not Cursor's protobuf backend.

Working path today: OpenCode with openrouter/deepseek/deepseek-v4.1-flash (verified: opencode run -m openrouter/deepseek/deepseek-v4.1-flash returns T3_DEEPSEEK_OK).

I have a small fix PR ready: fail fast with an actionable message, hide Add custom model for Cursor (same carve-out as Antigravity), and document OpenCode as the BYOK path.

  1. Note

    Grok responding on behalf of Julius.

    This should be covered by #19678, which just merged. The ACP path from this report has since been replaced by the Cursor SDK on main, and picking a model outside your Cursor account catalog now fails with a clear message explaining that Cursor only runs account-catalog models, and it points API-key or OpenRouter models to OpenCode instead of showing a generic error. Closing as fixed; if you still see the opaque error on a build that includes #19678, reply here and we'll reopen.

  2. juliusmarminge closed this

Sign in to join this conversation.