OpenCode Model Config

Upload or paste a /v1/models API response to generate OpenCode-compatible provider config

About This Tool

OpenCode supports custom providers, but filling the models section by hand can be tedious when a provider exposes dozens or hundreds of models through a /v1/models endpoint.

This tool converts common model list responses into an OpenCode-compatible configuration snippet. You can upload a saved JSON response or paste it directly, then copy the generated models object into your OpenCode provider configuration.

Supported Inputs

  • OpenRouter-style responses: Uses pricing, context limits, modalities, reasoning, and tool-calling metadata when available.
  • Vercel AI Gateway-style responses: Uses model tags, pricing, context window, and output token limits.
  • Best-effort responses: Handles minimal OpenAI-compatible model lists that only expose model IDs, such as simple proxy providers.

Notes

  • Non-text models, such as embedding, image generation, speech, moderation, and reranking models, are filtered out because OpenCode cannot use them as chat models.
  • Minimal provider responses cannot provide accurate costs, limits, or capabilities. In those cases, the generated config intentionally only includes model names and IDs.
  • Always review the generated output before using it, especially for providers with incomplete or unofficial metadata.