mirror of
https://github.com/openai/codex.git
synced 2026-04-28 00:25:56 +00:00
Allow clients not to send summary as an option (#12950)
Summary is a required parameter on UserTurn. Ideally we'd like the core to decide the appropriate summary level. Make the summary optional and don't send it when not needed.
This commit is contained in:
@@ -139,6 +139,7 @@ async fn remote_models_long_model_slug_is_sent_with_high_reasoning() -> Result<(
|
||||
},
|
||||
];
|
||||
remote_model.supports_reasoning_summaries = true;
|
||||
remote_model.default_reasoning_summary = ReasoningSummary::Detailed;
|
||||
mount_models_once(
|
||||
&server,
|
||||
ModelsResponse {
|
||||
@@ -175,9 +176,7 @@ async fn remote_models_long_model_slug_is_sent_with_high_reasoning() -> Result<(
|
||||
sandbox_policy: config.permissions.sandbox_policy.get().clone(),
|
||||
model: requested_model.to_string(),
|
||||
effort: None,
|
||||
summary: config
|
||||
.model_reasoning_summary
|
||||
.unwrap_or(ReasoningSummary::Auto),
|
||||
summary: None,
|
||||
collaboration_mode: None,
|
||||
personality: None,
|
||||
})
|
||||
@@ -191,8 +190,13 @@ async fn remote_models_long_model_slug_is_sent_with_high_reasoning() -> Result<(
|
||||
.get("reasoning")
|
||||
.and_then(|reasoning| reasoning.get("effort"))
|
||||
.and_then(|value| value.as_str());
|
||||
let reasoning_summary = body
|
||||
.get("reasoning")
|
||||
.and_then(|reasoning| reasoning.get("summary"))
|
||||
.and_then(|value| value.as_str());
|
||||
assert_eq!(body["model"].as_str(), Some(requested_model));
|
||||
assert_eq!(reasoning_effort, Some("high"));
|
||||
assert_eq!(reasoning_summary, Some("detailed"));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -229,9 +233,11 @@ async fn namespaced_model_slug_uses_catalog_metadata_without_fallback_warning()
|
||||
sandbox_policy: config.permissions.sandbox_policy.get().clone(),
|
||||
model: requested_model.to_string(),
|
||||
effort: None,
|
||||
summary: config
|
||||
.model_reasoning_summary
|
||||
.unwrap_or(ReasoningSummary::Auto),
|
||||
summary: Some(
|
||||
config
|
||||
.model_reasoning_summary
|
||||
.unwrap_or(ReasoningSummary::Auto),
|
||||
),
|
||||
collaboration_mode: None,
|
||||
personality: None,
|
||||
})
|
||||
@@ -384,7 +390,7 @@ async fn remote_models_remote_model_uses_unified_exec() -> Result<()> {
|
||||
sandbox_policy: SandboxPolicy::DangerFullAccess,
|
||||
model: REMOTE_MODEL_SLUG.to_string(),
|
||||
effort: None,
|
||||
summary: ReasoningSummary::Auto,
|
||||
summary: Some(ReasoningSummary::Auto),
|
||||
collaboration_mode: None,
|
||||
personality: None,
|
||||
})
|
||||
@@ -596,7 +602,7 @@ async fn remote_models_apply_remote_base_instructions() -> Result<()> {
|
||||
sandbox_policy: SandboxPolicy::DangerFullAccess,
|
||||
model: model.to_string(),
|
||||
effort: None,
|
||||
summary: ReasoningSummary::Auto,
|
||||
summary: Some(ReasoningSummary::Auto),
|
||||
collaboration_mode: None,
|
||||
personality: None,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user