feat: add Gemini 3.1 stable and 3.5 model identifiers to supported model registry#2432
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add support for latest Gemini models
Add Gemini 3.1 stable and 3.5 model identifiers to supported model registry
Jun 6, 2026
naorpeled
approved these changes
Jun 6, 2026
Contributor
Review Summary by QodoAdd Gemini 3.1 stable and 3.5 model support to registry
WalkthroughsDescription• Add Gemini 3.1 stable and 3.5 model identifiers to token registry • Support both AI Studio and Vertex AI prefixes for new models • Expand test coverage for latest Gemini model variants Diagramflowchart LR
A["New Gemini Models<br/>3.1 stable & 3.5"] -->|"Add to MAX_TOKENS"| B["Model Registry<br/>pr_agent/algo/__init__.py"]
B -->|"8 new entries"| C["AI Studio & Vertex AI<br/>Prefixes"]
A -->|"Expand test cases"| D["Test Coverage<br/>test_get_max_tokens.py"]
D -->|"Rename & parameterize"| E["Updated Test Method"]
File Changes1. pr_agent/algo/__init__.py
|
Contributor
naorpeled
approved these changes
Jun 6, 2026
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.
Gemini support was lagging behind currently available model IDs, which caused newer Gemini variants to be treated as unknown in token-limit resolution paths. This update adds current Gemini 3.1 stable and 3.5 identifiers for both AI Studio and Vertex AI prefixes.
Model registry updates (
pr_agent/algo/__init__.py)MAX_TOKENS(1,048,576 tokens) for:gemini/gemini-3.1-flashgemini/gemini-3.1-progemini/gemini-3.5-flashgemini/gemini-3.5-provertex_ai/gemini-3.1-flashvertex_ai/gemini-3.1-provertex_ai/gemini-3.5-flashvertex_ai/gemini-3.5-proCoverage extension (
tests/unittest/test_get_max_tokens.py)