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
bug(models): model_not_found remediation message is incomplete — suggests { "id": ... } but name is required and api/baseUrl are silently needed (misroutes to OpenAI) #89192
The model_not_found / "Unknown model" remediation message — the one added to surface the missing models.providers[<id>].models[] requirement (#80089, PRs #80098/#80104) — tells you to add a config snippet that does not work. Following it verbatim fails twice:
The suggested snippet { "id": "<model>" }fails schema validation because name is also required (ModelDefinitionSchema: id: z.string().min(1), name: z.string().min(1)).
Even after adding name, for any provider whose transport baseUrl is not supplied out-of-band (env var / bundled catalog), the entry silently misroutes to the OpenAI default endpoint and dispatches the provider's API key to platform.openai.com → confusing 401 Incorrect API key. (This is the credential-misroute tracked in bug(models): Missing google provider config silently routes Gemini requests to OpenAI #85042.)
So the message that is supposed to teach the fix leads the user straight into a schema error and then a security-adjacent misroute.
Environment
OpenClaw v2026.5.28, gateway on Linux (OrbStack VM)
Provider opencode (OpenCode Zen), key via OPENCODE_API_KEY
Steps to reproduce
Reference a provider model that exists at the provider but isn't in OpenClaw's bundled/discovered catalog, e.g. opencode/claude-opus-4-8 (OpenCode Zen serves it: GET https://opencode.ai/zen/v1/models lists it). Add it to agents.defaults.model.fallbacks.
Trigger a run that resolves to it. You get:
Unknown model: opencode/claude-opus-4-8. Found agents.defaults.models["opencode/claude-opus-4-8"],
but no matching models.providers["opencode"].models[] entry.
Add { "id": "claude-opus-4-8" } to models.providers["opencode"].models[] to register this provider model.
Follow the message exactly — add { "id": "claude-opus-4-8" }:
Add the required name ({ "id": "claude-opus-4-8", "name": "Claude Opus 4.8" }), push, restart, run:
OpenAI API error (401): Incorrect API key provided: sk-wk***fI1x.
You can find your API key at https://platform.openai.com/account/api-keys
The opencode key is dispatched to platform.openai.com.
Expected
The remediation message should produce a working config when followed verbatim. Concretely:
Include the required name field in the suggested snippet.
When the target provider has no out-of-band baseUrl, the snippet should also include api + baseUrl (or the message should explicitly note they are required), so the entry routes to the correct provider endpoint instead of silently falling back to the OpenAI adapter.
Bug type
Behavior bug — misleading/incomplete error remediation guidance.
Summary
The
model_not_found/ "Unknown model" remediation message — the one added to surface the missingmodels.providers[<id>].models[]requirement (#80089, PRs #80098/#80104) — tells you to add a config snippet that does not work. Following it verbatim fails twice:{ "id": "<model>" }fails schema validation becausenameis also required (ModelDefinitionSchema:id: z.string().min(1),name: z.string().min(1)).name, for any provider whose transportbaseUrlis not supplied out-of-band (env var / bundled catalog), the entry silently misroutes to the OpenAI default endpoint and dispatches the provider's API key toplatform.openai.com→ confusing401 Incorrect API key. (This is the credential-misroute tracked in bug(models): Missing google provider config silently routes Gemini requests to OpenAI #85042.)So the message that is supposed to teach the fix leads the user straight into a schema error and then a security-adjacent misroute.
Environment
v2026.5.28, gateway on Linux (OrbStack VM)opencode(OpenCode Zen), key viaOPENCODE_API_KEYSteps to reproduce
opencode/claude-opus-4-8(OpenCode Zen serves it:GET https://opencode.ai/zen/v1/modelslists it). Add it toagents.defaults.model.fallbacks.{ "id": "claude-opus-4-8" }:name({ "id": "claude-opus-4-8", "name": "Claude Opus 4.8" }), push, restart, run:opencodekey is dispatched toplatform.openai.com.Expected
The remediation message should produce a working config when followed verbatim. Concretely:
namefield in the suggested snippet.baseUrl, the snippet should also includeapi+baseUrl(or the message should explicitly note they are required), so the entry routes to the correct provider endpoint instead of silently falling back to the OpenAI adapter.Working config (for reference)
With
api+baseUrlpresent the request reaches Zen and succeeds.Related