mirror of
https://github.com/openai/codex.git
synced 2026-10-18 17:18:52 +00:00
## Why Reasoning configuration changes need to retain their position and trusted provenance when model history is persisted and replayed. Client-injected history must not be able to forge these controls. ## What changed - Add a typed `configuration_update` response item carrying reasoning effort, including custom model-defined values. - Persist harness-authored updates with provenance and preserve them across history reconstruction, thread resume, raw response notifications, and agent forks. - Exclude untrusted configuration updates from model history, strip client-supplied provenance metadata, and reject configuration updates supplied as turn input. - Export the new item through the JSON and TypeScript app-server schemas and classify it in telemetry and persistence metrics. ## Testing - Cover serialization, provenance persistence, history filtering and rollback, resume reconstruction, and injection attempts before and after restart. GitOrigin-RevId: eb5559d2b52b7a931621e7c9812f009ff9fb8939
18 lines
500 B
Rust
18 lines
500 B
Rust
//! Typed reasoning settings for a durable Responses API configuration update.
|
|
|
|
use crate::openai_models::ReasoningEffort;
|
|
use schemars::JsonSchema;
|
|
use serde::Deserialize;
|
|
use serde::Serialize;
|
|
use ts_rs::TS;
|
|
|
|
/// Reasoning settings interpreted by the backend for the routed model.
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema, TS)]
|
|
pub struct ConfigurationReasoning {
|
|
pub effort: ReasoningEffort,
|
|
}
|
|
|
|
#[cfg(test)]
|
|
#[path = "configuration_update_tests.rs"]
|
|
mod tests;
|