forked from ai-tools/app-opencode
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
|
### 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
|
[`config/opencode/opencode.json`](config/opencode/opencode.json), then apply the
|
||||||
change:
|
change:
|
||||||
|
|
||||||
@@ -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`
|
||||||
|
|||||||
Reference in New Issue
Block a user