mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 10:57:26 +00:00
feat(agents): make openai responses websocket-first with fallback
This commit is contained in:
@@ -43,6 +43,8 @@ OpenClaw ships with the pi‑ai catalog. These providers require **no**
|
||||
- Optional rotation: `OPENAI_API_KEYS`, `OPENAI_API_KEY_1`, `OPENAI_API_KEY_2`, plus `OPENCLAW_LIVE_OPENAI_KEY` (single override)
|
||||
- Example model: `openai/gpt-5.1-codex`
|
||||
- CLI: `openclaw onboard --auth-choice openai-api-key`
|
||||
- Default transport is `auto` (WebSocket-first, SSE fallback)
|
||||
- Override per model via `agents.defaults.models["openai/<model>"].params.transport` (`"sse"`, `"websocket"`, or `"auto"`)
|
||||
|
||||
```json5
|
||||
{
|
||||
|
||||
@@ -56,12 +56,14 @@ openclaw models auth login --provider openai-codex
|
||||
}
|
||||
```
|
||||
|
||||
### Codex transport default
|
||||
### Transport default
|
||||
|
||||
OpenClaw uses `pi-ai` for model streaming. For `openai-codex/*` models you can set
|
||||
`agents.defaults.models.<provider/model>.params.transport` to select transport:
|
||||
OpenClaw uses `pi-ai` for model streaming. For both `openai/*` and
|
||||
`openai-codex/*`, default transport is `"auto"` (WebSocket-first, then SSE
|
||||
fallback).
|
||||
|
||||
You can set `agents.defaults.models.<provider/model>.params.transport`:
|
||||
|
||||
- Default is `"auto"` (WebSocket-first, then SSE fallback).
|
||||
- `"sse"`: force SSE
|
||||
- `"websocket"`: force WebSocket
|
||||
- `"auto"`: try WebSocket, then fall back to SSE
|
||||
|
||||
Reference in New Issue
Block a user