Skip to main content
opencode is a terminal coding agent. Lyceum plugs in as a custom provider.

Configure

Write this to ~/.config/opencode/opencode.json for every project, or opencode.json in a project root for one. Export your key, then start opencode:
opencode reads LYCEUM_API_KEY from the environment at launch. It does not load .env files, so put the export in ~/.zshrc or ~/.bashrc if you want it to persist.

Verify

opencode models lists what it resolved. Lyceum entries appear as lyceum/<model-id>:
Run a one-shot prompt without entering the TUI:

Notes

  • Strict JSON. opencode.json does not allow trailing commas or comments. Rename the file opencode.jsonc if you want them.
  • Context limits. Add "limit": { "context": 200000, "output": 65536 } to a model entry so opencode’s context compaction is accurate. Our /models endpoint does not report these, so take them from active models.
  • Default model. Without a top-level "model", opencode picks whatever provider it finds first.