Skip to content

OpenCode

Start OpenCode on a terminal with opencode. Our OpenCode wrapper script will walk you through setting it up depending on which models are available to you.

You can also configure your own model provider:

  • ctrl+p
  • select switch model
  • then ctrl+a to connect a different provider

You can also self-host a model in Ollama on your computer (recommended hardware: Apple Silicon with at least 64 GB RAM). For this, install Ollama on your system and start the neurodesktop container with these additional Docker parameters (the Neurodesk app does this automatically):

Terminal window
--add-host=host.docker.internal:host-gateway \
-e OLLAMA_HOST="http://host.docker.internal:11434" \

One example model:

Terminal window
ollama pull qwen3.6:35b-a3b-coding-mxfp8

Qwen3.6 supports a 256k context window, but Ollama may allocate a smaller runtime context depending on your available memory. For coding agents, set the Ollama context length in the Ollama app settings, or start Ollama with a larger context length:

Terminal window
OLLAMA_CONTEXT_LENGTH=64000 ollama serve

Then switch the model to Ollama:

  • ctrl+p
  • select switch model

You can watch the model working and check for errors:

Terminal window
tail -f ~/.ollama/logs/server.log

Use models provided through llm.neurodesk.org

Section titled “Use models provided through llm.neurodesk.org”

Create an API key at llm.neurodesk.org and add it to your OpenCode config file .config/opencode/opencode.json:

{
"$schema": "https://opencode.ai/config.json",
"model": "neurodesk/kimi-k2.5",
"provider": {
"neurodesk": {
"npm": "@ai-sdk/openai-compatible",
"name": "Neurodesk LiteLLM",
"options": {
"baseURL": "https://llm.neurodesk.org/openai",
"apiKey": "YOUR_LLM.NEURODESK.ORG_API_KEY"
},
"models": {
"gpt-oss": { "name": "gpt-oss", "limit": { "context": 131000, "output": 8192 } },
"gemma": { "name": "gemma" },
"kimi": { "name": "kimi" },
"minimax-m2": { "name": "minimax-m2" },
"gemma-4-e4b": { "name": "gemma-4-e4b" },
"glm-4.7": { "name": "glm-4.7" },
"qwen3": { "name": "qwen3" },
"qwen3-small": { "name": "qwen3-small" },
"qwen3-27b": { "name": "qwen3-27b" },
"deepseek-v3.2": { "name": "deepseek-v3.2" },
"gpt-oss-120b": { "name": "gpt-oss-120b" },
"kimi-k2.5": { "name": "kimi-k2.5" },
"llama-4-scout": { "name": "llama-4-scout" },
"DeepSeek-R1": { "name": "DeepSeek-R1" }
}
},
"ollama": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ollama Local",
"options": {
"baseURL": "http://localhost:11434/v1"
},
"models": {
"qwen3.6:35b-a3b-coding-mxfp8": {
"name": "Qwen3.6 35B A3B Coding MXFP8"
}
}
}
}
}