Switch to sequential batching to eliminate rate limit hits
1 concurrent + 20s pacing = ~3 batches/min × 2k tokens = 6k TPM, safely under the 8k output TPM limit. Progress estimate updated to 22s/batch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ public class AiCatalogPriceCheckService : IAiCatalogPriceCheckService
|
||||
|
||||
private const string Model = "claude-haiku-4-5-20251001";
|
||||
private const int BatchSize = 25;
|
||||
private const int MaxConcurrentBatches = 2;
|
||||
private const int MaxConcurrentBatches = 1; // sequential avoids bursting past the 8k output TPM limit
|
||||
private const int RateLimitRetrySeconds = 65;
|
||||
private const int MinBatchIntervalSeconds = 20; // proactive pacing: ~3 batches/min × ~2k tokens = ~6k TPM, under the 8k limit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user