There are definitely annoyances with OpenCode.
The remote-preferred attitude caught me once. Also, its server APIs don't match its docs, if you want to talk to it programatically.
The following config works for me to keep it on a local model:
{ "$schema": "https://opencode.ai/config.json", "provider": { "local-llama": { "npm": "@ai-sdk/openai-compatible", "name": "Local llama.cpp Server", "options": { "baseURL": "http://localhost:8080/v1" }, "models": { "Chefs Choice": { "name": "ANY" } } }, ...
This allows me to put any model I want on port 8080.