[change] Changelog bot: mitigate quota exhaustion and improved consistency#693
Conversation
The changelog bot kept failing with Gemini free-tier quota errors (RequestsPerDayPerProjectPerModel, 20/day) and marked the workflow as failed, while the CI failure bot stayed green because it swallows the same error. The changelog bot also had no way to switch models and could spend up to three requests per pull request. Forward GEMINI_MODEL through the action and reusable workflow so a single variable controls both bots, harden model resolution so an empty value falls back to the default, lower the generation retries from three to two, and exit cleanly on quota errors so the workflow no longer turns red on exhaustion. Also document the GEMINI_MODEL variable for both bots.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
🧰 Additional context used📓 Path-based instructions (1)**/*.{md,rst,txt}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (3)📚 Learning: 2026-06-03T00:15:34.762ZApplied to files:
📚 Learning: 2026-03-05T09:59:15.097ZApplied to files:
📚 Learning: 2026-06-03T00:15:34.762ZApplied to files:
🔇 Additional comments (23)
📝 WalkthroughWalkthroughThis PR enhances the changelog generator GitHub Action with configurable Gemini model selection and local output normalization. It adds a new optional Sequence DiagramsequenceDiagram
participant Workflow
participant Action
participant Script
participant Gemini
Workflow->>Action: inputs.gemini-model
Action->>Script: GEMINI_MODEL env var
Script->>Script: resolve_model()
Script->>Gemini: call_gemini() with selected model
Gemini->>Script: generated changelog or error
alt quota/rate-limit error
Script->>Script: emit warning
Script->>Workflow: exit(0)
else success
Script->>Script: normalize_changelog_output()
Script->>Script: validate
alt valid after normalization
Script->>Workflow: success
else still invalid
Script->>Gemini: retry (up to MAX=2)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Checklist
Reference to Existing Issue
No existing issue, it's a relatively small and trivial change.
Description of Changes
This PR hardens the changelog bot against Gemini API quota limits, adds model configurability, and ensures the GitHub Action workflow exits gracefully instead of failing when quotas are exhausted.
Context
The changelog bot was frequently failing workflows due to hitting the Gemini free-tier quota (
RequestsPerDayPerProjectPerModel, 20 requests/day). This was compounded by two issues:Unlike the CI failure bot (which swallows these errors and stays green), the changelog bot would cause the entire workflow to turn red.
Changes
GEMINI_MODELvariable through the action and reusable workflow, allowing a single variable to control both the changelog and CI failure bots.