Feature hasn't been suggested before.
Describe the enhancement you want to request
Auto-detect and dynamically load Ollama models via CLI or /api/tags endpoint
Currently, OpenCode requires manual configuration of available models in opencode.json. For users who already have Ollama installed or running (locally or remotely), this creates redundant setup friction. This feature proposes automatic model discovery by querying the Ollama binary or HTTP API, dynamically populating the model picker, and supporting custom host/port configuration for non-default instances.
Motivation
- Reduces initial setup time and manual JSON maintenance
- Aligns with the behavior of other modern AI tooling that auto-discovers local backends
- Lowers the barrier to entry for developers who manage multiple local/private models
- Creates a reusable pattern for discovering other local inference servers in the future
Proposed Behavior
- On startup or when opening the model selection UI, check if
ollama is available in the system PATH.
- If found, fetch available models using:
- Primary:
http://<host>:<port>/api/tags
- Fallback:
ollama list --json
- Parse the response and dynamically populate the model picker with model names and metadata (name, size, last modified).
- If the default
localhost:11434 is unreachable, prompt the user to configure a custom host and port for Docker, WSL, or remote instances if The local Ollama model is choosen.
Thanks for making such a good product and considering the above improvement proposal.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Auto-detect and dynamically load Ollama models via CLI or
/api/tagsendpointCurrently, OpenCode requires manual configuration of available models in
opencode.json. For users who already have Ollama installed or running (locally or remotely), this creates redundant setup friction. This feature proposes automatic model discovery by querying the Ollama binary or HTTP API, dynamically populating the model picker, and supporting custom host/port configuration for non-default instances.Motivation
Proposed Behavior
ollamais available in the system PATH.http://<host>:<port>/api/tagsollama list --jsonlocalhost:11434is unreachable, prompt the user to configure a custom host and port for Docker, WSL, or remote instances if The local Ollama model is choosen.Thanks for making such a good product and considering the above improvement proposal.