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+ato connect a different provider
Self-host a model in Ollama
Section titled “Self-host a model in Ollama”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):
--add-host=host.docker.internal:host-gateway \-e OLLAMA_HOST="http://host.docker.internal:11434" \One example model:
ollama pull qwen3.6:35b-a3b-coding-mxfp8Qwen3.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:
OLLAMA_CONTEXT_LENGTH=64000 ollama serveThen switch the model to Ollama:
ctrl+p- select switch model
You can watch the model working and check for errors:
tail -f ~/.ollama/logs/server.logUse 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" } } } }}