Set memories phase reasoning effort constants (#12309)

## Summary
- add reasoning effort constants for the memories phase one and phase
two agents
- wire the constants into phase1 request creation and phase2 agent
configuration so the default efforts are always applied

## Testing
- Not run (not requested)
This commit is contained in:
jif-oai 2026-02-20 09:25:35 +00:00 committed by GitHub
parent e747a8eb74
commit a7632f68a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 1 deletions

View file

@ -13,6 +13,8 @@ mod storage;
mod tests;
pub(crate) mod usage;
use codex_protocol::openai_models::ReasoningEffort;
/// Starts the memory startup pipeline for eligible root sessions.
/// This is the single entrypoint that `codex` uses to trigger memory startup.
///
@ -28,6 +30,8 @@ mod artifacts {
mod phase_one {
/// Default model used for phase 1.
pub(super) const MODEL: &str = "gpt-5.1-codex-mini";
/// Default reasoning effort used for phase 1.
pub(super) const REASONING_EFFORT: super::ReasoningEffort = super::ReasoningEffort::Low;
/// Prompt used for phase 1.
pub(super) const PROMPT: &str = include_str!("../../templates/memories/stage_one_system.md");
/// Concurrency cap for startup memory extraction and consolidation scheduling.
@ -56,6 +60,8 @@ mod phase_one {
mod phase_two {
/// Default model used for phase 2.
pub(super) const MODEL: &str = "gpt-5.3-codex";
/// Default reasoning effort used for phase 2.
pub(super) const REASONING_EFFORT: super::ReasoningEffort = super::ReasoningEffort::Medium;
/// Lease duration (seconds) for phase-2 consolidation job ownership.
pub(super) const JOB_LEASE_SECONDS: i64 = 3_600;
/// Backoff delay (seconds) before retrying a failed phase-2 consolidation

View file

@ -142,7 +142,7 @@ impl RequestContext {
model_info,
turn_metadata_header,
otel_manager: turn_context.otel_manager.clone(),
reasoning_effort: turn_context.reasoning_effort,
reasoning_effort: Some(phase_one::REASONING_EFFORT),
reasoning_summary: turn_context.reasoning_summary,
}
}

View file

@ -258,6 +258,7 @@ mod agent {
.clone()
.unwrap_or(phase_two::MODEL.to_string()),
);
agent_config.model_reasoning_effort = Some(phase_two::REASONING_EFFORT);
Some(agent_config)
}