Skip to content

Vercel AI Gateway virtual models (vmc/*) only offer low, medium and high #54732

Open

Description

@rebelliard

Description

Vercel AI Gateway virtual models (vmc/*) only get the low, medium and high levels. A virtual model is an alias for a real model, for example anthropic/claude-opus-5.5. OpenCode does not know which model the alias stands for, so it picks the level list from the id prefix. vmc matches no family, and the list falls back to the generic one (vercelGateway, v2.0.27).

The levels of the real model are missing. You can't pick none or xhigh, and you can't turn reasoning off on an alias that points at a model with a none level.

The selected level does work. I checked on 2.0.26 with a logging proxy. OpenCode sends the effort natively and the gateway applies it to the model that serves the request. Only the list is wrong.

I have a small fix: an optional base on a configured model. The model inherits levels, limits and cost from that catalog model, and requests still go to the alias id. I will open a PR. If you prefer another name or another approach, I can change it.

OpenCode version

2.0.26 (same code on v2.0.27)

Steps to reproduce

  1. Set provider.vercel.models["vmc/<alias>"] for an alias that points at a model with a none level, for example openai/gpt-6-luna.
  2. Run opencode api GET /api/model and read variants for the alias. They are low, medium, high.
  3. Compare with vercel/openai/gpt-6-luna: none, low, medium, high, xhigh, max.

Operating System

macOS 26.6.2

Activity

  1. opencode-agent commented on Oct 12, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed write-up and for checking that the gateway already applies the selected effort.

    As I understand it, you'd like a configured model to point at a catalog model (your proposed base). The alias would then inherit that model's reasoning levels, limits and cost, while requests still go to the vmc/* id. Right now OpenCode can't tell what an alias resolves to, so it falls back to the generic low/medium/high list. Maintainers will consider the approach and the option name when your PR comes in.

    In the meantime, you should be able to work around it by listing the variants on the alias yourself. When variants is set, the default list isn't generated. Something like:

    "provider": {
      "vercel": {
        "models": {
          "vmc/<alias>": {
            "variants": [
              { "id": "none", "settings": { "reasoningEffort": "none" } },
              { "id": "low", "settings": { "reasoningEffort": "low" } },
              { "id": "medium", "settings": { "reasoningEffort": "medium" } },
              { "id": "high", "settings": { "reasoningEffort": "high" } },
              { "id": "xhigh", "settings": { "reasoningEffort": "xhigh" } }
            ]
          }
        }
      }
    }

    The exact settings depend on the model behind the alias, so you may need to copy them from what opencode api GET /api/model shows for the real model.

    Related:

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

Metadata

Metadata

Assignees

No one assigned

    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