fix: harden OpenAI websocket transport

This commit is contained in:
Peter Steinberger
2026-04-04 02:11:22 +01:00
parent 1e6e685347
commit b76ed0fadf
7 changed files with 600 additions and 328 deletions

View File

@@ -184,6 +184,10 @@ OpenClaw uses `pi-ai` for model streaming. For both `openai/*` and
`openai-codex/*`, default transport is `"auto"` (WebSocket-first, then SSE
fallback).
In `"auto"` mode, OpenClaw also retries one early, retryable WebSocket failure
before it falls back to SSE. Forced `"websocket"` mode still surfaces transport
errors directly instead of hiding them behind fallback.
You can set `agents.defaults.models.<provider/model>.params.transport`:
- `"sse"`: force SSE