From 3e373104e7b60b252d05ecba456604cb1d516703 Mon Sep 17 00:00:00 2001 From: Elena Poelman Date: Tue, 20 Oct 2026 14:57:30 +0200 Subject: [PATCH 1/6] update opencode image to feature-opencode-v2 tag --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index a8787b5..078bffb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: opencode: - image: redpencil/opencode:0.0.2 + image: redpencil/opencode:feature-opencode-v2 volumes: - ./data/opencode/share:/root/.local/share/opencode - ./config/opencode/opencode.json:/root/.config/opencode/opencode.json -- 2.49.1 From 5bd2eb398e4f87cba62d5e36eb240b1e5050e22f Mon Sep 17 00:00:00 2001 From: Elena Poelman Date: Tue, 20 Oct 2026 14:58:22 +0200 Subject: [PATCH 2/6] config(opencode): drop lsp configuration --- config/opencode/opencode.json | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/config/opencode/opencode.json b/config/opencode/opencode.json index 3be573a..4fa2f28 100644 --- a/config/opencode/opencode.json +++ b/config/opencode/opencode.json @@ -2,34 +2,6 @@ "$schema": "https://opencode.ai/config.json", "model": "weave/glm-5.3-flash", "small_model": "weave/glm-5.3-flash", - "lsp": { - "typescript": { - "command": [ - "typescript-language-server", - "--stdio" - ], - "extensions": [ - ".ts", - ".tsx", - ".js", - ".jsx", - ".mjs", - ".cjs", - ".mts", - ".cts" - ] - }, - "pyright": { - "command": [ - "pyright-langserver", - "--stdio" - ], - "extensions": [ - ".py", - ".pyi" - ] - } - }, "provider": { "weave": { "npm": "@ai-sdk/openai-compatible", -- 2.49.1 From 5b7c1f98bd4db3604623281f3b00326a60c0b86a Mon Sep 17 00:00:00 2001 From: Elena Poelman Date: Tue, 20 Oct 2026 14:59:41 +0200 Subject: [PATCH 3/6] use agents.title.model instead of small_model --- config/opencode/opencode.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/opencode/opencode.json b/config/opencode/opencode.json index 4fa2f28..182a085 100644 --- a/config/opencode/opencode.json +++ b/config/opencode/opencode.json @@ -1,7 +1,11 @@ { "$schema": "https://opencode.ai/config.json", "model": "weave/glm-5.3-flash", - "small_model": "weave/glm-5.3-flash", + "agents": { + "title": { + "model": "weave/glm-5.3-flash", + }, + }, "provider": { "weave": { "npm": "@ai-sdk/openai-compatible", -- 2.49.1 From 1ce6cea6c9c3b6aafcb4fbb83850b77f762d4d43 Mon Sep 17 00:00:00 2001 From: Elena Poelman Date: Tue, 20 Oct 2026 15:13:02 +0200 Subject: [PATCH 4/6] convert provider config to new v2 providers config --- config/opencode/opencode.json | 46 +++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/config/opencode/opencode.json b/config/opencode/opencode.json index 182a085..bdc014b 100644 --- a/config/opencode/opencode.json +++ b/config/opencode/opencode.json @@ -3,41 +3,57 @@ "model": "weave/glm-5.3-flash", "agents": { "title": { - "model": "weave/glm-5.3-flash", - }, + "model": "weave/glm-5.3-flash" + } }, - "provider": { + "providers": { "weave": { - "npm": "@ai-sdk/openai-compatible", - "options": { + "package": "@opencode/ai/providers/openai-compatible", + "settings": { "baseURL": "https://weave.redpencil.io/v1", "apiKey": "{env:WEAVE_API_KEY}" }, "models": { "kimi-K2.7-code": { - "tools": true + "capabilities": { + "tools": true + } }, "glm-5.3": { - "tools": true + "capabilities": { + "tools": true + } }, "glm-5.3-flash": { - "tools": true + "capabilities": { + "tools": true + } }, "mistral-glm-5.2": { - "tools": true, - "reasoning": true, - "options": { + "capabilities": { + "tools": true, + "reasoning": { + "supported": true + } + }, + "settings": { "reasoningEffort": "xhigh" } }, "devstral": { - "tools": true + "capabilities": { + "tools": true + } }, "local-qwen3.6:27b": { - "tools": true + "capabilities": { + "tools": true + } }, "mistral-medium": { - "tools": true + "capabilities": { + "tools": true + } } } } @@ -48,4 +64,4 @@ "bash": "ask", "external_directory": "ask" } -} +} \ No newline at end of file -- 2.49.1 From 9246decc9f36c68b84c3948586fe1ff7ae266082 Mon Sep 17 00:00:00 2001 From: Elena Poelman Date: Wed, 21 Oct 2026 10:09:46 +0200 Subject: [PATCH 5/6] move permissions config to new v2 format --- config/opencode/opencode.json | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/config/opencode/opencode.json b/config/opencode/opencode.json index bdc014b..0c58b87 100644 --- a/config/opencode/opencode.json +++ b/config/opencode/opencode.json @@ -58,10 +58,26 @@ } } }, - "permission": { - "read": "ask", - "edit": "ask", - "bash": "ask", - "external_directory": "ask" - } + "permissions": [ + { + "action": "read", + "resource": "*", + "effect": "ask", + }, + { + "action": "edit", + "resource": "*", + "effect": "ask", + }, + { + "action": "shell", + "resource": "*", + "effect": "ask", + }, + { + "action": "external_directory", + "resource": "*", + "effect": "ask", + }, + ], } \ No newline at end of file -- 2.49.1 From 218dc1d0d1e17ee01d3dd72edcf2c365edbc247b Mon Sep 17 00:00:00 2001 From: Elena Poelman Date: Thu, 22 Oct 2026 10:08:36 +0200 Subject: [PATCH 6/6] update readme to reflect new config system --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d39b9de..9bc6fa5 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ changes the current session; to change the default for every session, edit ### Change the default model -Edit `model` (and optionally `small_model`) in +Edit `model` (and optionally `agents.title.model`) in [`config/opencode/opencode.json`](config/opencode/opencode.json), then apply the change: @@ -67,13 +67,17 @@ needed. ### Register a new weave model -Add the model under `provider.weave.models` in `opencode.json`: +Add the model under `providers.weave.models` in `opencode.json`: ```json "provider": { "weave": { "models": { - "my-new-model": { "tools": true } + "my-new-model": { + "capabilities" { + "tools": true + } + } } } } @@ -118,17 +122,17 @@ name** from that stack's compose and `` is the container's *internal* port ### `opencode.json` keys -- **`model` / `small_model`** — default model and the model used for lighter - tasks. Both default to `weave/glm-5.2`. -- **`provider.weave`** — the weave provider, using the - `@ai-sdk/openai-compatible` adapter against `https://weave.redpencil.io/v1` +- **`model`** — default model. +- **`agents.title.model`** — model used to generate session titles (replaces deprecated `small_model`) +- **`providers.weave`** — the weave provider, using the + `@opencode/ai/providers/openai-compatible` adapter against `https://weave.redpencil.io/v1` with the key from `WEAVE_API_KEY`. -- **`provider.weave.models`** — the models offered in `/models`. -- **`lsp`** — language servers baked into the image: - `typescript-language-server` for TS/JS and `pyright` for Python. -- **`permission`** — set to `ask` for read, edit, bash, and external-directory +- **`providers.weave.models`** — the models offered in `/models`. +- **`permissions`** — set to `ask` for read, edit, bash, and external-directory actions, so opencode prompts before acting. +Check-out https://opencode.ai/v2/docs/config/ for more options. + ### Caveats - Copy from the TUI over Docker needs the `Shift`+click / `Ctrl`+`Shift`+`C` -- 2.49.1