╰─$ cat opencode.json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"ollama": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "http://localhost:11434/v1"
},
"models": {
"llama2": {}
}
}
}
}
╰─$ ollama ls
NAME ID SIZE MODIFIED
llama2:latest 78e26419b446 3.8 GB 12 minutes ago
╰─$ curl http://localhost:11434/v1
404 page not found
╰─$ curl http://localhost:11434
Ollama is running