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:
joeflorencio-openai authored and copyberry committed 2026-08-25 17:41:22 +00:00
1 parent ba6cf9c692
commit 68301fa45f
68 files changed
+1393 -516

No files matched your search

+4 -4
View File
@@ -766,7 +766,7 @@ async fn review_guardian_mcp_elicitation(
|| crate::connectors::mcp_approvals_reviewer_from_layers(
&mcp_config.config_layer_stack,
ApprovalsReviewer::AutoReview,
Some(turn_context.model_info.slug.as_str()),
Some(turn_context.model_info().slug.as_str()),
request.server_name.as_str(),
connector_id,
) != ApprovalsReviewer::AutoReview
@@ -806,7 +806,7 @@ async fn review_guardian_mcp_elicitation(
| ReviewDecision::Abort
)
.then(|| {
mcp_elicitation_response_from_guardian_decision(decision, &turn_context.model_info)
mcp_elicitation_response_from_guardian_decision(decision, turn_context.model_info())
}));
}
@@ -844,7 +844,7 @@ async fn review_guardian_mcp_elicitation(
let approvals_reviewer = crate::connectors::mcp_approvals_reviewer_from_layers(
&mcp_config.config_layer_stack,
mcp_config.approvals_reviewer,
Some(turn_context.model_info.slug.as_str()),
Some(turn_context.model_info().slug.as_str()),
request.server_name.as_str(),
elicitation_connector_id(&request.elicitation),
);
@@ -882,7 +882,7 @@ async fn review_guardian_mcp_elicitation(
.await;
Ok(Some(mcp_elicitation_response_from_guardian_decision(
decision,
&turn_context.model_info,
turn_context.model_info(),
)))
}