OpenCode: ProviderModelNotFoundError: Model not found
OpenCode couldn't match the model reference to a provider and model it knows. The exact message, why OpenCode prints it, and the fix.
Updated November 23, 2026
The message
ProviderModelNotFoundError: Model not found
What it means
OpenCode couldn’t match the model reference to a provider and model it knows. Models are written as <providerId>/<modelId>; a typo, a provider you haven’t connected, a model dropped from the catalog, or a model ID that itself contains a slash all end here.
Fix
- Run
opencode modelsto list the provider/model IDs you can use, and copy the exact string. - Fix the
modelvalue in opencode.json (andsmall_modeland any agent’smodel) to that <providerId>/<modelId> form. - Connect the provider with /connect in the TUI so its models are listed.
- On OpenCode 2 the same failure reads ‘Model not found: <provider>/<model>’ followed by ‘Try:
opencode modelsto list available models’.
In an EnvHaven workspace
Yes, until OpenCode is signed in once. Sign in once from the workspace’s Launch menu (Sign in, or Set key for an API key); the sign-in stays on the workspace, across restarts and on every device.
Where this comes from
From OpenCode’s documentation and issue tracker: