You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
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).
but ollama expect /api/tags, so it wouldn't work by default. However you said you have OpenAI compatible endpoints, in this case try to use this instead:
LOCAL_ENDPOINT=https://ollama.my.internal.network
For me solution was to use LiteLLM proxy in between, and then allow LiteLLM handle both local ollama and remote compatible API.
In order to work with LiteLLM properly (auth via token + pass through for vertex, for example) a few changes were required to be made, here they are: #243. Im keeping it in sync, but not sure if any maintainers actually managing this repo at the moment, which is a bit annoying :)
Activity
ianks commentedon Jul 12, 2025
Ran into same issue. In my case, I am trying to use LOCAL_ENDPOINT as a proxy url.
sam99dave commentedon Jul 15, 2025
Ctrl + o gives the option to change model config
Im using llama.cpp, for me its connecting to my local endpoint but giving the following error
got exception: {"code":500,"message":"Assistant message must contain either 'content' or 'tool_calls'!","type":"server_error"}obukhovaa commentedon Jul 19, 2025
@sammcj currently the local provider only support following api paths to fetch models:
but ollama expect
/api/tags, so it wouldn't work by default. However you said you have OpenAI compatible endpoints, in this case try to use this instead:For me solution was to use LiteLLM proxy in between, and then allow LiteLLM handle both local ollama and remote compatible API.
In order to work with LiteLLM properly (auth via token + pass through for vertex, for example) a few changes were required to be made, here they are: #243. Im keeping it in sync, but not sure if any maintainers actually managing this repo at the moment, which is a bit annoying :)