mirror of
https://github.com/openai/codex.git
synced 2026-11-14 06:48:26 +00:00
Allow updating the approval reviewer for active turns (#42121)
## What changed - Add `approvalsReviewer` to the experimental `turn/settings/update` API. - Apply reviewer changes to subsequently captured steps and new background approval requests while preserving pending approvals and future-thread defaults. - Allow reviewer-only updates without `step_model_switching`, while continuing to enforce managed reviewer restrictions and model-required auto review. - Use an explicit live reviewer update for MCP approvals while retaining refreshed thread defaults for clients that have not set one. ## Testing - Cover switching between user and automatic review during a live turn, future-turn isolation, and managed-authority rejection. GitOrigin-RevId: e1216b09c6a7972c2c9eaf4955d8d57d60604ca1
This commit is contained in:
1 parent
bc39b0ed59
commit
9112564114
14 files changed
+267
-28
No files matched your search
@@ -724,6 +724,7 @@ async fn review_guardian_mcp_elicitation(
|
||||
let Some(mcp_config) = session.services.mcp_runtime.current_config() else {
|
||||
return Ok(None);
|
||||
};
|
||||
let step_settings = turn_context.current_settings.load_full();
|
||||
|
||||
// The invocation identifies the tool event, but a nested elicitation can
|
||||
// review a different action and connector than the enclosing JavaScript.
|
||||
@@ -893,7 +894,9 @@ 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,
|
||||
step_settings
|
||||
.mcp_approvals_reviewer_override
|
||||
.unwrap_or(mcp_config.approvals_reviewer),
|
||||
Some(turn_context.model_info().slug.as_str()),
|
||||
request.server_name.as_str(),
|
||||
elicitation_connector_id(&request.elicitation),
|
||||
|
||||
Reference in new issue
Block a user