OpenCode
sst/opencode is an
OpenAI-compatible TUI that talks
/v1/chat/completions. It uses the AI SDK's
openai-compatible provider, so you point it at
rapid-mlx's base URL and any served alias just works.
/v1/chat/completions ·
Setup: rapid-mlx agents opencode --setup ·
Matrix cell:
✅ ✅ XFAIL(arch) ✅
(DeepSeek R1-Distill tool-emission gap — see
XFAIL arch).
Install
$ brew install sst/tap/opencode # or $ npm install -g opencode-ai
Config
One-shot: rapid-mlx agents opencode --setup writes
~/.config/opencode/opencode.json. By hand, the exact
template rapid-mlx 0.10.3 emits:
// ~/.config/opencode/opencode.json { "$schema": "https://opencode.ai/config.json", "provider": { "rapid-mlx": { "npm": "@ai-sdk/openai-compatible", "name": "Rapid-MLX", "options": { "baseURL": "http://localhost:8000/v1", "apiKey": "not-needed" }, "models": { "default": {} } } }, "model": "rapid-mlx/default" }
Run
$ rapid-mlx serve qwen3-coder-30b-4bit \ --tool-call-parser hermes --enable-auto-tool-choice $ opencode
Recommended aliases (per rapid-mlx agents opencode):
qwen3-coder-30b-4bit, qwen3.5-9b-4bit,
qwen3.6-35b-4bit, qwen3.5-4b-4bit.
Gotchas
-
Config schema drifts across releases. If the template
doesn't load, run
opencode --helpand check~/.config/opencode/opencode.jsonagainst opencode.ai docs. -
Interactive-only. OpenCode has no headless query mode;
rapid-mlx agents opencode --testskips the query check for this reason. - First-run Anthropic key prompt. Pick "skip" — rapid-mlx is providing the model through the openai-compatible provider, not Anthropic.
- DeepSeek R1-Distill XFAILs on tool calling. R1 was reasoning-only post-trained; the distilled Qwen 32B doesn't emit function calls. Text-only OpenCode chat works; agent workflows need a tool-trained family (Qwen 3.5/3.6, Gemma 4, gpt-oss).
Empirical
The opencode row of the integration matrix
is ✅ on Qwen 3.6, Gemma 4, and gpt-oss; DeepSeek R1-Distill
XFAIL(arch) per the shared
R1-Distill tool-emission
gap. Source of truth for this page:
TestOpenCode
+ rapid-mlx agents opencode.