# 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

```text
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

1. Run `opencode models` to list the provider/model IDs you can use, and copy the exact string.
2. Fix the `model` value in opencode.json (and `small_model` and any agent's `model`) to that <providerId>/<modelId> form.
3. Connect the provider with /connect in the TUI so its models are listed.
4. On OpenCode 2 the same failure reads 'Model not found: <provider>/<model>' followed by 'Try: `opencode models` to 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:

- [github.com/anomalyco/opencode/issues/48721](https://github.com/anomalyco/opencode/issues/48721)
- [github.com/anomalyco/opencode/blob/dev/services/site/src/docs/v1/content/troubleshooting.m](https://github.com/anomalyco/opencode/blob/dev/services/site/src/docs/v1/content/troubleshooting.mdx)
- [github.com/anomalyco/opencode/blob/dev/services/site/src/docs/v1/content/troubleshooting.m](https://github.com/anomalyco/opencode/blob/dev/services/site/src/docs/v1/content/troubleshooting.mdx)
- [github.com/anomalyco/opencode/blob/dev/packages/tui/src/util/error.ts](https://github.com/anomalyco/opencode/blob/dev/packages/tui/src/util/error.ts)

## Keep reading

- [OpenCode](https://envhaven.com/agents/opencode)
- [Is OpenCode down?](https://envhaven.com/status/opencode)
- [Every agent error](https://envhaven.com/errors)

Source: https://envhaven.com/errors/opencode/provider-model-not-found
