# OpenCode CLI [← back to overview](index.md) Confirmed project: **`anomalyco/opencode`** (renamed from `sst/opencode` — don't confuse with the unrelated `opencode-ai/opencode` Go TUI). Docs: https://opencode.ai/docs/ **Install**: ```bash curl -fsSL https://opencode.ai/install | bash ``` **Config** (`opencode.json`, project root or `~/.config/opencode/opencode.json`): ```json { "$schema": "https://opencode.ai/config.json", "provider": { "aiproxy": { "npm": "@ai-sdk/openai-compatible", "name": "AI proxy (local)", "options": { "baseURL": "http://:${OMNIROUTE_PORT:-4000}/v1", "apiKey": "" }, "models": { "qwen3.8-27b-local": { "name": "Qwen3.8-27B", "limit": { "context": 65536, "output": 8192 } } } } } } ``` Set `limit.context` to the *per-slot* context this stack actually serves — `LLAMA_CTX_SIZE / LLAMA_PARALLEL` from `.env` (262144 / 2 = 131072 by default), not raw `LLAMA_CTX_SIZE` and not a value assumed from the model card: llama.cpp divides `--ctx-size` across concurrent slots, so each request only gets one slot's share. OpenCode uses this for its own context-management bookkeeping, not the server. Select the model with `aiproxy/qwen3.8-27b-local`. **OpenCode-specific risks** (on top of the shared Qwen3.8-27B tool-calling risk — see [overview](index.md)): - Requires llama.cpp's `--jinja` flag (already set) — without it, OpenCode's unconditional tool-call scaffolding gets a 500. - [anomalyco/opencode#20669](https://github.com/anomalyco/opencode/issues/20669) (closed as "not planned" — a live, unfixed risk): OpenCode's `bash` tool crashes if the model omits the optional `description` field on a tool call; some local backends return `finish_reason: tool_calls` with an empty array, which can hang the agent loop instead of stopping cleanly. - Thinking-mode handling (`options.reasoningEffort`) is undocumented for models that emit inline `` tags rather than a native reasoning API field — expect no effect from that config on this model; untested. Further reading: `docs/research/opencode-cli-setup.md`.