Wire up OpenCode
-
Edit opencode.jsonc
Open
~/.config/opencode/opencode.jsonc(Windows:%AppData%\opencode\opencode.jsonc). For each provider you want compressed:{"$schema": "https://opencode.ai/config.json","provider": {"openai": {"options": {"baseURL": "http://127.0.0.1:17322","headers": {"cmx-provider": "openai","cmx-harness": "opencode"}}}}}Copy the same
optionsblock into any other provider entry (moonshotai,github-copilot, …) — just changecmx-providerto match the provider key. -
Make sure the provider exists in cmx config
~/.config/cmx/config.json:{"providers": {"openai": { "base_url": "https://api.openai.com/v1" }}}openai,anthropic,openrouter,groq,deepseek,moonshotandzaiare preconfigured. Add your own with any OpenAI-compatible or Anthropic-compatible base URL. -
Restart and verify
Terminal window cmx restart # pick up config changesStart a session in OpenCode, then:
Terminal window cmx status # should show your provider + sessionSessions are attributed via OpenCode’s session header; each one gets its own ledger, summaries and stats in the dashboard.
Claude Code / other harnesses
Section titled “Claude Code / other harnesses”See Other harnesses — the pattern is identical: point
baseURL at the gateway, send the two cmx-* headers, optionally add a
session ID header so requests group into sessions.
