From 50005f74fcc860206adc64ca9ac409a414fc40e2 Mon Sep 17 00:00:00 2001 From: Vic <125237471+vicsanity623@users.noreply.github.com> Date: Mon, 23 Mar 2026 09:30:10 -0700 Subject: [PATCH] Update models.py --- src/pyob/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pyob/models.py b/src/pyob/models.py index 45c71da..713658e 100644 --- a/src/pyob/models.py +++ b/src/pyob/models.py @@ -341,7 +341,7 @@ def get_valid_llm_response_engine( # C. Generic Error Handling / Fail-Safe Sleep if not available_keys: # If everything is exhausted, take a long nap - wait = 120 + wait = 300 logger.warning( f"All API resources exhausted. Sleeping {wait}s for refill..." ) @@ -360,7 +360,7 @@ def get_valid_llm_response_engine( if validator(response_text): if is_cloud: time.sleep( - 5 + 10 ) # Slow down slightly in cloud to prevent 429 machine-gunning return response_text else: @@ -380,7 +380,7 @@ def get_valid_llm_response_engine( return clean_text # If still invalid, back off and retry - wait = 120 if is_cloud else 10 + wait = 300 if is_cloud else 10 logger.warning(f"AI response failed validation. Backing off {wait}s...") time.sleep(wait) attempts += 1