feat(agents): make openai responses websocket-first with fallback

This commit is contained in:
Peter Steinberger
2026-03-01 21:50:33 +00:00
parent 38da2d076c
commit 7ced38b5ef
7 changed files with 1260 additions and 6 deletions

View File

@@ -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