mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-13 04:29:50 +08:00
fix(compact): 移除 OpenAI Compact 请求中不受支持的 store 参数
- 在 OpenAI Compact 请求规范化流程中剥离 `store` - 将 compact 默认 body rules 与 Codex CLI 默认规则拆分 - 补充 same-format 和转换链路的 compact 回归测试
This commit is contained in:
@@ -267,4 +267,32 @@ mod tests {
|
||||
assert_eq!(converted["store"], false);
|
||||
assert_eq!(converted["instructions"], "You are GPT-5.");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strips_store_for_openai_compact_requests() {
|
||||
let request = json!({
|
||||
"model": "gpt-5",
|
||||
"messages": [{
|
||||
"role": "user",
|
||||
"content": "Hello from OpenAI Chat"
|
||||
}],
|
||||
"store": true
|
||||
});
|
||||
|
||||
let converted = build_standard_request_body(
|
||||
&request,
|
||||
"openai:chat",
|
||||
"gpt-5",
|
||||
"openai",
|
||||
"openai:compact",
|
||||
"/v1/chat/completions",
|
||||
false,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.expect("openai chat should convert to openai compact");
|
||||
|
||||
assert_eq!(converted["model"], "gpt-5");
|
||||
assert!(converted.get("store").is_none());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user