mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Preserve selected reasoning effort for synchronous Guardian reviews (#46292)
## Why Synchronous Guardian reviewers need to use their selected request-level reasoning effort even when managed requirements enable `reasoning_effort_override` and the parent history contains effort updates. ## What changed Disable reasoning-effort overrides for synchronous Guardian sessions and use the same decision for request filtering, effort pinning, and update injection. Reviewers omit inherited configuration updates from requests without changing saved history or appending new effort updates. ## Testing Add regression coverage for both current and legacy Guardian session sources with managed overrides enabled. Verify that the parent retains its pinned effort, reviewer requests follow selected `low` and `high` efforts, and inherited updates remain in saved history. GitOrigin-RevId: 3a635dbdc613ea72f7a96fc96bb386e4ac7994c3
This commit is contained in:
1 parent
47915cee7a
commit
93321c88d8
4 files changed
+168
-14
No files matched your search
@@ -494,6 +494,10 @@ impl ModelClient {
|
||||
let auth_env_telemetry =
|
||||
collect_auth_env_telemetry(model_provider.info(), codex_api_key_env_enabled);
|
||||
let include_attestation = model_provider.supports_attestation();
|
||||
// Reviewers use their own request-level effort even when managed requirements
|
||||
// pin the parent's feature on. Share this decision with update injection and pinning.
|
||||
let reasoning_effort_override_enabled = reasoning_effort_override_enabled
|
||||
&& !crate::guardian::is_basic_session_source(&session_source);
|
||||
Self {
|
||||
state: Arc::new(ModelClientState {
|
||||
thread_id,
|
||||
@@ -524,6 +528,10 @@ impl ModelClient {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn reasoning_effort_override_enabled(&self) -> bool {
|
||||
self.state.reasoning_effort_override_enabled
|
||||
}
|
||||
|
||||
pub(crate) fn with_restored_history(mut self, restored_history: bool) -> Self {
|
||||
self.restored_history = restored_history;
|
||||
self
|
||||
|
||||
Reference in new issue
Block a user