fix(gateway): persist quota refresh from strong catalog reads

This commit is contained in:
ZheFox
2026-09-03 13:16:40 +08:00
parent 76fb8905c9
commit 40a5e1470d
4 changed files with 163 additions and 11 deletions
@@ -2536,7 +2536,7 @@ async fn gateway_refreshes_admin_provider_quota_locally_for_antigravity_with_tru
.upstream_metadata
.as_ref()
.and_then(|value| value.get("antigravity"))
.and_then(|value| value.get("models"))
.and_then(|value| value.get("quota_by_model"))
.and_then(|value| value.get("claude-sonnet-4"))
.and_then(|value| value.get("remaining_fraction")),
Some(&json!(0.25))
@@ -2546,7 +2546,7 @@ async fn gateway_refreshes_admin_provider_quota_locally_for_antigravity_with_tru
.upstream_metadata
.as_ref()
.and_then(|value| value.get("antigravity"))
.and_then(|value| value.get("models"))
.and_then(|value| value.get("quota_by_model"))
.and_then(|value| value.get("claude-sonnet-4"))
.and_then(|value| value.get("used_percent")),
Some(&json!(75.0))