← Back to list

Opencode-models-discovery 2.0 Release: Configure Shape Full, OpenCode v2 Formally Correct

itadol5j

First, the conclusion is that:Opencode-models-discovery 2.0.0, published on 19 October 2026, formally restore OpenCode v2 to the main force and v1 to the compatible adaptor.This is not a routine upgrade -- the shape of the configuration file is completely changed, and you follow the old curriculum, and you probably can't run out of line.

I stepped on three tails myself. It's all down there. First of all, what it does: it's an OpenCode plugin that solves a very annoying problem -- you get a bunch of OpenCode-compatible gateways, local model services, transiting API, and each new model goes manually to the config to hit the model name, context length, price. This plugin makes you fit only once, and the rest of it pulls itself.

opencode-models-discovery v2.0.0

What's changed this time?

The warehouse was built in April 2026 by yuhp/opencode-models-discovery, MIT, and now 188 stars, 57 fork. It doesn't sound like the top of the list, but it's a few projects in the OpenCode ecology that are serious about "model discovery."

2.0.0 There is only one core action:Raise OpenCode v2 to primary stable integrationI don't know. Technically, V2 uses original configuration structures for pulgins / providers, provider life cycle API, host hosting storage, Integration voucher, native TUI, RPC Handler and Agent Tools.

Translator: The old plugin was "I changed your configuration" and now it's "The Host opens me up." The document does not have to be written in the configuration file, the cache is given to the host manager, and the model covers can be lit in the TuI panel and not restarted.

Support level for v1 and v2

Host VersionSupport levelConfigure FieldsStorage and voucher
OpenCode v2Steady / Mainplugins and providersHost ctx.storage / ctx.integration
OpenCode v1Legacy Compatibilityplugin and providerv1 XDG Cache + auth Bottom

v1 is not cut, safe repair and serious return will remain in place. But the new functions -- life cycle, cache, TUI, RPC, model overlay -- all go only to v2, not automatically back to v1.

Two or nine metadata formats. That's the big picture.

v2.0.0 The official document has nine model information formats, which completely removes the "metadata ingestion" and "discovery scheduling". This is a smart design: the movement logic does not need to be changed for each manufacturer, with a format adapter.

FormatGet what?Additional requests
openrouterContext length, top output caps, mode (text/image/udio), prompt/complement and cache prices, tool call marks, reasoning slots (low/media/high)No additional request
aiproxyDisplay of AIProxy Inline Limiteds, Price, effort + Models.dev First Nameassembly
bifrostInline limits, mold, token, reasoning variantNo additional request
litellmRich model metadata, context limitations, prices, capabilitiesRequest /v1/model/info
lmstudioLoaded instance configuration (LM Studio 0.4.0+ native) /api/v1/modelsI'm not sure.Once.
llama-swapContext length, structure, function call marksNo additional request
models.devPublic directory bottom, common context and capabilitiesPull! models.json
omniroute(fast/flex)No additional request
vllmStraight. max_model_lenNo additional request
Nine metadata format capability comparisons

Watch the last sentence:If you don't match modelInfoFormatThen there's only model ID, there's no metadata.It's not bug, it's design -- don't guess what kind of service you're taking, avoiding a bunch of wrong prices and context lengths.

I didn't fit this field in the first place, and I looked at a list of models with only names and thought, "Why hasn't anything changed?" And I looked at them half a day.

What about the profile? Write

This is the easiest place to roll over. v1 that. plugin / provider / options Invalid all in v2, replace it with a plural settingsI don't know.

OpenCode v1OpenCode v2
pluginplugins
providerproviders
provider.<id>.npmproviders.<id>.package
provider.<id>.optionsproviders.<id>.settings
options.baseURLsettings.baseURL
options.apiKeysettings.apiKey
options.modelsDiscoverysettings.modelsDiscovery
v1 to v2 Configure Field Map

A v2 configuration that runs directly is as follows:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": [
    "opencode-models-discovery@2.0.0"
  ],
  "providers": {
    "gateway": {
      "package": "@opencode/ai/providers/openai-compatible",
      "name": "My Gateway",
      "settings": {
        "baseURL": "https://gateway.example.com/v1",
        "apiKey": "{env:GATEWAY_API_KEY}",
        "modelsDiscovery": {
          "enabled": true,
          "modelInfoFormat": "models.dev",
          "smartModelName": true,
          "cache": {
            "enabled": true,
            "ttlSeconds": 86400
          }
        }
      }
    }
  }
}

