mirror of
https://github.com/openai/codex.git
synced 2026-11-16 06:54:36 +00:00
Let Guardian V2 satisfy required model reviews (#39658)
## What changed - Allow the Guardian V2 approval monitor to handle reviews for models that require automatic review. - Preserve full Guardian review when Guardian V2 is disabled by configuration or managed requirements. - Cover required-model routing for low- and high-risk actions, plus both Guardian V2 disable paths. GitOrigin-RevId: d1201cc3dbd7c4a07de633388b14f17ada9feb39
This commit is contained in:
1 parent
5e3a6fe4ee
commit
4e1a772a7d
3 files changed
+233
-12
No files matched your search
@@ -313,11 +313,13 @@ async fn run_guardian_review(
|
||||
options: GuardianReviewOptions,
|
||||
) -> ReviewDecision {
|
||||
let turn = Arc::clone(context.turn());
|
||||
if !turn
|
||||
// Required models must use Guardian, but an enabled V2 monitor can satisfy the review.
|
||||
if (!turn
|
||||
.config
|
||||
.config_layer_stack
|
||||
.requirements()
|
||||
.auto_review_required_for_model(&turn.model_info.slug)
|
||||
|| turn.config.features.enabled(Feature::GuardianV2))
|
||||
&& reasons.retry.is_none()
|
||||
&& options
|
||||
.external_cancel
|
||||
|
||||
Reference in new issue
Block a user