Use model catalog default for reasoning summary fallback (#12873)

## Summary
- make `Config.model_reasoning_summary` optional so unset means use
model default
- resolve the optional config value to a concrete summary when building
`TurnContext`
- add protocol support for `default_reasoning_summary` in model metadata

## Validation
- `cargo test -p codex-core --lib client::tests -- --nocapture`

---------

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
pakrym-oai
2026-02-26 09:31:13 -08:00
committed by GitHub
parent f0a85ded18
commit ba41e84a50
24 changed files with 175 additions and 40 deletions

View File

@@ -96,7 +96,7 @@ async fn status_snapshot_includes_reasoning_details() {
let mut config = test_config(&temp_home).await;
config.model = Some("gpt-5.1-codex-max".to_string());
config.model_provider_id = "openai".to_string();
config.model_reasoning_summary = ReasoningSummary::Detailed;
config.model_reasoning_summary = Some(ReasoningSummary::Detailed);
config
.permissions
.sandbox_policy
@@ -596,7 +596,7 @@ async fn status_snapshot_truncates_in_narrow_terminal() {
let mut config = test_config(&temp_home).await;
config.model = Some("gpt-5.1-codex-max".to_string());
config.model_provider_id = "openai".to_string();
config.model_reasoning_summary = ReasoningSummary::Detailed;
config.model_reasoning_summary = Some(ReasoningSummary::Detailed);
config.cwd = PathBuf::from("/workspace/tests");
let auth_manager = test_auth_manager(&config);