OpenCode Quickstart For Kaiju Coder 7
Kaiju Coder 7 is served as an OpenAI-compatible model with public model id
kaiju-coder-7. After the helper is installed, Kaiju is configured as a normal
OpenCode model: start OpenCode, select kaiju/kaiju-coder-7 if needed, and
work normally.
Local Provider Config
The installer below writes this provider block and a scoped loop-guard plugin to
~/.config/opencode/opencode.jsonc, adjusting the baseURL if you pass
--base-url.
If you configure OpenCode manually, add the provider block and set plugin to
the absolute path where you copied kaiju-no-autocontinue.mjs:
{
"$schema": "https://opencode.ai/config.json",
"model": "kaiju/kaiju-coder-7",
"default_agent": "kaiju-coder-7",
"plugin": [
"/Users/YOUR_USER/.config/opencode/kaiju-no-autocontinue.mjs"
],
"provider": {
"kaiju": {
"npm": "@ai-sdk/openai-compatible",
"name": "Kaiju Coder",
"options": {
"baseURL": "http://127.0.0.1:18181/v1",
"apiKey": "not-needed",
"timeout": 900000,
"chunkTimeout": 120000
},
"models": {
"kaiju-coder-7": {
"name": "Kaiju Coder 7",
"limit": {
"context": 16384,
"output": 2500
}
}
}
}
}
}
Run
Install the provider, Kaiju agent, no-autocontinue loop guard, router command, and default OpenCode settings locally:
python3 scripts/install_kaiju_opencode_profile.py
The installer sets:
model: kaiju/kaiju-coder-7default_agent: kaiju-coder-7- the
kaijuOpenAI-compatible provider - the Kaiju OpenCode plugin and
kaiju_artifactcustom tool - Kaiju as the default primary agent, so choosing
kaiju/kaiju-coder-7uses the hidden fast artifact path without requiring/kaiju
It also writes kaiju-coder-7-run to ~/.local/bin, persists the router
runtime under ~/.config/opencode/kaiju-coder-7-runtime, and installs the
optional /kaiju command. Those are power-user paths; normal use should feel
like any other OpenCode model.
From the project you want Kaiju to edit:
opencode
If you did not let the installer set defaults, use:
opencode -m kaiju/kaiju-coder-7 --agent kaiju-coder-7
For a one-shot smoke test:
opencode run "Create hello.txt with exactly: Kaiju Coder 7 is ready"
For the packaged public verifier:
python3 scripts/run_kaiju_public_opencode_smoke.py
It checks the installer preview, the live /v1/models response, the local
OpenCode binary, a real file write in a temporary workspace, and whether the
same file leaked into the repo or home directory.
For a fast website or business-owner pack:
kaiju-coder-7-run \
--no-planner \
--kind website \
--out-dir "$HOME/Desktop/Kaiju-Coder-7-Test" \
--prompt "Build a premium one-page website for Harborline Bookkeeping with pricing, FAQ, and a cleanup-call CTA."
For big website, landing-page, owner-pack, or Desktop-output prompts, the
installed OpenCode agent is instructed to call the kaiju_artifact tool first
and then report the generated artifact path and verification checks. In the TUI,
/kaiju is optional; it is a shortcut, not the required way to use the model.
Why The Lean Agent Matters
The default OpenCode build agent includes a large prompt and many tools. That can consume most of a 12k context window before the user task begins. The Kaiju agent disables subagents, skills, web tools, todo tools, and LSP by default so more context is reserved for the real code and file work.
Why The Loop Guard Matters
Earlier Kaiju OpenCode tests found a bad failure mode: after an output or step
limit, OpenCode could compact the session, synthesize a false "all files are
created" summary, and then auto-continue from that bad state. The packaged
kaiju-no-autocontinue.mjs plugin disables synthetic auto-continue for
Kaiju Coder 7 sessions and adds compaction instructions that only allow proven
file/output facts into the summary.
Current Recommended Runtime
- Model id:
kaiju-coder-7 - Endpoint shape: OpenAI-compatible
/v1/chat/completions - Fast OpenCode base URL:
http://127.0.0.1:18181/v1 - Fast proxy upstream for Richard's current setup: vLLM bitsandbytes on Gojira-B port
18084 - Current tested context: 16,384
- Tested high-context target: 32,768, but not the current fast default
- Serving path for speed testing: merged full model through vLLM runtime bitsandbytes
- OpenCode normal path: install once, then run
opencode - OpenCode guard: Kaiju default agent plus scoped no-autocontinue plugin
- OpenCode custom tool:
kaiju_artifact - OpenCode command:
/kaiju - Fast artifact command:
kaiju-coder-7-run - Product caveat: raw generation is useful but slow; paid workflows should use deterministic harnesses and verifiers until broader raw-model gates pass.
Fast Proxy
The helper bundle includes scripts/kaiju_opencode_fast_proxy.py. It preserves
OpenCode tool-call streaming while forcing the fast model settings Kaiju needs:
thinking=false, model id kaiju-coder-7, and bounded output budgets.
Run it in one terminal, then point OpenCode at http://127.0.0.1:18181/v1:
KAIJU_OPENAI_BASE_URL=http://127.0.0.1:18084/v1 \
python3 scripts/kaiju_opencode_fast_proxy.py --host 127.0.0.1 --port 18181
If your vLLM server is remote, set KAIJU_OPENAI_BASE_URL to that remote
OpenAI-compatible /v1 endpoint instead.
