Skip to main content

Connect OpenCode

OpenCode may have several model providers. CMX routes the one you select. Sign in through OpenCode and choose a model there first:
The list shows provider IDs, credential readiness, and whether each route is native or connected to CMX. Listing is read only. Connect one of the IDs shown:
For example, the ID might be opencode, opencode-go, or a provider you configured in OpenCode. Some custom providers need a direct HTTPS endpoint in OpenCode before CMX can connect them. CMX preserves native options and authentication while adding its local route. It supports OpenCode JSON and JSONC configuration and the OPENCODE_CONFIG override. Restart OpenCode, send a request, then check cmx stats and cmx harness verify.

Return to OpenCode directly

This restores that provider’s native route and retains unrelated OpenCode edits made while routed. To remove all CMX routing from OpenCode, use cmx harness disable opencode. Restart OpenCode afterward. If restoration reports a conflict, keep CMX installed and follow Troubleshooting; do not delete its backup files manually.
Last modified on September 24, 2026