fix(ci): stabilize main test suite regressions (#17660)

* fix: stabilize main test suite regressions

* test(agent): update MiniMax normalization expectation

* test: stabilize remaining CI assertions

* test: harden config helper monkeypatching

* test: harden CI-only assertions

* fix(agent): propagate fast streaming interrupts
This commit is contained in:
Stephen Schoettler
2026-04-29 23:18:55 -07:00
committed by GitHub
parent e7beaaf184
commit f73364b1c4
37 changed files with 450 additions and 127 deletions

View File

@@ -6531,6 +6531,9 @@ class AIAgent:
Falls back to _interruptible_api_call on provider errors indicating
streaming is not supported.
"""
if self._interrupt_requested:
raise InterruptedError("Agent interrupted before streaming API call")
if self.api_mode == "codex_responses":
# Codex streams internally via _run_codex_stream. The main dispatch
# in _interruptible_api_call already calls it; we just need to
@@ -7189,6 +7192,12 @@ class AIAgent:
# to non-streaming on the next attempt via _disable_streaming.
result["error"] = e
return
except InterruptedError as e:
# The interrupt may be noticed inside the worker thread before
# the polling loop sees it. Surface it through the normal result
# channel so callers never miss a fast pre-retry interrupt.
result["error"] = e
return
finally:
request_client = request_client_holder.get("client")
if request_client is not None: