mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Allow thread sampling after failed or interrupted turns (#56020)
## Why `thread/sample` previously required the latest source turn to have completed successfully, rejecting failed or interrupted turns even when the source was idle. ## What changed Accept the latest completed, failed, or interrupted turn in both legacy and paginated history modes. Update the protocol documentation and validation error to reflect the accepted statuses, while continuing to reject stale or active sources. ## Testing Expand integration coverage across all three terminal statuses and both history modes, checking that sampling preserves context and leaves the source unchanged. Also verify that sampling an active source is rejected before interrupting it. GitOrigin-RevId: a5dfdb2800868ee178eae16b12ee7f6f9515898c
This commit is contained in:
@@ -12,7 +12,8 @@ use serde::Serialize;
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadSampleParams {
|
||||
pub thread_id: String,
|
||||
/// The loaded source's latest completed turn. Stale or active sources are rejected.
|
||||
/// The loaded source's latest completed, failed, or interrupted turn.
|
||||
/// Stale or active sources are rejected.
|
||||
pub expected_turn_id: String,
|
||||
pub prompt: String,
|
||||
/// Applied only when the provider and model support cache-preserving reasoning-effort updates.
|
||||
|
||||
Reference in New Issue
Block a user