mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Allow callers to set the thread source for sampling (#56364)
## What changed Add optional `threadSource` to `thread/sample` requests and apply it to the ephemeral fork. Keep `thread_sample` as the default when omitted. ## Testing Extend sampling tests to assert that turn metadata includes the supplied thread source and retains the default when no source is provided. GitOrigin-RevId: 8ea941c932267e3bcb9e6b086764ac2795d6edef
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
//! One model response on an ephemeral fork that inherits the source's configuration and context.
|
||||
|
||||
use super::ThreadSource;
|
||||
use crate::JsonSchema;
|
||||
use crate::RequestId;
|
||||
use crate::TS;
|
||||
@@ -21,6 +22,8 @@ pub struct ThreadSampleParams {
|
||||
#[ts(optional = nullable)]
|
||||
pub effort: Option<ReasoningEffort>,
|
||||
#[ts(optional = nullable)]
|
||||
pub thread_source: Option<ThreadSource>,
|
||||
#[ts(optional = nullable)]
|
||||
pub turn_trigger: Option<String>,
|
||||
/// Optional metadata to enrich Codex's ResponsesAPI turn metadata.
|
||||
#[ts(optional = nullable)]
|
||||
|
||||
Reference in New Issue
Block a user