Skip to content

[FEATURE]: Hydrate custom provider model metadata from /v1/models and Models.dev #25407

Closed as not planned

Description

@morpheus9393

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

Please improve custom OpenAI-compatible providers so model capabilities do not have to be entered manually for every model.

My custom provider exposes models through /v1/models, but OpenCode still needs each model manually configured in opencode.jsonc to get useful capabilities such as:

  • limit.context
  • limit.output
  • modalities.input, especially image support
  • reasoning variants/options for known OpenAI GPT/Codex models

The practical problem: I had an image-capable GPT model exposed by a custom provider, but OpenCode treated it as text-only until I manually added:

"modalities": {
  "input": ["text", "image"],
  "output": ["text"]
}

The context display also showed unknown capacity until I manually added limits.

For a provider with many models, manually adding all model metadata is very tedious and easy to get wrong.

Suggested behavior:

  • For custom OpenAI-compatible providers, call {baseURL}/models to discover available model IDs.
  • If a model ID is known in Models.dev, hydrate OpenCode metadata from there where possible.
  • Merge this with user config, with explicit user config taking precedence.
  • At minimum, auto-fill known limits and modalities for recognized models.

Related issues that seem to describe the same general pain point:

This issue is specifically about avoiding manual capability metadata for custom OpenAI-compatible providers, because missing metadata can make supported features, such as image input, appear broken.

Activity

  1. github-actions commented on May 2, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • This issue does not use one of the required issue templates (Bug Report, Feature Request, or Question). Please resubmit using the appropriate template — this appears to be a Feature Request, so the title should start with [FEATURE]: and include the required verification checkbox and description fields.
    • The issue contains an unusually long, extensively structured description that raises concerns about AI-generated content. Please keep descriptions concise and in your own words.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


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

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. changed the title [-]Custom providers should auto-discover model metadata from /v1/models[/-] [+][FEATURE]: Hydrate custom provider model metadata from /v1/models and Models.dev[/+] on May 2, 2026
  3. github-actions commented on May 2, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now follows the contributing guidelines and feature request template. The needs:compliance label has been removed.

  4. github-actions commented on Jul 3, 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