mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
preserve model-derived instruction provenance
This commit is contained in:
@@ -178,7 +178,7 @@ impl ThreadStore for InMemoryThreadStore {
|
||||
source: params.source.clone(),
|
||||
thread_source: params.thread_source,
|
||||
model_provider: Some(params.metadata.model_provider.clone()),
|
||||
base_instructions: Some(params.base_instructions.clone()),
|
||||
base_instructions: params.base_instructions.clone(),
|
||||
dynamic_tools: (!params.dynamic_tools.is_empty()).then(|| params.dynamic_tools.clone()),
|
||||
memory_mode: matches!(params.metadata.memory_mode, ThreadMemoryMode::Disabled)
|
||||
.then_some("disabled".to_string()),
|
||||
|
||||
@@ -1018,7 +1018,7 @@ mod tests {
|
||||
parent_thread_id: None,
|
||||
source: SessionSource::Exec,
|
||||
thread_source: None,
|
||||
base_instructions: BaseInstructions::default(),
|
||||
base_instructions: Some(BaseInstructions::default()),
|
||||
dynamic_tools: Vec::new(),
|
||||
multi_agent_version: None,
|
||||
metadata: thread_metadata(),
|
||||
|
||||
@@ -75,8 +75,11 @@ pub struct CreateThreadParams {
|
||||
pub source: SessionSource,
|
||||
/// Optional analytics source classification for this thread.
|
||||
pub thread_source: Option<ThreadSource>,
|
||||
/// Base instructions persisted in session metadata.
|
||||
pub base_instructions: BaseInstructions,
|
||||
/// Fixed base instructions persisted in session metadata.
|
||||
///
|
||||
/// `None` leaves model-derived instructions unresolved so the current model catalog can rebuild
|
||||
/// them when the thread is resumed.
|
||||
pub base_instructions: Option<BaseInstructions>,
|
||||
/// Dynamic tools available to the thread at startup.
|
||||
pub dynamic_tools: Vec<DynamicToolSpec>,
|
||||
/// Multi-agent runtime selected when the thread was created.
|
||||
|
||||
Reference in New Issue
Block a user