Skip to content

[FEATURE]: Auto-Detect and Sync Local/Remote Ollama Models #26863

Closed as not planned

Description

@nilomind-code

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request 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

  1. On startup or when opening the model selection UI, check if ollama is available in the system PATH.
  2. If found, fetch available models using:
  • Primary: http://<host>:<port>/api/tags
  • Fallback: ollama list --json
  1. Parse the response and dynamically populate the model picker with model names and metadata (name, size, last modified).
  2. 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.

Activity

  1. github-actions commented on May 11, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues to see if your request is already being tracked, and consider adding your input there instead.

  2. github-actions commented on Jul 11, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions