Skip to main content
inf opencode routes OpenCode through https://api.inference.net/v1. All three catalog models are registered in the provider registry, so you can switch models inside OpenCode without re-running on.

Config file

inf writes fields in ~/.config/opencode/opencode.json (JSON). If XDG_CONFIG_HOME is set, inf uses that root. inf owns fields, not the whole file. $schema and every other key stay untouched.

inf opencode on

See Model mapping for supported aliases and limits.

What gets written

provider.inference is an object with npm package @ai-sdk/openai-compatible, name Inference.net, options (baseURL and apiKey as a secret), and a models map. model is set to inference/<selected alias>. The three registry entries are glm-5.2-fast, kimi-k3-fast, and deepseek-v4-flash-0731. glm-5.2-fast carries limit.context of 262,144.

inf opencode status

inf opencode off

off restores unchanged owned fields. It keeps fields that you edited after on.

Examples

Select the Fast-tier alias:
Restart OpenCode after on or off. See Troubleshooting for drift, recovery, and key revocation.