Model Selection

Lavra maps its agents to three performance tiers. For OpenCode and Gemini CLI, you can customize which model each tier uses.

Tiers

TierDefault (OpenCode)Default (Gemini)Used for
haikuclaude-haiku-4-5-20251001gemini-2.5-flashFast structured tasks
sonnetclaude-sonnet-4-5-20250929gemini-2.5-proStandard review and research
opusclaude-opus-4-6gemini-2.5-proDeep reasoning (when routed explicitly)

OpenCode — Interactive Selection

When installing for OpenCode, you’ll be prompted to customize model mappings:

npx @lavralabs/lavra@latest --opencode
# Customize models? (y/N):

Select y to pick models for each tier from your available OpenCode models.

To skip prompts and use defaults:

npx @lavralabs/lavra@latest --opencode --yes

OpenCode — Manual Configuration

Run the selection script independently:

bash scripts/select-opencode-models.sh

Or edit scripts/shared/model-config.json directly:

{
  "opencode": {
    "haiku": "anthropic/claude-haiku-4-5-20251001",
    "sonnet": "anthropic/claude-sonnet-4-5-20250929",
    "opus": "anthropic/claude-opus-4-6"
  },
  "gemini": {
    "haiku": "gemini-2.5-flash",
    "sonnet": "gemini-2.5-pro",
    "opus": "gemini-2.5-pro"
  }
}

Re-run the installer after editing to apply changes.

Troubleshooting

opencode command not found — model selection requires OpenCode in your PATH. Install it first, then re-run the Lavra installer.

No Claude models available — configure your OpenCode API keys with opencode config, then re-run.

See Also