opencode icon indicating copy to clipboard operation
opencode copied to clipboard

opencode with openrouter API doesn't provide deepseek models.

Open wahaabm opened this issue 1 year ago • 4 comments

As shown in the screenshot, I want to use deepseek (free) model with openrouter as I have been using it with roo code for planning. I don't happen to see it in the models listed in opencode after entering my open router key.

Image

wahaabm avatar Jun 27 '25 08:06 wahaabm

the models.dev database doesn't list every model for openrouter (yet)

you'll have to configure it yourself in the config you can see how to do this in the docs

thdxr avatar Jun 27 '25 12:06 thdxr

Thankyou dax

wahaabm avatar Jun 27 '25 12:06 wahaabm

What exactly should the config look like? I have the following:

"model": "openrouter/deepseek/deepseek-r1-0528:free",
"provider": {
  "openrouter": {
    "models": {
      "deepseek/deepseek-r1-0528:free": {
        "name": "DeepSeek: R1 0528 (free)"
      }
    },
    "name": "OpenRouter",
    "npm": "@openrouter/ai-sdk-provider",
    "options": {}
  }
}

But I just get AI_APICallError: Not Found when I try a prompt.

KnifeFed avatar Jul 01 '25 00:07 KnifeFed

Confirming this is still broken in v2.1.0 (released 2026-07-04). The createPhaseReminderHook in dist/index.js is byte-for-byte identical to v1.1.2 for the mutation step:

lastUserMessage.parts.push({ type: "text", text: PHASE_REMINDER, });

No PR referenced in either v2.0.x or v2.1.0 release notes touches this hook. The <internal_reminder> block still appears at the end of every orchestrator user message in the UI and chat history.

Any chance this can be prioritized? The suggested fix (inject via system prompt instead of a user message part) is a small, self-contained change that would fully close this issue without needing any changes on the OpenCode side.

Happy to open a PR if it would help.

remotxavier avatar Jul 06 '26 06:07 remotxavier