OpenCode
Add Inference.net as an OpenCode provider.
fast opencode on adds an inference-net provider to
~/.config/opencode/opencode.json and sets it as OpenCode's model and
small_model. Other providers and settings in the file are left in place.
Connect OpenCode
Install
bashnpm install -g @inference/fastActivate
bashfast opencode onThe first run signs you in through the browser and creates an API key for this machine. The command backs up OpenCode's config before editing it.
Restart OpenCode
Restart OpenCode and send a prompt; the request appears under Usage.
Choose a model
OpenCode uses kimi-k3-fast unless you pick another ID from the
model catalog:
# Set the model for every agent
fast opencode on --model kimi-k3-fast
# Connect with an Inference Pass plan key (auto-picks a plan model)
fast opencode on --plan
# Set the model per agent
fast opencode on --build kimi-k3-fast --plan deepseek-v4-flash-0731
# Combine an Inference Pass plan key with an explicit plan-agent model
fast opencode on --plan-key --plan deepseek-v4-flash-0731--build and --plan <model-id> pin OpenCode's build and plan agents; both
default to --model. Passing bare --plan (with no model ID) connects with an
Inference Pass plan key instead; to specify a plan-agent model while also using
an Inference Pass plan key, pass --plan-key --plan <model-id>. Explicit model
IDs used with a plan key must be included in your plan (GET /v1/models). Run
on again to change them. Restart OpenCode afterward.
Switch models in OpenCode
Every model from the model catalog is registered under the
inference-net provider. Open the picker with /models (or Ctrl+X then M);
the choice is remembered for your next session. Reasoning models expose their
effort levels as variants — cycle them with Ctrl+T.
Check status
fast opencode statusShows the connection, model, and config paths.
Disconnect
fast opencode offRestores opencode.json to the backup taken by on, so edits made after
connecting are lost. Restart OpenCode afterward.
Troubleshooting
fast opencode onfails to read the config — fix the JSON syntax inopencode.jsonfirst.- Requests return 401 — run
fast status, thenfast opencode on. - Model rejected — pick an ID from the model catalog.