Set up OpenCode with a local LLM on Mac using Bridge1. Copy its provider entry and check prompt rereads, plan mode and stored-key behavior.
Updated
OpenCode is tested end to end in real sessions. This does not guarantee every model behaves the same way.
Before connecting OpenCode
For OpenCode, start with an Apple Silicon Mac: 24 GB minimum, 32 GB or more recommended. Check memory fit.
Bridge1 lists Ornith 1.5 35B-A3B (OptiQ 4-bit · default for coding) as its default for coding. Check the model's memory and context before choosing it for OpenCode.
Install Bridge1 through invite-only macOS early access, choose a model and open the Gateway panel for OpenCode.
OpenCode API and model names
OpenCode uses the OpenAI-compatible Chat Completions route, /v1/chat/completions, with a provider base URL ending in /v1.
OpenCode uses the same plain model ids as Pi.dev, Codex and Hermes Agent. Select bridge1/route1 to follow the model you pick in Bridge1; switching models needs no client config edit.
Bridge1 does not edit OpenCode’s saved configuration; it supplies provider settings through the environment. OpenCode may write its own files during a session.
Versions
OpenCode versions older than the tested version or in a different major are refused; newer minors warn, and newer patches within the tested minor are silent.
Needs
On macOS, starting OpenCode depends on model availability and your automatic-loading settings; the manual steps below still work.
Set up OpenCode
Add the generated bridge1 provider entry to ~/.config/opencode/opencode.jsonc. Copy the full entry from the Gateway panel for all onboarded models. This example shows Route1 and one onboarded model; your Gateway panel lists your own models.
Copy the Gateway panel snippet for all onboarded models. Keep its generated model capabilities and limits. Copy it again after onboarding another model.
Merge the bridge1 entry into the provider object in your OpenCode configuration.
Use @ai-sdk/openai-compatible with options.baseURL and options.apiKey. The generated models object lists all onboarded models.
A key stored with opencode auth login is separate from Bridge1. It does not update after a Bridge1 reinstall or key rotation.
Set model to bridge1/route1 to follow Route1. Keep the generated attachment and modalities fields when they are present.
In the OpenCode terminal UI, type bridge1: help in a chat to see status, list models, or load, switch or stop a model. If a model is not ready, Bridge1 explains the next step in the chat. You can turn chat controls off in Settings.
Check that it works
Check OpenCode’s selected provider is Bridge1 and the model matches your choice. With bridge1/route1, confirm the selected model in Bridge1 too.
Send a short question in OpenCode. A pass is a relevant ordinary answer, separate from any status command or model-list response.
In a disposable project, ask OpenCode to write a greeting into a small text file. Read the saved file to check completion; plan mode does not block shell commands.
A connection test, model list or echoed reply cannot establish task completion in OpenCode. Keep the generated model capabilities and limits when checking a file task.
If something is off
Symptom
What it usually means
What to check
More help
Authentication still uses an old key
OpenCode can store a separate key.
Check the key stored through opencode auth login after a reinstall or key rotation.
Bridge1 0.7.7 launches OpenCode 1.19.4, tested on macOS on 2026-10-27. This check used bridge1 launch opencode. Below the tested version or a different major version: refused. A newer minor of the same major proceeds with a one-line warning. A newer patch is silent. These are not the only versions that work; you do not need the tested version. The manual setup below was not re-tested at that version.
OpenCode: limits to check
When the start of the prompt changes between runs, MLX models reread the chat once (about 100 s at 13K tokens on Qwen3.6-27B).
Token usage in Bridge1's replies is not visible yet, so long sessions may not compact on their own.
Switching between plan and build rereads the whole chat once (348 s at 98K tokens on Qwen3.6-35B).
Plan mode does not block shell commands (checked on version 1.18.29); a local model may run one.
The prompt can change between runs if one skill sits in both ~/.claude/skills and ~/.agents/skills; keep it in one folder (seen on Ornith-35B).
Switching between plan and build rereads the whole chat once (348 s at 98K tokens on Qwen3.6-35B). When the start of the prompt changes between runs, MLX models reread the chat once (about 100 s at 13K tokens on Qwen3.6-27B).
Will OpenCode plan mode block shell commands?
No. Plan mode does not block shell commands (checked on version 1.18.29); a local model may run one.
Why might OpenCode keep using an old gateway key?
OpenCode stores a key entered through opencode auth login separately. That stored key does not change when Bridge1 is reinstalled or its gateway key rotates. The generated provider entry includes apiKey.