Cannot specify OpenRouter Exacto model through command line #2249

Closed
opened 2026-02-16 17:34:50 -05:00 by yindo · 3 comments
Owner

Originally created by @zwx00 on GitHub (Oct 23, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

If I put the following into my opencode.json

{
    "$schema": "https://opencode.ai/config.json",
    "model": "openrouter/z-ai/glm-4.6:exacto"
}

Then run opencode tui, it connects to the correct model (as long as the OpenRouter API key is set).

If I run it as opencode run "Say hi" --model "openrouter/z-ai/glm-4.6:exacto" however, I get:

ProviderModelNotFoundError: ProviderModelNotFoundError
 data: {
  providerID: "openrouter",
  modelID: "z-ai/glm-4.6:exacto",
},

      at getModel (src/provider/provider.ts:468:6)
      at processTicksAndRejections (native:7:39)

OpenCode version

0.15.14

Steps to reproduce

  1. Authenticate against OpenRouter with an API key
  2. Try passing openrouter/z-ai/glm-4.6:exacto as the model through the run cli

Screenshot and/or share link

No response

Operating System

MacOS Sequoia 15.5

Terminal

Terminal 2.14

Originally created by @zwx00 on GitHub (Oct 23, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description If I put the following into my `opencode.json` ```json { "$schema": "https://opencode.ai/config.json", "model": "openrouter/z-ai/glm-4.6:exacto" } ``` Then run `opencode` tui, it connects to the correct model (as long as the OpenRouter API key is set). If I run it as `opencode run "Say hi" --model "openrouter/z-ai/glm-4.6:exacto"` however, I get: ``` ProviderModelNotFoundError: ProviderModelNotFoundError data: { providerID: "openrouter", modelID: "z-ai/glm-4.6:exacto", }, at getModel (src/provider/provider.ts:468:6) at processTicksAndRejections (native:7:39) ``` ### OpenCode version 0.15.14 ### Steps to reproduce 1. Authenticate against OpenRouter with an API key 2. Try passing `openrouter/z-ai/glm-4.6:exacto` as the model through the `run` cli ### Screenshot and/or share link _No response_ ### Operating System MacOS Sequoia 15.5 ### Terminal Terminal 2.14
yindo added the bug label 2026-02-16 17:34:50 -05:00
yindo closed this issue 2026-02-16 17:34:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #749: Similar issue with OpenRouter models containing colons (:) in their identifiers causing crashes when used via command line
  • #3076: ProviderModelNotFoundError specifically with z.ai/glm-4.6 model (though in subagent context)
  • #2036: OpenRouter model syntax not being properly supported in command line arguments

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 23, 2025): This issue might be a duplicate of existing issues. Please check: - #749: Similar issue with OpenRouter models containing colons (:) in their identifiers causing crashes when used via command line - #3076: ProviderModelNotFoundError specifically with z.ai/glm-4.6 model (though in subagent context) - #2036: OpenRouter model syntax not being properly supported in command line arguments Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 23, 2025):

@zwx00 did you define this model in your opencode.json? because it isn't in the default model list

If you do this it should work
... ...

Edit: nvm i updated models.dev so u dont need this^^

@rekram1-node commented on GitHub (Oct 23, 2025): @zwx00 did you define this model in your opencode.json? because it isn't in the default model list ~~If you do this it should work~~ ... <deleted> ... Edit: nvm i updated models.dev so u dont need this^^
Author
Owner

@rekram1-node commented on GitHub (Oct 23, 2025):

I just updated models.dev so you shouldn't have to specify exacto models manually anymore

If you do rm ~/.cache/opencode/models.json and restart opencode you should see them pop up as options

@rekram1-node commented on GitHub (Oct 23, 2025): I just updated models.dev so you shouldn't have to specify exacto models manually anymore If you do `rm ~/.cache/opencode/models.json` and restart opencode you should see them pop up as options
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2249