GeezerVison is showing github.com — feat: generic OpenAI-compatible GET /models discovery plugin · Issue #63490 · anomalyco/opencode
feat: generic OpenAI-compatible GET /models discovery plugin #63490DescriptionFeature request
Add a generic discovery plugin that calls each provider's OpenAI-compatible GET /models endpoint to supplement the static catalog from models.dev with live model IDs.
Why
Some providers (Volcengine Ark, DeepSeek, Groq, etc.) expose models that vary by API key or region. A runtime discovery plugin can list the exact models available to a given user, instead of relying solely on the static catalog.
Proposed approach
A plugin (packages/core/src/plugin/provider/) that:
- Iterates over a list of OpenAI-compatible providers (each with a
baseURL and env key list).
- Calls
GET <baseURL>/models with the provider's API key.
- Merges the returned model IDs with catalog templates from models.dev, preserving catalog metadata (cost, context limit, capabilities) where available.
- Skips models that have no catalog template (rather than adding them with zero context/cost defaults).
Concerns to discuss
- Scope: This affects ~13 providers, not just Ark. Should it be opt-in per provider?
- Model filtering:
GET /models returns all models, including non-chat models (embedding, TTS, image). Should we filter to chat models only?
- Catalog overwrite: Should discovery replace the catalog entirely, or only add models that are missing?
- Caching/frequency: How often should discovery run? Should results be cached?
This was originally part of #63471 and #63482 but was split out per maintainer feedback. Activityopencodejr commented on Nov 12, 2026 Thanks for splitting this out of #63471 / #63482 and writing up the open questions, @drpr!
I think this is a duplicate of #40524. That issue tracks reconciling V2 provider catalogs with each provider's /models endpoint and merging the results with catalog metadata (capabilities, limits, variants, display names). It also says its scope is broader than discovery for generic OpenAI-compatible custom providers, so built-in providers like Ark, DeepSeek and Groq fall under it.
Possible duplicates and related issues, ordered by likelihood:
I'm closing this issue now as a duplicate of #40524. Please add your proposal and your four open questions (opt-in scope, filtering out non-chat models, adding vs replacing, caching) there, so the design discussion stays in one place. If you think this is a different request, reply here and the issue will reopen.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|