fix(voice): accept verified Marin cancellation completion race

This commit is contained in:
amirhosein mazaheri
2026-10-13 14:41:53 +03:30
parent fd4e419e4a
commit 1139b31219
4 changed files with 48 additions and 4 deletions
+5 -1
View File
@@ -198,7 +198,11 @@ class RealtimeAdapter:
# Selected-profile probe: docs/guides/live-context-sync-repair.md.
# The runtime separately requires the cancellation intent event_id,
# terminal response confirmation, and heard-position truncation.
return (self.model in ("gpt-realtime-mini", "gpt-realtime-2.1") and self.voice == "shimmer"
return ((self.model, self.voice) in {
("gpt-realtime-mini", "shimmer"),
("gpt-realtime-2.1", "shimmer"),
("gpt-realtime-2.1", "marin"),
}
and isinstance(error, dict)
and error.get("type") == "invalid_request_error"
and error.get("code") == "response_cancel_not_active"