feat(devgen/providers): bump default Gemini model to gemini-2.5-flash and add retry handling for quota errors

The update changes the default model, refactors imports, and implements robust retry logic with exponential back‑off and clearer error messages. This improves resilience and clarifies usage.

New Features
- Exponential back‑off retry on 429/quota exhausted responses.
- Configurable max_retries and retry_delay parameters.

Enhancements
- Default model set to gemini-2.5-flash.
- Improved error output with actionable troubleshooting steps.
This commit is contained in:
sankalp committed 2026-01-30 22:36:31 +05:45
1 parent 06f25af35f
commit 9554f7af2a
5 files changed
+141 -267

No files matched your search

+6 -1
View File
@@ -466,10 +466,15 @@ class CommitEngine:
groups = self.group_files(files)
cache = self.load_cache()
for group, group_files in groups.items():
for i, (group, group_files) in enumerate(groups.items()):
try:
if not self.process_group(group, group_files, cache):
failed.append(group)
# Add a small delay between groups to respect RPM limits if not at the last group
if len(groups) > 1 and i < len(groups) - 1:
import time
time.sleep(15) # Conservative 15s delay to stay within 4 RPM (Free Tier)
except KeyboardInterrupt:
self.logger.warning("\nOperation interrupted by user.")
raise