Skip to content
Client Panel

Troubleshoot OpenCode Setup Issues

These are the most common problems from the current setup and the quickest way to verify them.

Terminal window
brew services list | grep cliproxyapi
curl http://localhost:8317/v1/models -H "Authorization: Bearer your-api-key-1"
  • CLIProxyAPI is not running
  • the API key in opencode.json does not match cliproxyapi.conf
  • OAuth login for Codex expired or never completed

Make sure each model has both:

  • "reasoning": true
  • a "variants" object
"gpt-5.4": {
"reasoning": true,
"variants": {
"low": {"reasoningEffort": "low"},
"high": {"reasoningEffort": "high"}
}
}
Terminal window
brew services restart cliproxyapi
curl http://localhost:8317/v1/models -H "Authorization: Bearer your-api-key-1"
  • the service is stopped
  • CLIProxyAPI failed to start after a config change
  • port 8317 is not the configured port anymore

Set a non-empty remote-management.secret-key in /opt/homebrew/etc/cliproxyapi.conf, then restart the service.

Terminal window
brew services restart cliproxyapi
  • opencode.json contains the expected mcp block
  • each MCP entry is enabled where required
  • the underlying npx command can be resolved locally
"context7": {
"type": "local",
"command": ["npx", "-y", "@upstash/context7-mcp"],
"enabled": true
}

Re-authenticate and check the model list again.

Terminal window
cliproxyapi -codex-login
curl http://localhost:8317/v1/models -H "Authorization: Bearer your-api-key-1"

Restart the service and relaunch OpenCode.

Terminal window
brew services restart cliproxyapi
  1. Verify cliproxyapi is running
  2. Verify curl to /v1/models works
  3. Verify API key matches in both configs
  4. Verify opencode --version
  5. Verify opencode.json still references cliproxyapi
  6. Verify oh-my-opencode.json is valid JSON if you are using the current legacy config filename