Spaces:
Sleeping
Sleeping
Increase LLM rate limit delays from 5s to 10s
Browse filesPrevents 429 errors when Critic rejects and Analyzer retries.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- src/nodes/analyzer.py +2 -2
- src/nodes/critic.py +2 -2
src/nodes/analyzer.py
CHANGED
|
@@ -1465,8 +1465,8 @@ def analyzer_node(state, workflow_id=None, progress_store=None):
|
|
| 1465 |
# In revision mode, add delay before LLM call to avoid rate limits
|
| 1466 |
# (Critic just called LLM, so we need to wait)
|
| 1467 |
if is_revision:
|
| 1468 |
-
print("Waiting
|
| 1469 |
-
time.sleep(
|
| 1470 |
|
| 1471 |
start_time = time.time()
|
| 1472 |
response, provider, error, providers_failed = llm.query(prompt, temperature=0)
|
|
|
|
| 1465 |
# In revision mode, add delay before LLM call to avoid rate limits
|
| 1466 |
# (Critic just called LLM, so we need to wait)
|
| 1467 |
if is_revision:
|
| 1468 |
+
print("Waiting 10s before revision LLM call (rate limit buffer)...")
|
| 1469 |
+
time.sleep(10)
|
| 1470 |
|
| 1471 |
start_time = time.time()
|
| 1472 |
response, provider, error, providers_failed = llm.query(prompt, temperature=0)
|
src/nodes/critic.py
CHANGED
|
@@ -330,8 +330,8 @@ def critic_node(state, workflow_id=None, progress_store=None):
|
|
| 330 |
llm = get_llm_client()
|
| 331 |
|
| 332 |
# Add delay before LLM call to avoid rate limits (Analyzer just called LLM)
|
| 333 |
-
print("Waiting
|
| 334 |
-
time.sleep(
|
| 335 |
|
| 336 |
_add_activity_log(workflow_id, progress_store, "critic", "Calling LLM for quality evaluation...")
|
| 337 |
start_time = time.time()
|
|
|
|
| 330 |
llm = get_llm_client()
|
| 331 |
|
| 332 |
# Add delay before LLM call to avoid rate limits (Analyzer just called LLM)
|
| 333 |
+
print("Waiting 10s before Critic LLM call (rate limit buffer)...")
|
| 334 |
+
time.sleep(10)
|
| 335 |
|
| 336 |
_add_activity_log(workflow_id, progress_store, "critic", "Calling LLM for quality evaluation...")
|
| 337 |
start_time = time.time()
|