Skip to content
DOCUMENTATION / PROJECT ZERO

OpenCode setup

Use Project Zero inside OpenCode, with no plugin, no fork and no pasted key.

OpenCode talks to Tessen as an OpenAI-compatible provider. The Tessen CLI writes that provider for you and hands OpenCode the credential your device sign-in produced.

BASH
curl -fsSL https://github.com/TessenLab/zero/releases/latest/download/install.sh | sh
tessen auth:login
tessen opencode
opencode --model tessen/project-zero

The installer requires Node.js 20 or newer, on macOS, Linux or WSL. It downloads the CLI from Tessen's GitHub release, checks its SHA-256, and installs into ~/.tessen/cli without sudo. Re-run it to upgrade; remove ~/.tessen/cli and ~/.local/bin/tessen to uninstall.

What gets written

The provider goes into OpenCode's config (~/.config/opencode/opencode.json, or your existing opencode.jsonc). Other providers in that file are kept. The credential goes into OpenCode's own credential store (~/.local/share/opencode/auth.json, mode 0600) — never into the config file.

JSON
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "tessen": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Tessen",
      "options": { "baseURL": "https://api.tessen.ai/v1" },
      "models": {
        "project-zero": {
          "name": "Project Zero",
          "options": { "program": "project_zero" }
        }
      }
    }
  }
}

Choosing Project Zero

In OpenCode, select tessen/project-zero — from the model picker, or with --model on the command line.

When a request is refused

Status · codeMeaning
401The credential is missing, revoked or expired. Run tessen auth:login, then tessen opencode.
403 · zero_entitlement_requiredThis account does not have Project Zero access. tessen zero shows your access.
503 · zero_capacity_unavailableNo zero-cost capacity can serve the request right now, or today's pool is used. Retry after the reset the response names.
503 · zero_program_disabledProject Zero is switched off by Tessen. It is not your account and not the pool; normal Tessen is unaffected.
Configuring OpenCode by hand with a Tessen API key from the Console is not supported for Project Zero: Console keys authenticate the Tessen API at tessen.ai, not https://api.tessen.ai/v1. Use tessen opencode.
OpenCode setup — Tessen Docs