You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bundled opencode (Zen) provider plugin ships no model catalog, so every Zen model a user wants must be hand-declared in models.providers.opencode.models[] with full routing (api + baseUrl + per-model metadata). The sibling opencode-go plugin does not have this problem — it bundles extensions/opencode-go/provider-catalog.ts with both a static seed and live discovery against https://opencode.ai/zen/go/v1/models.
Per-model payload is IDs only ({id, object, created, owned_by}) — no cost/context, same as the Go endpoint, so a static metadata seed is still needed for rich fields.
Impact / repro
Configure agents.defaults.model.primary: "opencode/claude-opus-4-8" (or any Zen model) without a models.providers.opencode.models[] entry → model_not_found.
Port the opencode-go pattern to the opencode plugin:
Add extensions/opencode/provider-catalog.ts — Zen base URL(s) + OPENCODE_MODELS_ENDPOINT = https://opencode.ai/zen/v1/models, a static metadata seed, and buildStatic… / buildLive…ProviderConfig (via buildLiveModelProviderConfig) / listModelCatalogEntries / resolveModel / normalizeBaseUrl.
Wire extensions/opencode/index.ts: catalog: { order, run } (static when no discovery key, live otherwise), augmentModelCatalog, resolveDynamicModel, and the normalize* hooks — mirroring opencode-go.
Questions before I send a PR
Is the missing Zen catalog intentional (Zen as a user-curated proxy) or an oversight?
If a PR is welcome, what seed scope do you prefer — the full live catalog seeded statically (48 models, more pricing upkeep), a curated headline subset (e.g. the Claude family) with live discovery covering the rest, or live-discovery-only with a minimal seed?
Any reason the live /zen/v1/models discovery shouldn't be enabled by default for Zen the way it is for Go?
Happy to send the PR once you confirm direction. I have the port largely worked out against opencode-go.
Summary
The bundled
opencode(Zen) provider plugin ships no model catalog, so every Zen model a user wants must be hand-declared inmodels.providers.opencode.models[]with full routing (api+baseUrl+ per-model metadata). The siblingopencode-goplugin does not have this problem — it bundlesextensions/opencode-go/provider-catalog.tswith both a static seed and live discovery againsthttps://opencode.ai/zen/go/v1/models.Evidence (v2026.6.6)
extensions/opencode-go/extensions/opencode/(Zen)provider-catalog.tsindex.tscatalog.run/augmentModelCatalog/resolveDynamicModelopenclaw.plugin.jsonmodelCatalognull(models: NO,defaultModels: null)The Zen models endpoint exists and mirrors the Go one:
GET https://opencode.ai/zen/v1/models→ HTTP 200, OpenAI-style{data:[…]}, 48 models (claude-fable-5,claude-opus-4-8, …,gpt-5.5,gemini-3.5-flash,grok-…,deepseek-…, etc.).{id, object, created, owned_by}) — no cost/context, same as the Go endpoint, so a static metadata seed is still needed for rich fields.Impact / repro
agents.defaults.model.primary: "opencode/claude-opus-4-8"(or any Zen model) without amodels.providers.opencode.models[]entry →model_not_found.{ "id": "...", "name": "..." }(nobaseUrl) → request silently misroutes toplatform.openai.comand the Zen key 401s. (The error message for this was improved in bug(models): model_not_found remediation message is incomplete — suggests{ "id": ... }butnameis required andapi/baseUrlare silently needed (misroutes to OpenAI) #89192 / fix(models): keep bundled provider catalog when configured base URL is blank (#91270) #91292, but the underlying "you must hand-register Zen models" remains.)Proposed fix
Port the
opencode-gopattern to theopencodeplugin:extensions/opencode/provider-catalog.ts— Zen base URL(s) +OPENCODE_MODELS_ENDPOINT = https://opencode.ai/zen/v1/models, a static metadata seed, andbuildStatic…/buildLive…ProviderConfig(viabuildLiveModelProviderConfig) /listModelCatalogEntries/resolveModel/normalizeBaseUrl.extensions/opencode/index.ts:catalog: { order, run }(static when no discovery key, live otherwise),augmentModelCatalog,resolveDynamicModel, and thenormalize*hooks — mirroringopencode-go.Questions before I send a PR
/zen/v1/modelsdiscovery shouldn't be enabled by default for Zen the way it is for Go?Happy to send the PR once you confirm direction. I have the port largely worked out against
opencode-go.