mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-11 17:26:32 +02:00
fix(ai): add 3s throttle between batch chunks to avoid OpenRouter 429 rate limiting
This commit is contained in:
1 parent
d3dfcf6be4
commit
bcbea69d0a
1 file changed
+5
@@ -97,6 +97,11 @@ export function BulkAiAnalyzer() {
|
||||
}
|
||||
|
||||
completed++;
|
||||
|
||||
// Respect OpenRouter free-tier rate limits — pause 3s before next chunk
|
||||
if (completed < chunks.length) {
|
||||
await new Promise(resolve => setTimeout(resolve, 3000));
|
||||
}
|
||||
}
|
||||
|
||||
setProgress(prev => ({ ...prev, current: completed, total: chunks.length, message: `Analyse terminée ! (${prev.errors > 0 ? prev.errors + " erreurs" : "succès"})` }));
|
||||
|
||||
Reference in new issue
Block a user