Reapply "Pass more params to compaction" (#14298) (#14521)

This reverts commit 8af97ce4b0.

Confirmed that this runs locally without the previous issues with tool
use
This commit is contained in:
Rasmus Rygaard
2026-03-12 16:27:21 -07:00
committed by GitHub
parent 651717323c
commit 53d5972226
4 changed files with 87 additions and 4 deletions

View File

@@ -271,6 +271,28 @@ async fn remote_compact_replaces_history_for_followups() -> Result<()> {
compact_body.get("model").and_then(|v| v.as_str()),
Some(harness.test().session_configured.model.as_str())
);
let response_requests = responses_mock.requests();
let first_response_request = response_requests.first().expect("initial request missing");
assert_eq!(
compact_body["tools"],
first_response_request.body_json()["tools"],
"compact requests should send the same tools payload as /v1/responses"
);
assert_eq!(
compact_body["parallel_tool_calls"],
first_response_request.body_json()["parallel_tool_calls"],
"compact requests should match /v1/responses parallel_tool_calls"
);
assert_eq!(
compact_body["reasoning"],
first_response_request.body_json()["reasoning"],
"compact requests should match /v1/responses reasoning"
);
assert_eq!(
compact_body["text"],
first_response_request.body_json()["text"],
"compact requests should match /v1/responses text controls"
);
let compact_body_text = compact_body.to_string();
assert!(
compact_body_text.contains("hello remote compact"),