update readme to reflect new config system
This commit is contained in:
26
README.md
26
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 `<port>` 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`
|
||||
|
||||
Reference in New Issue
Block a user