Zeltro › OpenCode in Zeltro: an open-source agent for many models, on your own computer
OpenCode in Zeltro
How Zeltro runs OpenCode: sign in with your ChatGPT plan, use an API key or OpenRouter, or a free local model in Ollama or LM Studio. Zeltro installs it and hands it a project that's ready to run.
OpenCode is an open-source coding agent that works with almost any model provider. It can sign in with a ChatGPT plan, take a key from OpenAI, Anthropic, Google or OpenRouter, or run a model on your own computer.
Connect it with
- Runtime and database ready
- AGENTS.md to read
- Live preview
What Zeltro does for OpenCode#
Installs it
Choose OpenCode when Zeltro first opens, or later in Settings → AI Profiles. Zeltro installs it for you and turns OpenCode's own auto-update off for its runs.
Connects it
Sign in with your ChatGPT plan, or pick where a key comes from: OpenRouter, OpenAI, Ollama, LM Studio or another OpenAI-compatible server.
Hands it a ready project
Every project already has its runtime, its database and a working
.env, plus anAGENTS.md, which OpenCode reads by itself.Runs it beside your app
OpenCode works in a real terminal next to the live preview, and you write long requests in the message box. It doesn't tell the app when a turn is done yet, so keep an eye on its terminal.
Your plan, a key, or OpenRouter#
Your ChatGPT plan. Choose "Sign in with my ChatGPT plan" and OpenCode uses the subscription you already pay for.
An API key. OpenCode writes models as provider/model, so one setting picks both the
provider and the model, such as openai/gpt-5.4-mini or
openrouter/deepseek/deepseek-v4.1-flash. In our tests it worked well through
OpenRouter with DeepSeek V4.1 Flash. With Qwen3 Coder it sometimes described a file edit
instead of making it, so try a second model if one misbehaves.
How do you want to connect OpenCode?
OpenCode with an API key
Where the key is from
- OpenRouter
- OpenAI
- Ollama
- LM Studio
- Another server (enter its address)
API key
On a model on your own computer#
Choose Ollama or LM Studio in the app, or from a terminal:
ollama pull qwen3-coder:30b
zeltro ai-set --agent opencode --model qwen3-coder:30b \
--api-base http://localhost:11434/v1 --api-key ollama
Zeltro passes the server to OpenCode for that run only, so nothing is written to your OpenCode config. Raise Ollama's context length to at least 64k first, and use a large enough model. See cheap and local models.
From the terminal#
zeltro ai-set --agent opencode --model openai/gpt-5.4-mini --api-key sk-...
zeltro ai-set --agent opencode --model openrouter/deepseek/deepseek-v4.1-flash --api-key sk-or-...
Asking before each change. By default, the AI in each project works without stopping
to ask first: the Works without asking switch in the project's panel is on. Switch it
off and you approve each step in OpenCode's terminal. Zeltro passes the choice to OpenCode for each
run (--auto), so OpenCode's own settings stay as they are. To change OpenCode's own setting for
every run, outside Zeltro too, run zeltro ai-unattended, which writes "permission": "allow" into ~/.config/opencode/opencode.json.
Questions
Can OpenCode use my ChatGPT subscription?
Yes. Choose "Sign in with my ChatGPT plan" and OpenCode uses the plan you already pay for. Zeltro adds nothing on top.
Which models can OpenCode use?
Almost any: OpenAI, Anthropic and Google models with their keys, hundreds more through OpenRouter, or a local model in Ollama or LM Studio.
Does Zeltro change my OpenCode settings?
No. A key or server you set in Zeltro, and the project's Works without asking switch,
are passed to OpenCode for each run, not written to its own config. Only
zeltro ai-unattended changes OpenCode's own setting.
Build with OpenCode on your own computer
Install Zeltro, choose OpenCode, and connect your ChatGPT plan, a key or a local model. Free for personal use, with no account.
Install Zeltro Why bring your own key
Rather not set it up yourself? I’ll do it for you.
Checked 2026-11-09. Other products change often — if something here is out of date, tell us and it gets fixed.