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:
pakrym-oai
2026-02-26 14:37:38 -08:00
committed by GitHub
parent c1afb8815a
commit 951a389654
38 changed files with 233 additions and 175 deletions

View File

@@ -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,
})