mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 16:37:46 +08:00
fix(codex): 移除 Responses Lite 请求中的 context_management
This commit is contained in:
@@ -607,6 +607,10 @@ mod tests {
|
||||
}
|
||||
}
|
||||
}],
|
||||
"context_management": [{
|
||||
"type": "compaction",
|
||||
"compact_threshold": 128000
|
||||
}],
|
||||
"parallel_tool_calls": true
|
||||
});
|
||||
|
||||
@@ -629,6 +633,7 @@ mod tests {
|
||||
assert_eq!(body, first);
|
||||
assert!(body.get("instructions").is_none());
|
||||
assert!(body.get("tools").is_none());
|
||||
assert!(body.get("context_management").is_none());
|
||||
assert_eq!(body["input"][0]["type"], "additional_tools");
|
||||
assert_eq!(body["input"][0]["role"], "developer");
|
||||
assert_eq!(body["input"][0]["tools"][0]["name"], "lookup");
|
||||
|
||||
@@ -1298,6 +1298,8 @@ fn apply_codex_responses_lite_body_contract(
|
||||
return;
|
||||
}
|
||||
|
||||
body_object.remove("context_management");
|
||||
|
||||
let tools_are_valid = body_object
|
||||
.get("tools")
|
||||
.is_none_or(|tools| tools.is_null() || tools.is_array());
|
||||
|
||||
Reference in New Issue
Block a user