Skip to content

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

Closed as not planned

Description

@chiefmojo

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

Activity

  1. xiaoguomeiyitian commented on Sep 9, 2026

    @xiaoguomeiyitian

    I'd like to take a shot at this one. Plan: when exact model-ID lookup fails and the ID ends with a known OpenRouter route-modifier suffix, resolve against the base catalog model while preserving the suffixed ID for provider requests. I'll open a PR shortly.

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions