Skip to content

Use Guardian model limits for review sessions - #34847

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/ebc399f4eba37c7f279fd0d258154c00d45e2d00
Jul 23, 2026
Merged

Use Guardian model limits for review sessions#34847
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/ebc399f4eba37c7f279fd0d258154c00d45e2d00

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 23, 2026

Copy link
Copy Markdown

Use Guardian model limits for review sessions

Why

Parent context-window and auto-compaction overrides may describe a different
model than the one selected for Guardian review.

What changed

  • Clear model_context_window and model_auto_compact_token_limit when the
    effective Guardian model differs from the parent model, allowing the review
    model's own limits to apply.
  • Preserve those overrides when Guardian uses the same effective model.

Testing

Add unit coverage for both model-selection paths and verify that a Guardian
rollout records the selected review model's context window.

## Why

Parent context-window and auto-compaction overrides may describe a different
model than the one selected for Guardian review.

## What changed

- Clear `model_context_window` and `model_auto_compact_token_limit` when the
  effective Guardian model differs from the parent model, allowing the review
  model's own limits to apply.
- Preserve those overrides when Guardian uses the same effective model.

## Testing

Add unit coverage for both model-selection paths and verify that a Guardian
rollout records the selected review model's context window.

GitOrigin-RevId: ebc399f4eba37c7f279fd0d258154c00d45e2d00
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/ebc399f4eba37c7f279fd0d258154c00d45e2d00 branch from b6561f6 to 9d82334 Compare July 23, 2026 00:05
@copyberry
copyberry Bot merged commit 9d82334 into main Jul 23, 2026
19 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/ebc399f4eba37c7f279fd0d258154c00d45e2d00 branch July 23, 2026 00:06
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants