Skip to content

Commit 5f31c92

Browse files
committed
fix(traffic): align OpenAI remaining with reservations
1 parent d214e70 commit 5f31c92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/src/traffic/rate-limit-strategies/openai-window-rate-limit-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ export class OpenAIWindowRateLimitStrategy implements RateLimitStrategy {
431431

432432
state = {
433433
limit: effectiveLimit,
434-
remaining: clampedRemaining,
434+
remaining: clampedRemaining + reserved,
435435
resetAt,
436436
slotReservedForStream: reserved,
437437
nextAllowedAt: now, // Unused while pacing is disabled.

0 commit comments

Comments
 (0)