fix: usage API rate-limit guard and cleanup debug logging

This commit is contained in:
Eyejoker
2026-03-24 03:47:46 +09:00
parent 6a73421d4f
commit f6ba879e8a
4 changed files with 37 additions and 34 deletions

View File

@@ -156,11 +156,7 @@ export function rotateToken(
for (let i = 1; i < tokens.length; i++) {
const idx = (currentIndex + i) % tokens.length;
const state = tokens[idx];
if (
ignoreRL ||
!state.rateLimitedUntil ||
state.rateLimitedUntil <= now
) {
if (ignoreRL || !state.rateLimitedUntil || state.rateLimitedUntil <= now) {
state.rateLimitedUntil = null;
currentIndex = idx;
logger.info(