mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Snapshot resolved settings for each model step (#40651)
## Why Thread settings can change while a turn is running, and delegated review or compaction steps can select a different model. Each request needs a consistent set of settings resolved against the model that will execute it. ## What changed - Capture immutable resolved settings for each model step, including model metadata, reasoning options, service tier, approvals, and personality. - Keep in-flight steps on their captured settings while applying thread updates to subsequent work. - Resolve inherited reasoning summaries and filter service tiers against the selected model and feature configuration for review and compaction steps. ## Testing Added coverage for settings updates during paused turns, model changes, previous-model compaction, review-model defaults, and service-tier filtering. GitOrigin-RevId: fca4b3b305379f1bf26a5cac75ee0dd1747ac1f6
This commit is contained in:
1 parent
ba6cf9c692
commit
68301fa45f
68 files changed
+1393
-516
No files matched your search
@@ -438,7 +438,7 @@ impl GuardianReviewSessionManager {
|
||||
.with_node_repl_policy_eligibility(
|
||||
parent_context
|
||||
.turn()
|
||||
.model_info
|
||||
.model_info()
|
||||
.node_repl_auto_review_required,
|
||||
);
|
||||
let spawn_cancel_token = self.cancellation_token.child_token();
|
||||
@@ -528,7 +528,7 @@ impl GuardianReviewSessionManager {
|
||||
params
|
||||
.parent_context
|
||||
.turn()
|
||||
.model_info
|
||||
.model_info()
|
||||
.node_repl_auto_review_required,
|
||||
);
|
||||
let mut spawned_trunk = false;
|
||||
@@ -952,7 +952,7 @@ async fn run_review_on_session(
|
||||
.sync_session_approved_hosts_to(&review_session.session.services.network_approval)
|
||||
.await;
|
||||
|
||||
if params.parent_context.turn().model_info.node_repl_auto_review_required
|
||||
if params.parent_context.turn().model_info().node_repl_auto_review_required
|
||||
&& matches!(
|
||||
¶ms.request,
|
||||
GuardianApprovalRequest::McpToolCall { server, tool_name, .. }
|
||||
@@ -1607,10 +1607,10 @@ mod tests {
|
||||
|
||||
async fn test_review_params() -> GuardianReviewSessionParams {
|
||||
let (session, turn) = crate::session::tests::make_session_and_context().await;
|
||||
let model = turn.model_info.slug.clone();
|
||||
let reasoning_effort = turn.reasoning_effort.clone();
|
||||
let reasoning_summary = turn.reasoning_summary;
|
||||
let personality = turn.personality;
|
||||
let model = turn.model_info().slug.clone();
|
||||
let reasoning_effort = turn.reasoning_effort().cloned();
|
||||
let reasoning_summary = turn.reasoning_summary();
|
||||
let personality = turn.personality();
|
||||
#[allow(deprecated)]
|
||||
let cwd = turn.cwd.clone();
|
||||
let spawn_config = build_guardian_review_session_config(
|
||||
|
||||
Reference in new issue
Block a user