Skip to content

chore(reviewbot): expand multi-model cascade with fallback endpoints#3922

Merged
rickeylev merged 4 commits into
bazel-contrib:mainfrom
rickeylev:expand-reviewbot-models
Jul 12, 2026
Merged

chore(reviewbot): expand multi-model cascade with fallback endpoints#3922
rickeylev merged 4 commits into
bazel-contrib:mainfrom
rickeylev:expand-reviewbot-models

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Currently, LocalAgentConfig only configures a single default model without an explicit endpoint attached when passing ModelTarget objects, which causes startup errors (must have an endpoint configured) or rate-limit failures when quota runs short.

To fix, import GeminiAPIEndpoint and ModelTarget, 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.

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.
@rickeylev rickeylev requested a review from aignas as a code owner July 11, 2026 20:11

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tools/private/reviewbot/antigravity_review.py
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
@rickeylev rickeylev merged commit 68d0878 into bazel-contrib:main Jul 12, 2026
4 of 6 checks passed
@rickeylev rickeylev deleted the expand-reviewbot-models branch July 12, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants