mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-11 11:49:50 +08:00
修复 ChatGPT Web 生图调用起始预扣额度
This commit is contained in:
@@ -276,6 +276,23 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn chatgpt_web_quota_metadata_ignores_upstream_free_25_default() {
|
||||
let mut metadata = json!({
|
||||
"plan_type": "free",
|
||||
"image_quota_remaining": 19,
|
||||
"image_quota_total": 25,
|
||||
});
|
||||
normalize_chatgpt_web_image_quota_limit(&mut metadata, None);
|
||||
|
||||
assert_eq!(metadata["image_quota_total"], json!(19.0));
|
||||
assert_eq!(metadata["image_quota_used"], json!(0.0));
|
||||
assert_eq!(
|
||||
metadata["image_quota_limit_source"],
|
||||
json!("first_remaining")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn chatgpt_web_quota_metadata_preserves_marked_free_first_limit() {
|
||||
let mut metadata = json!({
|
||||
|
||||
Reference in New Issue
Block a user