Troubleshoot OpenCode Setup Issues
These are the most common problems from the current setup and the quickest way to verify them.
Models do not appear in OpenCode
Section titled “Models do not appear in OpenCode”brew services list | grep cliproxyapicurl http://localhost:8317/v1/models -H "Authorization: Bearer your-api-key-1"Usually caused by
Section titled “Usually caused by”- CLIProxyAPI is not running
- the API key in
opencode.jsondoes not matchcliproxyapi.conf - OAuth login for Codex expired or never completed
No reasoning / thinking variants appear
Section titled “No reasoning / thinking variants appear”Make sure each model has both:
"reasoning": true- a
"variants"object
Example
Section titled “Example”"gpt-5.4": { "reasoning": true, "variants": { "low": {"reasoningEffort": "low"}, "high": {"reasoningEffort": "high"} }}Connection refused on localhost:8317
Section titled “Connection refused on localhost:8317”brew services restart cliproxyapicurl http://localhost:8317/v1/models -H "Authorization: Bearer your-api-key-1"Usually caused by
Section titled “Usually caused by”- the service is stopped
- CLIProxyAPI failed to start after a config change
- port
8317is not the configured port anymore
Management panel returns 404
Section titled “Management panel returns 404”Set a non-empty remote-management.secret-key in /opt/homebrew/etc/cliproxyapi.conf, then restart the service.
brew services restart cliproxyapiOpenCode works but MCP tools are missing
Section titled “OpenCode works but MCP tools are missing”opencode.jsoncontains the expectedmcpblock- each MCP entry is enabled where required
- the underlying
npxcommand can be resolved locally
Example MCP commands
Section titled “Example MCP commands”"context7": { "type": "local", "command": ["npx", "-y", "@upstash/context7-mcp"], "enabled": true}Codex login expired
Section titled “Codex login expired”Re-authenticate and check the model list again.
cliproxyapi -codex-logincurl http://localhost:8317/v1/models -H "Authorization: Bearer your-api-key-1"Config changes do not apply
Section titled “Config changes do not apply”Restart the service and relaunch OpenCode.
brew services restart cliproxyapiQuick recovery checklist
Section titled “Quick recovery checklist”- Verify
cliproxyapiis running - Verify
curlto/v1/modelsworks - Verify API key matches in both configs
- Verify
opencode --version - Verify
opencode.jsonstill referencescliproxyapi - Verify
oh-my-opencode.jsonis valid JSON if you are using the current legacy config filename