Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit ca0c901

Browse files
roomote[bot]roomote
andauthored
fix: use task stored API config as fallback for rate limit (#10266)
Co-authored-by: Roo Code <roomote@roocode.com>
1 parent 7552581 commit ca0c901

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/task/Task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4242,7 +4242,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
42424242

42434243
// Respect provider rate limit window
42444244
let rateLimitDelay = 0
4245-
const rateLimit = state?.apiConfiguration?.rateLimitSeconds || 0
4245+
const rateLimit = (state?.apiConfiguration ?? this.apiConfiguration)?.rateLimitSeconds || 0
42464246
if (Task.lastGlobalApiRequestTime && rateLimit > 0) {
42474247
const elapsed = performance.now() - Task.lastGlobalApiRequestTime
42484248
rateLimitDelay = Math.ceil(Math.min(rateLimit, Math.max(0, rateLimit * 1000 - elapsed) / 1000))

0 commit comments

Comments
 (0)