chore(reviewbot): expand multi-model cascade with fallback endpoints#3922
Merged
Conversation
Currently, LocalAgentConfig only configures a single default model without an explicit endpoint attached, which causes startup errors or rate-limit failures when quota runs out. To fix, import GeminiAPIEndpoint and ModelTarget, and configure a prioritized multi-model cascade across Gemini 3 and Gemini 2 so the agent automatically falls back to available quota.
Contributor
There was a problem hiding this comment.
Code Review
This pull request configures a prioritized fallback cascade of Gemini models for the reviewbot agent. The review feedback correctly identifies that several of the specified model names (such as gemini-3.5 and gemini-2.5 variants) do not exist in the Gemini API and will cause API errors, providing a code suggestion to use valid model names instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
aignas
approved these changes
Jul 12, 2026
The automated PR review bot previously consumed excessive free-tier quota and triggered on every opened PR due to multi-turn filesystem exploration and automatic event listeners. To reduce token consumption and request-per-minute limits: - Pre-hydrate prompt with git diff in python runner and lock tools to read-only - Condense SKILL.md and instruct single-pass analysis - Remove automatic PR open trigger so bot only runs on explicit /review comment - Negotiate minimal git fetch history in CI via dynamic deepening loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently,
LocalAgentConfigonly configures a single default model without an explicit endpoint attached when passingModelTargetobjects, which causes startup errors (must have an endpoint configured) or rate-limit failures when quota runs short.To fix, import
GeminiAPIEndpointandModelTarget, create an explicit endpoint (GeminiAPIEndpoint()), and configure a prioritized multi-model cascade across all major Gemini 3 and Gemini 2 models so the agent automatically falls back to whichever model has open quota and full function calling capabilities.