You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: auto-refresh Realtime session before 60-min cap, recover on expiry
OpenAI Realtime sessions are terminated by the server at 60 minutes.
Once the session dies, every further WS message from the browser returns
"server had an error while processing your request", which persisted in
the UI as an unrecoverable failure.
This adds two fixes to OpenAIRealtimeAdapter:
1. Proactive refresh — on session.created, start a 55-minute timer that
tears down the WS and opens a fresh one with the same instructions,
tools, and voice. The user sees a sub-second pause instead of a
hard failure.
2. Reactive recovery — when the server sends an error whose message
contains "maximum duration" or code is "session_expired", trigger
the same reconnect flow instead of surfacing the error.
Both paths reuse the existing connectWs + sendSessionUpdateOn logic,
including the ephemeral-token fallback for WebContainer-style hosts.
Bumps version to 1.4.3.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments