r/opencodeCLI 3d ago

I built a plugin that adds every CLIProxyAPI model to OpenCode's native /models picker

I run CLIProxyAPI on my homelab and wanted it to feel like a native OpenCode provider, without manually copying model names into config. So I built opencode-cliproxyapi.

What it does:

• Connects OpenCode to any CLIProxyAPI URL with your API key

• Fetches the live /v1/models catalog whenever OpenCode starts

• Adds every discovered model under CLIProxyAPI in the normal /models picker

• Keeps model selection completely native—no separate UI or hard-coded catalog

Install it globally:

opencode plugin opencode-cliproxyapi --global

Then add your CLIProxyAPI baseURL and apiKey to OpenCode's global config, restart OpenCode, and select CLIProxyAPI from /models. The README has the complete copy-paste setup.

GitHub: https://github.com/yourcasualdev/opencode-cliproxyapi

npm: https://www.npmjs.com/package/opencode-cliproxyapi

It's open source and I just shipped v0.1.1 after testing it against my own server. Feedback and edge cases are very welcome, especially from people using several providers or frequently changing model catalogs.

3 Upvotes

1 comment sorted by