Skip to content

Commit d49e90d

Browse files
author
Datanoise
committed
Update README with tool mode and opencode integration docs
1 parent 33611cd commit d49e90d

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Each client (API key) has independent configuration:
158158
| **Default Model** | Model to use when none specified |
159159
| **Model Whitelist** | Restrict which models this client can access |
160160
| **System Prompt** | Injected as a system message on every request |
161+
| **Tool Mode** | Pass-through (forward tool_calls to client) or Gateway (execute internally) |
161162
| **Base URL Override** | Point at a specific Ollama/LM Studio instance |
162163
| **Rate Limits** | Per-minute, per-hour, per-day request caps |
163164
| **Token Quotas** | Daily input/output token budgets |
@@ -180,6 +181,32 @@ The web UI at `/admin` provides:
180181

181182
---
182183

184+
## OpenCode Integration
185+
186+
The gateway supports tool calling with [opencode](https://opencode.ai). Configure your `opencode.json`:
187+
188+
```json
189+
{
190+
"$schema": "https://opencode.ai/config.json",
191+
"provider": {
192+
"myprovider": {
193+
"npm": "@ai-sdk/openai-compatible",
194+
"options": {
195+
"baseURL": "http://127.0.0.1:8099",
196+
"apiKey": "gm_..."
197+
},
198+
"models": {
199+
"my-model": {}
200+
}
201+
}
202+
}
203+
}
204+
```
205+
206+
**Tool Mode:** The gateway defaults to "pass-through" mode, which forwards tool_calls to opencode for execution. This allows opencode to execute tools (bash, read, write, edit, glob, grep, etc.) locally. Set to "Gateway" in the admin UI if you want the gateway to handle tools (requires implementing tool functions).
207+
208+
---
209+
183210
## Configuration
184211

185212
### config.yaml

0 commit comments

Comments
 (0)