anomalyco / anomalyco/opencode

OpenRouter route-modifier suffixes (:floor, :nitro, :exacto) can't be referenced in model IDs

Open
#48,016 1 comment 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Sep 8, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

OpenRouter route-modifier suffixes (:floor, :nitro, :exacto, :online) cannot be referenced in model IDs, even though they are valid OpenRouter model identifiers. These suffixes are request-time routing modifiers on OpenRouter, not separate model SKUs, so they never appear as keys in the models.dev catalog — but OpenCode resolves model references by exact key lookup with no suffix handling.

Environment
  • OpenCode v1.18.29
  • Linux
  • Provider: OpenRouter
Reproduction

Configure an agent model as openrouter/openai/gpt-5.6-luna:floor (or pass -m openrouter/openai/gpt-5.6-luna:floor). The model is valid — OpenRouter routes it fine when given the same identifier directly.

Result: spawn fails with

Model not found: openrouter/openai/gpt-5.6-luna:floor.
Did you mean: openai/gpt-5.6-luna, openai/gpt-5.6-luna-pro, gpt-5.6-sol-floor?

Note the suggestion list offers the base model openai/gpt-5.6-luna — the resolver knows the base but does not strip the route-modifier suffix to resolve against it.

Context: in my setup the agent model string was configured via the oh-my-opencode-slim plugin's preset (oh-my-opencode-slim.json, agent model field). That plugin passes the model string to OpenCode verbatim — all resolution happens in OpenCode — so this is not a plugin bug, just how I hit it. The same failure occurs with -m openrouter/openai/gpt-5.6-luna:floor directly.

The only workaround is to define a custom model key whose id carries the suffix:

{
  "provider": {
    "openrouter": {
      "models": {
        "gpt-5.6-sol-floor": {
          "name": "GPT 5.6 Sol (Floor)",
          "id": "openai/gpt-5.6-sol:floor"
        }
      }
    }
  }
}

This routes correctly. (Aside: such alias keys also resolve with zeroed cost data — opencode models --verbose shows $0 rates for the alias while the base model is priced — so spend display breaks too. Not the point of this report, but it falls out of the same resolution gap.)

Expected behavior

A model reference ending in a known OpenRouter route-modifier suffix (:floor, :nitro, :exacto, :online) should resolve against the base model, the same way models.dev-listed colon SKUs (e.g. :free variants) already resolve as keys.

Related
  • #3385 — cannot specify OpenRouter Exacto model via CLI (same lookup failure for :exacto)
  • #749 / #3993 — older colon/multi-segment parsing bugs, since fixed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.