# opencode-models-discovery

An OpenCode plugin that discovers available models from any OpenAI-compatible provider automatically and injects them into OpenCode's provider configuration.

opencode-models-discovery queries a configured provider's model-listing endpoint and adds the discovered models into OpenCode's configuration, rather than requiring each model to be listed by hand. It works with any OpenAI-compatible provider and supports provider-level enablement, endpoint overrides, and both regex-based and exact-match model filtering.

It can enrich discovered models with limits and reasoning metadata from provider-specific endpoints, and supports OpenCode's connect credential flow for custom providers. The package includes a beta adapter for OpenCode v2, which uses a different plugin and provider configuration schema than OpenCode v1, alongside continued support for v1's cache and helper slash commands.

It installs with npm or Bun, is written in TypeScript, and is MIT licensed.

Website: https://github.com/yuhp/opencode-models-discovery
