mirror of
https://github.com/openai/codex.git
synced 2026-04-30 09:26:44 +00:00
Pass more params to compaction (#14247)
Pass more params to /compact. This should give us parity with the /responses endpoint to improve caching. I'm torn about the MCP await. Blocking will give us parity but it seems like we explicitly don't block on MCPs. Happy either way
This commit is contained in:
committed by
Michael Bolin
parent
889b4796fc
commit
2621ba17e3
@@ -252,6 +252,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"),
|
||||
|
||||
Reference in New Issue
Block a user