You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add OpenAI-compatible /v1/models endpoint to OpenCode Zen for automatic model discovery #2901
opencode zen currently doesn't expose a /v1/models endpoint, which prevents openai-compatible clients (like openwebui) from automatically discovering available models.
this forces users to manually add each model id to their client configuration, which is:
time-consuming (11+ models to add manually)
error-prone (typos in model ids)
not future-proof (requires manual updates when new models are added)
proposed solution
implement a /v1/models endpoint that returns an openai-compatible response listing all available opencode zen models.
the model data is already available at https://models.dev/api.json under .opencode.models, making implementation straightforward:
# current model list (11 models)
curl https://models.dev/api.json -s | jq '.opencode.models | keys'
use cases
this would enable openwebui and other openai-compatible clients to:
✅ automatically discover available opencode zen models on startup
✅ dynamically refresh model lists when new models are added
✅ provide better ux without manual configuration
✅ reduce support burden for integration issues
current workaround
building a local proxy server that:
intercepts /v1/models requests
fetches from models.dev/api.json
transforms to openai-compatible format
forwards all other requests to opencode
however, native support in opencode would be cleaner and more maintainable.
Activity
rekram1-node commentedon Oct 1, 2025
makes sense, thanks for raising
danilevy1212 commentedon Nov 2, 2025
Looks like it works now!
dhruvkej9 commentedon Apr 25, 2026
@rekram1-node Also can there be a config option config.json similar to this which handles the models using the v1/models? for any link?
feat(providers): add opencode-zen OpenAI-compatible provider type
fix(providers): harden OpenCode Zen model discovery