update readme to reflect new config system

This commit is contained in:
2026-10-22 10:08:36 +02:00
parent 9246decc9f
commit bdbcd474a9

View File

@@ -67,13 +67,17 @@ needed.
### Register a new weave model ### 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 ```json
"provider": { "provider": {
"weave": { "weave": {
"models": { "models": {
"my-new-model": { "tools": true } "my-new-model": {
"capabilities" {
"tools": true
}
}
} }
} }
} }
@@ -118,17 +122,17 @@ name** from that stack's compose and `<port>` is the container's *internal* port
### `opencode.json` keys ### `opencode.json` keys
- **`model` / `small_model`** — default model and the model used for lighter - **`model`** — default model.
tasks. Both default to `weave/glm-5.2`. - **`agents.title.model`** — model used to generate session titles (replaces deprecated `small_model`)
- **`provider.weave`** — the weave provider, using the - **`providers.weave`** — the weave provider, using the
`@ai-sdk/openai-compatible` adapter against `https://weave.redpencil.io/v1` `@opencode/ai/providers/openai-compatible` adapter against `https://weave.redpencil.io/v1`
with the key from `WEAVE_API_KEY`. with the key from `WEAVE_API_KEY`.
- **`provider.weave.models`** — the models offered in `/models`. - **`providers.weave.models`** — the models offered in `/models`.
- **`lsp`** — language servers baked into the image: - **`permissions`** — set to `ask` for read, edit, bash, and external-directory
`typescript-language-server` for TS/JS and `pyright` for Python.
- **`permission`** — set to `ask` for read, edit, bash, and external-directory
actions, so opencode prompts before acting. actions, so opencode prompts before acting.
Check-out https://opencode.ai/v2/docs/config/ for more options.
### Caveats ### Caveats
- Copy from the TUI over Docker needs the `Shift`+click / `Ctrl`+`Shift`+`C` - Copy from the TUI over Docker needs the `Shift`+click / `Ctrl`+`Shift`+`C`