restokes92's picture
Upload Kaiju Coder 7 OpenCode helper package
c1bf102 verified
|
raw
history blame
3.2 kB

OpenCode Quickstart For Kaiju Coder 7

Kaiju Coder 7 is served as an OpenAI-compatible model with public model id kaiju-coder-7. For OpenCode, use the lean project agent in .opencode/agents/kaiju-coder-7.md or copy it to your global OpenCode agents folder.

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",
  "plugin": [
    "/Users/YOUR_USER/.config/opencode/kaiju-no-autocontinue.mjs"
  ],
  "provider": {
    "kaiju": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Kaiju Coder",
      "options": {
        "baseURL": "http://100.109.109.14:18083/v1",
        "apiKey": "not-needed",
        "timeout": 900000,
        "chunkTimeout": 120000
      },
      "models": {
        "kaiju-coder-7": {
          "name": "Kaiju Coder 7",
          "limit": {
            "context": 16384,
            "output": 2500
          }
        }
      }
    }
  }
}

Run

Install the lean agent, provider, and no-autocontinue loop guard locally:

python3 scripts/install_kaiju_opencode_profile.py

From the project you want Kaiju to edit:

opencode -m kaiju/kaiju-coder-7 --agent kaiju-coder-7

For a one-shot smoke test:

opencode run -m kaiju/kaiju-coder-7 --agent kaiju-coder-7 \
  "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.

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
  • Current Gojira-B restored default: 16,384 context
  • Tested high-context target: 32,768 context
  • Serving path: merged full model through SGLang
  • OpenCode guard: lean agent plus scoped no-autocontinue plugin
  • Product caveat: raw generation is useful but slow; paid workflows should use deterministic harnesses and verifiers until broader raw-model gates pass.