OpenCode
Run agents with OpenCode and your chosen model provider.
| Type | opencode |
|---|---|
| Website | OpenCode |
Version
Set version explicitly to pin a release, for example 2.0.26.
The release must be available upstream and support the adapter's OpenCode V2 commands.
OpenCode runs use standalone mode and a private database for each run.
Model and Reasoning Effort
Set both model and reasoningEffort to non-empty strings. Use OpenCode's
provider/model identifier. Stitch does not check a model catalog, supported
variants, or infer required credentials from the model. OpenCode reports invalid
provider, model, or variant settings so you can correct the configuration.
OpenCode receives --model provider/model#effort. Use reasoningEffort: default
to pass only provider/model.
Authentication
Use exactly one auth method that matches your model's provider. Store the credential as a
Stitch secret and reference it with secretName.
| Model prefix | Auth method | Get credentials |
|---|---|---|
openai/ | openai_api_key | OpenAI Platform |
anthropic/ | anthropic_api_key | Anthropic Console |
google/ | gemini_api_key | Google AI Studio |
meta/ | meta_api_key | Meta Llama API |
opencode/ | opencode_api_key | OpenCode Zen |