mirror of
https://github.com/openai/codex.git
synced 2026-12-06 01:10:58 +00:00
Allow upstream interruption when canceling Responses Lite turns (#57864)
## What changed
- Add the disabled-by-default `interrupt_on_cancel` feature to interrupt upstream inference when a Responses Lite turn is canceled, with a one-second cleanup deadline.
- Detach canceled WebSocket responses so replacement requests can open a new connection without waiting for cleanup.
- Add an optional `interrupt_on_cancel` override for thread samples, inheriting the parent setting when omitted.
## Testing
Add coverage for cancellation during inference and steering, replacement turns proceeding before cleanup finishes, and prompt cancellation of model response interceptors.
GitOrigin-RevId: 501368746fc04fd3fdbd45c1f34c75ce57f4e955
(cherry picked from commit f276b82185)
This commit is contained in:
BIN
Binary file not shown.
@@ -31,6 +31,9 @@ pub struct ThreadSampleParams {
|
||||
/// Disable MCP servers when the inherited window uses incremental tools on Responses Lite.
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
pub disable_mcp: bool,
|
||||
/// Override upstream interruption on cancellation for this sample; otherwise inherit the parent.
|
||||
#[ts(optional = nullable)]
|
||||
pub interrupt_on_cancel: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
|
||||
Reference in New Issue
Block a user