/v1 base URL and explicit model entries.
OpenCode v2 uses the
providers object, package, and settings.baseURL. Older OpenCode examples may use provider, npm, and options.baseURL.Configure
Set your API key:opencode.json in your project:
/models and select a linkmodel/* model.
Notes
- Keep API keys in environment variables. Do not commit them in
opencode.json. - Add more models from Models as needed.
- If your OpenCode version expects the older config shape, use the official OpenCode provider docs linked below.