There are several points to note:

  • modelsDiscovery.enabled Yes.VisibleWrite trueI don't know. v2 is no longer default open, it is behavioural change, not optional.
  • package OpenAI Compatible Service Unified @opencode/ai/providers/openai-compatibleI don't know.
  • Certificate {env:KEY} Let the host parse, or not write. apiKeyDirectly using OpenCode. /connect Interactive entry.
  • The default pull is /v1/models(relative to baseURL origin). In contact with DeepSeek. /models Yeah, yeah, yeah. modelsDiscovery Riga. "endpoint": "/models"I don't know.
  • v2 Not at all. V1 auth.json and OPENCODE_AUTH_CONTENT Go to the bottom. It'll be stuck in 401.

IV. Model cover and cache, more functional than expected

The v2 model covers the host stored overrides:<providerID>:<modelID> Namespace. Changes can be made to fields such as display names, limits, abilities, reasoning, attachments, variants, prices, compatible metadata.

There's a lot to be said about:Fields such as vouchers and authorizations would be rejected and would never be sustainable.The border is clearly drawn — the coverage covers the display and movement parameters, not the key you plug in.

Other Organiser /models-discovery-console Visualize editing, labeling over-covered models in the list *I don't know. Change the list of models to reload and refresh the TUI directly, without restarting the service.Cache will not be deleted.That's what a lot of people do wrong.

Plugin workflows: reading configurations, pulling models, patches, injections

Cache defaults are off, then TTL defaults 24 hours, with original detection response and eutrophication, go-host ctx.storageI don't know. Note XDG cache file for v1Nope.Imports a v2, two groups of named spaces are completely isolated.

V. TUI commands and Agent Tools

The v2 offers four access points:

/models-discovery-refresh
/models-discovery-console
models_discovery_refresh
models_discovery_status

The first two are TUI commands, the last two are for automation.models_discovery_status Pass rawCache: true It's particularly useful when you can spit out the original models in the cache together with the eutrophication results.

Console also supports filtering by provider:/models-discovery-console status --provider <provider-id>I don't know. When you take three or five gateways, it saves time.

Six: Pass this check sheet before promotion.

Upgrade of the first four checklists
  • OpenCode Version:v2 requires ≥ 2.0.26; at least 1.18.29 remaining in v1.
  • Replace Fields All: complex + settingsI don't know.npm Yeah. packageI don't know.options Yeah. settingsI don't know.
  • Visible Open: Write every provider to find enabled: trueI don't know.
  • End check: No /v1/models It's manual. endpointI don't know.

The other two are easy to ignore: local construction.package To fill file:///绝对路径/distI don't know.Point to directory instead of index.jsWe need to change the code. opencode service restart Let the back-office service load the new bookle. The third is where I'm stuck -- half a day without the code, because the service didn't even start.

Is this worth pretending?

Look at your scene.

  • Only one official API: Don't pretend. The list of models is those, handwritten for a year, and the plugs are one more layer.
  • We've got the stop. / The polymer gateway.: Strong recommendation. Such service models are characterized by attendance, misnames and frequent price shifts, and manual maintenance is purely self-abuse.
  • Local running LM Studio / vLLM / llama-swap: Load. These service models are loaded on demand. The plug-in will actually load you up. max_model_len It's a lot more direct, much faster than your own configuration.
  • The company built the gateway.: Worth an assessment. Nine forms. bifrostI don't know.omniroute It's for the gateway. includeBy / excludeBy Supports regular and equivalent filtering of original fields, which can directly block models that should not be seen by ordinary users.

2.0.0 As regards itself, the release notes refer to 41 test files, 314 tests, plus local OpenAI compatible HTTP integration tests and translation product validation. This test density is serious for an 188 star project.

V1 works, but new stuff's in v2. If you want to follow up in the long term, move your configurations earlier, and don't wait until the day when the V1 adaptor only has a safety patch.

Project address:Gythub.com/yuhp/opencode-models-discovery, install direct npm i opencode-models-discovery@2.0.0 Or write the package name in the configuration above. pluginsOpenCode will solve the load itself.