LOCAL_ENDPOINT variable does not work
Author: sammcjCreated Jul 12, 2025Updated Jul 19, 2025
I wanted to try out Opencode with a number of models I've got running on my Ollama and Llama.cpp servers (using the OpenAI compatible API endpoints).
I exported LOCAL_ENDPOINT=https://ollama.my.internal.network/v1 however when Opencode starts it connects to Github Copilot - even if I have it disabled in the config file.
While I suspect this is a bug - I would also recommend allowing users to set their OpenAI compatible API provider, model and model inference settings the .opencode.json config file so you're not relying on the users shell environment (and potentially clashing with other applications).
Source: opencode-ai/opencode