How to use Ollama with OpenCode (local models, 2026)
ollama launch opencode or one opencode.json block, plus the 64k context OpenCode requires, why tool calls fail without it, and what fits on your GPU…
Aliteq
Priya Nair · Software & Systems Editor
The short answer
Run ollama launch opencode. Ollama starts OpenCode with an inline config for the model you pick and leaves your own opencode.json alone. To set it up by hand, add an ollama provider to opencode.json…
Fastest: ollama launch opencode
Manual: an ollama provider block in opencode.json
Required: 64k+ context. Ollama's default is 4k on sub-24 GiB GPUs.
Tool calls failing? Raise the context before you blame the model
Aliteq
Read the full story
How to use Ollama with OpenCode (local models, 2026)