Agent guide · rapid-mlx 0.10.3 · ← Back to README

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.

Wire: /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

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.

See also