-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
Context
When running OpenCode CLI locally (without Sandbox Agent), it can use the OPENCODE_API_KEY env var set to a Zen API key. Running opencode auth list shows provider "zen" through the env var. Selecting a model like gemini-3-pro works (though may require billing).
Requests
1. Pass OPENCODE_API_KEY to the OpenCode agent
Sandbox Agent already passes CODEX_API_KEY for the codex agent. It should similarly pass OPENCODE_API_KEY to the OpenCode agent process.
An alternative approach is writing ~/.local/share/opencode/auth.json:
{
"opencode": {
"type": "api",
"key": "sk-..."
}
}2. Support model selection per agent in sessions
There's currently no way to specify which model an agent should use when creating a session via the SDK. This blocks testing providers like Zen that require a specific model to be selected.
Related
- Gemini cli api key support for OpenCode #185 — Gemini CLI API key support for OpenCode
- E2B + codex auth using env vars #154 — E2B + codex auth using env vars
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels