feat(gateway): add config toggle for chat completions endpoint

This commit is contained in:
Peter Steinberger
2026-01-10 22:34:25 +01:00
parent 050c1c5391
commit 1110d96769
8 changed files with 88 additions and 3 deletions

View File

@@ -1803,6 +1803,7 @@ Related docs:
Notes:
- `clawdbot gateway` refuses to start unless `gateway.mode` is set to `local` (or you pass the override flag).
- `gateway.port` controls the single multiplexed port used for WebSocket + HTTP (control UI, hooks, A2UI).
- Disable the OpenAI-compatible endpoint with `gateway.http.endpoints.chatCompletions.enabled: false`.
- Precedence: `--port` > `CLAWDBOT_GATEWAY_PORT` > `gateway.port` > default `18789`.
- Non-loopback binds (`lan`/`tailnet`/`auto`) require auth. Use `gateway.auth.token` (or `CLAWDBOT_GATEWAY_TOKEN`).
- `gateway.remote.token` is **only** for remote CLI calls; it does not enable local gateway auth. `gateway.token` is ignored.

View File

@@ -36,6 +36,22 @@ Or target a specific Clawdbot agent by header:
Advanced:
- `x-clawdbot-session-key: <sessionKey>` to fully control session routing.
## Disabling the endpoint
Set `gateway.http.endpoints.chatCompletions.enabled` to `false`:
```json5
{
gateway: {
http: {
endpoints: {
chatCompletions: { enabled: false }
}
}
}
}
```
## Session behavior
By default the endpoint is **stateless per request** (a new session key is generated each call).