From 7f45617f79efcf47a4636c53e54a024401238e46 Mon Sep 17 00:00:00 2001 From: dalamudx Date: Wed, 30 Sep 2026 01:43:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(claude-code):=20=E4=BF=AE=E5=A4=8D=20clippy?= =?UTF-8?q?=20needless=5Fborrow=20=E5=B9=B6=E6=9B=B4=E6=96=B0=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E5=8F=97=E6=94=AF=E6=8C=81=E7=9A=84=20claude=5Fcode?= =?UTF-8?q?=20=E9=A2=9D=E5=BA=A6=E5=88=B7=E6=96=B0=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/handlers/shared/catalog.rs | 2 +- .../tests/control/admin/endpoints/quota.rs | 28 +++++++------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/apps/aether-gateway/src/handlers/shared/catalog.rs b/apps/aether-gateway/src/handlers/shared/catalog.rs index 6a1ff5a74..9d1936ece 100644 --- a/apps/aether-gateway/src/handlers/shared/catalog.rs +++ b/apps/aether-gateway/src/handlers/shared/catalog.rs @@ -2392,7 +2392,7 @@ fn build_claude_code_quota_status_snapshot( "reset_at": reset_at, "reset_seconds": reset_seconds, "reset_credits": build_codex_reset_credits_status_snapshot( - &metadata, + metadata, observed_at_unix_secs, ), "windows": windows, diff --git a/apps/aether-gateway/src/tests/control/admin/endpoints/quota.rs b/apps/aether-gateway/src/tests/control/admin/endpoints/quota.rs index 2f9b61bd5..7b1c4372c 100644 --- a/apps/aether-gateway/src/tests/control/admin/endpoints/quota.rs +++ b/apps/aether-gateway/src/tests/control/admin/endpoints/quota.rs @@ -2041,24 +2041,16 @@ async fn gateway_refreshes_admin_provider_quota_locally_for_gemini_cli_with_trus #[tokio::test] async fn gateway_refresh_quota_reconciles_unsupported_fixed_provider_endpoints_before_clear_message( ) { - let cases = [ - ( - "provider-claude-code-reconcile", - "claude_code", - 1usize, - "claude:messages", - "https://api.anthropic.com/v1", - "Claude Code 暂不支持自动刷新额度", - ), - ( - "provider-vertex-ai-reconcile", - "vertex_ai", - 2usize, - "gemini:generate_content", - "https://aiplatform.googleapis.com", - "Vertex AI 暂不支持自动刷新额度", - ), - ]; + // Claude Code supports quota refresh now, so Vertex AI is the remaining fixed provider + // whose refresh is unsupported. + let cases = [( + "provider-vertex-ai-reconcile", + "vertex_ai", + 2usize, + "gemini:generate_content", + "https://aiplatform.googleapis.com", + "Vertex AI 暂不支持自动刷新额度", + )]; let providers = cases .iter()