Merge remote-tracking branch 'upstream/main' into codex/fix-antigravity-quota

This commit is contained in:
ZheFox
2026-09-03 13:24:39 +08:00
94 changed files with 1926 additions and 3765 deletions
+1 -28
View File
@@ -1725,8 +1725,6 @@ pub fn admin_system_config_default_value(key: &str) -> Option<serde_json::Value>
"proxy_node_metrics_cleanup_batch_size" => Some(json!(5000)),
"enable_provider_checkin" => Some(json!(true)),
"provider_checkin_time" => Some(json!("01:05")),
"provider_priority_mode" => Some(json!("provider")),
"scheduling_mode" => Some(json!("cache_affinity")),
"auto_delete_expired_keys" => Some(json!(false)),
"turnstile_enabled" => Some(json!(false)),
"turnstile_site_key" => Some(serde_json::Value::Null),
@@ -1754,10 +1752,8 @@ pub fn admin_system_config_default_value(key: &str) -> Option<serde_json::Value>
"email_suffix_mode" => Some(json!("none")),
"email_suffix_list" => Some(json!([])),
"enable_format_conversion" => Some(json!(false)),
"cyber_continue_failover" => Some(json!(false)),
"enable_model_directives" => Some(json!(false)),
"model_directives" => Some(aether_ai_formats::default_model_directives_config()),
"keep_priority_on_conversion" => Some(json!(false)),
"audit_log_retention_days" => Some(json!(30)),
"enable_db_maintenance" => Some(json!(true)),
"system_proxy_node_id" => Some(serde_json::Value::Null),
@@ -2236,8 +2232,7 @@ pub fn parse_admin_system_config_update(
}
match normalized_key.as_str() {
"cyber_continue_failover"
| "enable_model_directives"
"enable_model_directives"
| "module.important_notification.enabled"
| "module.important_notification.email_enabled"
| "module.server_chan_push.enabled"
@@ -3508,28 +3503,6 @@ mod tests {
);
}
#[test]
fn cyber_continue_failover_defaults_to_disabled() {
assert_eq!(
admin_system_config_default_value("cyber_continue_failover"),
Some(json!(false))
);
}
#[test]
fn cyber_continue_failover_update_requires_a_boolean() {
let update =
parse_admin_system_config_update("cyber_continue_failover", br#"{"value":true}"#)
.expect("boolean Cyber failover setting should parse");
assert_eq!(update.value, json!(true));
assert!(parse_admin_system_config_update(
"cyber_continue_failover",
br#"{"value":"true"}"#,
)
.is_err());
}
#[test]
fn model_directives_update_accepts_legacy_and_current_config_shapes() {
for body in [