Spaces:
Paused
Paused
fix: implement staggered throttling and sequential file processing for free tier
Browse files- index.ts +2 -2
- logs.txt +57 -29
- src/bot.ts +1 -1
index.ts
CHANGED
|
@@ -63,8 +63,8 @@ export default (app: Probot, {getRouter}: any) => {
|
|
| 63 |
process.env.MODEL_TEMPERATURE || '0.0',
|
| 64 |
process.env.RETRIES || '3',
|
| 65 |
process.env.TIMEOUT_MS || '120000',
|
| 66 |
-
process.env.CONCURRENCY_LIMIT || '
|
| 67 |
-
process.env.GITHUB_CONCURRENCY_LIMIT || '
|
| 68 |
process.env.API_BASE_URL || 'https://api.groq.com/openai/v1',
|
| 69 |
process.env.LANGUAGE || 'en-US',
|
| 70 |
true,
|
|
|
|
| 63 |
process.env.MODEL_TEMPERATURE || '0.0',
|
| 64 |
process.env.RETRIES || '3',
|
| 65 |
process.env.TIMEOUT_MS || '120000',
|
| 66 |
+
process.env.CONCURRENCY_LIMIT || '1',
|
| 67 |
+
process.env.GITHUB_CONCURRENCY_LIMIT || '1',
|
| 68 |
process.env.API_BASE_URL || 'https://api.groq.com/openai/v1',
|
| 69 |
process.env.LANGUAGE || 'en-US',
|
| 70 |
true,
|
logs.txt
CHANGED
|
@@ -1,9 +1,29 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
Cloning Rachit-Tiwari-7/TEST-PRIX with depth 1...
|
| 4 |
From https://github.com/Rachit-Tiwari-7/TEST-PRIX
|
| 5 |
-
* branch
|
| 6 |
-
Note: switching to '
|
| 7 |
|
| 8 |
You are in 'detached HEAD' state. You can look around, make experimental
|
| 9 |
changes and commit them, and you can discard any commits you make in this
|
|
@@ -20,41 +40,49 @@ Or undo this operation with:
|
|
| 20 |
|
| 21 |
Turn off this advice by setting config variable advice.detachedHead to false
|
| 22 |
|
| 23 |
-
HEAD is now at
|
| 24 |
Initialized AI client with model: llama-3.1-8b-instant
|
| 25 |
Initialized AI client with model: llama-3.3-70b-versatile
|
| 26 |
-
INFO (event): PRIX Audit starting for PR #
|
| 27 |
-
id: "
|
| 28 |
[Graph] Discovered: 1 TS/JS, 0 Go, 2 Python, 0 Rust, 0 C++/Java files
|
| 29 |
[GraphCache] TS: 1/1 files need parsing
|
| 30 |
[GraphCache] Go: All 0 files served from cache
|
| 31 |
[GraphCache] Python: 2/2 files need parsing
|
| 32 |
INFO (event): Will review from the base commit: 136795cc20e35ffa9a345771e8eeaaf4bce69ae2
|
| 33 |
-
id: "
|
| 34 |
checking path: E.js => true
|
| 35 |
checking path: e.py => true
|
| 36 |
INFO (event): summarize: E.js
|
| 37 |
-
id: "
|
| 38 |
INFO (event): summarize: e.py
|
| 39 |
-
id: "
|
| 40 |
-
AI response time:
|
| 41 |
INFO (event): filename: E.js, triage: NEEDS_REVIEW
|
| 42 |
-
id: "
|
| 43 |
-
AI response time:
|
| 44 |
INFO (event): filename: e.py, triage: NEEDS_REVIEW
|
| 45 |
-
id: "
|
| 46 |
-
AI response time:
|
| 47 |
-
prixExec failed: "git grep -lE "import.*add_to_inventory|require.*add_to_inventory|add_to_inventory\." -- . ":(exclude)e.py"" in /tmp/
|
| 48 |
-
AI response time:
|
| 49 |
-
INFO (http): POST / 202 -
|
| 50 |
-
AI response time:
|
| 51 |
-
AI response time:
|
| 52 |
-
AI response time:
|
| 53 |
-
AI response time:
|
| 54 |
-
|
| 55 |
-
Attempt
|
| 56 |
-
|
| 57 |
-
AI response time:
|
| 58 |
-
Attempt 1 failed. 3 retries left.
|
| 59 |
-
|
| 60 |
-
Attempt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
===== Application Startup at 2026-04-04 11:24:31 =====
|
| 2 |
+
|
| 3 |
+
PRIX starting on 0.0.0.0:7860...
|
| 4 |
+
|
| 5 |
+
> prix-ai-auditor@1.1.0 start
|
| 6 |
+
> probot run ./lib/index.js
|
| 7 |
+
|
| 8 |
+
INFO (probot): PRIX module loading...
|
| 9 |
+
INFO (probot): PRIX Service Started
|
| 10 |
+
INFO (server): Running Probot v12.4.0 (Node.js: v20.20.2)
|
| 11 |
+
INFO (server): Listening on http://0.0.0.0:7860
|
| 12 |
+
PRIX server is healthy and ready!
|
| 13 |
+
INFO (http): GET /ping 200 - 3ms
|
| 14 |
+
INFO (http): GET /?logs=container 302 - 2ms
|
| 15 |
+
INFO (http): GET /probot 304 - 16ms
|
| 16 |
+
INFO (http): GET /primer.css 304 - 2ms
|
| 17 |
+
INFO (http): GET /robot.svg 304 - 1ms
|
| 18 |
+
INFO (http): POST / 200 - 3ms
|
| 19 |
+
INFO (http): POST / 200 - 1ms
|
| 20 |
+
INFO (http): POST / 200 - 1ms
|
| 21 |
+
INFO (probot): Received pull_request.opened for PR #37
|
| 22 |
+
Cloning Rachit-Tiwari-7/TEST-PRIX into /tmp/prix_tmp_3488828279_1775302043725...
|
| 23 |
Cloning Rachit-Tiwari-7/TEST-PRIX with depth 1...
|
| 24 |
From https://github.com/Rachit-Tiwari-7/TEST-PRIX
|
| 25 |
+
* branch 5ed12124e3697343de80c3f43bd5f9f77f64d260 -> FETCH_HEAD
|
| 26 |
+
Note: switching to '5ed12124e3697343de80c3f43bd5f9f77f64d260'.
|
| 27 |
|
| 28 |
You are in 'detached HEAD' state. You can look around, make experimental
|
| 29 |
changes and commit them, and you can discard any commits you make in this
|
|
|
|
| 40 |
|
| 41 |
Turn off this advice by setting config variable advice.detachedHead to false
|
| 42 |
|
| 43 |
+
HEAD is now at 5ed1212 ORIGIN
|
| 44 |
Initialized AI client with model: llama-3.1-8b-instant
|
| 45 |
Initialized AI client with model: llama-3.3-70b-versatile
|
| 46 |
+
INFO (event): PRIX Audit starting for PR #37
|
| 47 |
+
id: "3f84cee0-3019-11f1-9fbe-e0cb78aae281"
|
| 48 |
[Graph] Discovered: 1 TS/JS, 0 Go, 2 Python, 0 Rust, 0 C++/Java files
|
| 49 |
[GraphCache] TS: 1/1 files need parsing
|
| 50 |
[GraphCache] Go: All 0 files served from cache
|
| 51 |
[GraphCache] Python: 2/2 files need parsing
|
| 52 |
INFO (event): Will review from the base commit: 136795cc20e35ffa9a345771e8eeaaf4bce69ae2
|
| 53 |
+
id: "3f84cee0-3019-11f1-9fbe-e0cb78aae281"
|
| 54 |
checking path: E.js => true
|
| 55 |
checking path: e.py => true
|
| 56 |
INFO (event): summarize: E.js
|
| 57 |
+
id: "3f84cee0-3019-11f1-9fbe-e0cb78aae281"
|
| 58 |
INFO (event): summarize: e.py
|
| 59 |
+
id: "3f84cee0-3019-11f1-9fbe-e0cb78aae281"
|
| 60 |
+
AI response time: 300 ms
|
| 61 |
INFO (event): filename: E.js, triage: NEEDS_REVIEW
|
| 62 |
+
id: "3f84cee0-3019-11f1-9fbe-e0cb78aae281"
|
| 63 |
+
AI response time: 295 ms
|
| 64 |
INFO (event): filename: e.py, triage: NEEDS_REVIEW
|
| 65 |
+
id: "3f84cee0-3019-11f1-9fbe-e0cb78aae281"
|
| 66 |
+
AI response time: 722 ms
|
| 67 |
+
prixExec failed: "git grep -lE "import.*add_to_inventory|require.*add_to_inventory|add_to_inventory\." -- . ":(exclude)e.py"" in /tmp/prix_tmp_3488828279_1775302043725. Error: Command failed: git grep -lE "import.*add_to_inventory|require.*add_to_inventory|add_to_inventory\." -- . ":(exclude)e.py"
|
| 68 |
+
AI response time: 3248 ms
|
| 69 |
+
INFO (http): POST / 202 - 9002ms
|
| 70 |
+
AI response time: 3331 ms
|
| 71 |
+
AI response time: 3601 ms
|
| 72 |
+
AI response time: 3607 ms
|
| 73 |
+
AI response time: 3809 ms
|
| 74 |
+
AI response time: 3269 ms
|
| 75 |
+
Attempt 1 failed. 3 retries left. Error: OpenAI error 429: {"error":{"message":"Rate limit reached for model `llama-3.3-70b-versatile` in organization `org_01kgqhwjhvfarvnkqfknpyj35m` service tier `on_demand` on tokens per minute (TPM): Limit 12000, Used 9779, Requested 2326. Please try again in 525ms. Need more tokens? Upgrade to Dev Tier today at https://console.groq.com/settings/billing","type":"tokens","code":"rate_limit_exceeded"}}
|
| 76 |
+
|
| 77 |
+
AI response time: 5118 ms
|
| 78 |
+
Attempt 1 failed. 3 retries left. Error: OpenAI error 429: {"error":{"message":"Rate limit reached for model `llama-3.3-70b-versatile` in organization `org_01kgqhwjhvfarvnkqfknpyj35m` service tier `on_demand` on tokens per minute (TPM): Limit 12000, Used 11081, Requested 2183. Please try again in 6.32s. Need more tokens? Upgrade to Dev Tier today at https://console.groq.com/settings/billing","type":"tokens","code":"rate_limit_exceeded"}}
|
| 79 |
+
|
| 80 |
+
Attempt 2 failed. 2 retries left. Error: OpenAI error 429: {"error":{"message":"Rate limit reached for model `llama-3.3-70b-versatile` in organization `org_01kgqhwjhvfarvnkqfknpyj35m` service tier `on_demand` on tokens per minute (TPM): Limit 12000, Used 10673, Requested 2183. Please try again in 4.28s. Need more tokens? Upgrade to Dev Tier today at https://console.groq.com/settings/billing","type":"tokens","code":"rate_limit_exceeded"}}
|
| 81 |
+
|
| 82 |
+
Attempt 3 failed. 1 retries left. Error: OpenAI error 429: {"error":{"message":"Rate limit reached for model `llama-3.3-70b-versatile` in organization `org_01kgqhwjhvfarvnkqfknpyj35m` service tier `on_demand` on tokens per minute (TPM): Limit 12000, Used 9864, Requested 2183. Please try again in 235ms. Need more tokens? Upgrade to Dev Tier today at https://console.groq.com/settings/billing","type":"tokens","code":"rate_limit_exceeded"}}
|
| 83 |
+
|
| 84 |
+
AI response time: 18646 ms
|
| 85 |
+
AI response time: 5964 ms
|
| 86 |
+
Attempt 1 failed. 3 retries left. Error: OpenAI error 429: {"error":{"message":"Rate limit reached for model `llama-3.3-70b-versatile` in organization `org_01kgqhwjhvfarvnkqfknpyj35m` service tier `on_demand` on tokens per minute (TPM): Limit 12000, Used 11888, Requested 1528. Please try again in 7.08s. Need more tokens? Upgrade to Dev Tier today at https://console.groq.com/settings/billing","type":"tokens","code":"rate_limit_exceeded"}}
|
| 87 |
+
|
| 88 |
+
Attempt 2 failed. 2 retries left. Error: OpenAI error 429: {"error":{"message":"Rate limit reached for model `llama-3.3-70b-versatile` in organization `org_01kgqhwjhvfarvnkqfknpyj35m` service tier `on_demand` on tokens per minute (TPM): Limit 12000, Used 11480, Requested 2181. Please try again in 8.305s. Need more tokens? Upgrade to Dev Tier today at https://console.groq.com/settings/billing","type":"tokens","code":"rate_limit_exceeded"}}
|
src/bot.ts
CHANGED
|
@@ -136,7 +136,7 @@ IMPORTANT: Entire response must be in ISO code: ${this.options.language}
|
|
| 136 |
},
|
| 137 |
{
|
| 138 |
retries: this.options.retries,
|
| 139 |
-
minTimeout:
|
| 140 |
onFailedAttempt: (err: any) => {
|
| 141 |
logInfo(
|
| 142 |
`Attempt ${err.attemptNumber} failed. ${err.retriesLeft} retries left. Error: ${err.message}`
|
|
|
|
| 136 |
},
|
| 137 |
{
|
| 138 |
retries: this.options.retries,
|
| 139 |
+
minTimeout: 10000, // 10s delay to allow TPM refresh
|
| 140 |
onFailedAttempt: (err: any) => {
|
| 141 |
logInfo(
|
| 142 |
`Attempt ${err.attemptNumber} failed. ${err.retriesLeft} retries left. Error: ${err.message}`
|