feat(quota): add normalization for Gemini CLI model IDs and update quota groups

This commit is contained in:
LTbinglingfeng
2026-02-06 19:11:57 +08:00
parent 3661530f5f
commit cade2647d6
4 changed files with 63 additions and 21 deletions

View File

@@ -28,6 +28,7 @@ import {
GEMINI_CLI_QUOTA_URL,
GEMINI_CLI_REQUEST_HEADERS,
normalizeAuthIndexValue,
normalizeGeminiCliModelId,
normalizeNumberValue,
normalizePlanType,
normalizeQuotaFraction,
@@ -368,7 +369,7 @@ const fetchGeminiCliQuota = async (
const parsedBuckets = buckets
.map((bucket) => {
const modelId = normalizeStringValue(bucket.modelId ?? bucket.model_id);
const modelId = normalizeGeminiCliModelId(bucket.modelId ?? bucket.model_id);
if (!modelId) return null;
const tokenType = normalizeStringValue(bucket.tokenType ?? bucket.token_type);
const remainingFractionRaw = normalizeQuotaFraction(