File size: 5,664 Bytes
ef62fcb c1bf102 89ef4db c1bf102 81ee344 c1bf102 81ee344 c1bf102 1fe486d c1bf102 81ee344 c1bf102 81ee344 c75f885 c1bf102 81ee344 c1bf102 81ee344 c1bf102 c75f885 81ee344 c75f885 c1bf102 1fe486d 81ee344 c75f885 c1bf102 1fe486d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | ---
license: apache-2.0
language:
- en
tags:
- kaiju-coder-7
- opencode
- coding-agent
- local-ai
- business
- tool-use
---
# 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`:
```jsonc
{
"$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:
```bash
python3 scripts/install_kaiju_opencode_profile.py
```
The installer sets:
- `model: kaiju/kaiju-coder-7`
- `default_agent: kaiju-coder-7`
- the `kaiju` OpenAI-compatible provider
- the Kaiju OpenCode plugin and `kaiju_artifact` custom tool
- Kaiju as the default primary agent, so choosing `kaiju/kaiju-coder-7` uses
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:
```bash
opencode
```
If you did not let the installer set defaults, use:
```bash
opencode -m kaiju/kaiju-coder-7 --agent kaiju-coder-7
```
For a one-shot smoke test:
```bash
opencode run "Create hello.txt with exactly: Kaiju Coder 7 is ready"
```
For the packaged public verifier:
```bash
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:
```bash
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`:
```bash
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.
|