mirror of
https://github.com/openai/codex.git
synced 2026-05-04 21:32:21 +03:00
Override truncation policy at model info level (#8856)
We used to override truncation policy by comparing model info vs config value in context manager. A better way to do it is to construct model info using the config value
This commit is contained in:
@@ -544,10 +544,7 @@ impl Session {
|
||||
final_output_json_schema: None,
|
||||
codex_linux_sandbox_exe: per_turn_config.codex_linux_sandbox_exe.clone(),
|
||||
tool_call_gate: Arc::new(ReadinessFlag::new()),
|
||||
truncation_policy: TruncationPolicy::new(
|
||||
per_turn_config.as_ref(),
|
||||
model_info.truncation_policy.into(),
|
||||
),
|
||||
truncation_policy: model_info.truncation_policy.into(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2244,10 +2241,7 @@ async fn spawn_review_thread(
|
||||
final_output_json_schema: None,
|
||||
codex_linux_sandbox_exe: parent_turn_context.codex_linux_sandbox_exe.clone(),
|
||||
tool_call_gate: Arc::new(ReadinessFlag::new()),
|
||||
truncation_policy: TruncationPolicy::new(
|
||||
&per_turn_config,
|
||||
model_info.truncation_policy.into(),
|
||||
),
|
||||
truncation_policy: model_info.truncation_policy.into(),
|
||||
};
|
||||
|
||||
// Seed the child task with the review prompt as the initial user message.
|
||||
|
||||
Reference in New Issue
Block a user