mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
65d6929993
The Zhipu quota API returns two TOKENS_LIMIT entries whose identity was inferred by sorting nextResetTime ascending (nearest = five_hour). In the last hours of each weekly cycle the weekly window resets sooner than the current 5-hour session window, so the two buckets were swapped exactly when users check their weekly quota most. Classify by the explicit unit field instead (3 = hour window -> five_hour, 6 = week window -> weekly_limit; same shape on bigmodel.cn and api.z.ai, weekly observed with number 7 and 1 so only unit is matched), falling back to the old reset-time heuristic when the field is missing.