Skip to content

feat: add Gemini 3.1 stable and 3.5 model identifiers to supported model registry#2432

Merged
naorpeled merged 2 commits into
mainfrom
copilot/add-support-for-latest-gemini-models
Jun 6, 2026
Merged

feat: add Gemini 3.1 stable and 3.5 model identifiers to supported model registry#2432
naorpeled merged 2 commits into
mainfrom
copilot/add-support-for-latest-gemini-models

Conversation

Copilot AI commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

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)

    • Added Gemini entries to MAX_TOKENS (1,048,576 tokens) for:
      • gemini/gemini-3.1-flash
      • gemini/gemini-3.1-pro
      • gemini/gemini-3.5-flash
      • gemini/gemini-3.5-pro
      • vertex_ai/gemini-3.1-flash
      • vertex_ai/gemini-3.1-pro
      • vertex_ai/gemini-3.5-flash
      • vertex_ai/gemini-3.5-pro
  • Coverage extension (tests/unittest/test_get_max_tokens.py)

    • Expanded Gemini parameterized max-token test cases to include the new 3.1 stable and 3.5 IDs.
    • Renamed the Gemini test method to reflect broadened scope.
# New examples now recognized by MAX_TOKENS:
"gemini/gemini-3.5-pro": 1048576
"vertex_ai/gemini-3.1-flash": 1048576

Copilot AI linked an issue Jun 6, 2026 that may be closed by this pull request
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
Copilot AI requested a review from naorpeled June 6, 2026 15:54
@naorpeled naorpeled marked this pull request as ready for review June 6, 2026 16:12
@naorpeled naorpeled changed the title Add Gemini 3.1 stable and 3.5 model identifiers to supported model registry feat: add Gemini 3.1 stable and 3.5 model identifiers to supported model registry Jun 6, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Add Gemini 3.1 stable and 3.5 model support to registry

✨ Enhancement

Grey Divider

Walkthroughs

Description
• 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
Diagram
flowchart 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"]

Loading

Grey Divider

File Changes

1. pr_agent/algo/__init__.py ⚙️ Configuration changes +8/-0

Register Gemini 3.1 stable and 3.5 models

• Added 4 new Gemini 3.1 stable model identifiers with 1,048,576 token limit
• Added 4 new Gemini 3.5 model identifiers with 1,048,576 token limit
• Entries include both gemini/ and vertex_ai/ prefixes
• Models: gemini-3.1-flash, gemini-3.1-pro, gemini-3.5-flash, gemini-3.5-pro

pr_agent/algo/init.py


2. tests/unittest/test_get_max_tokens.py 🧪 Tests +9/-1

Expand Gemini model test coverage

• Added 8 new parameterized test cases for Gemini 3.1 stable and 3.5 models
• Covers both AI Studio and Vertex AI model prefixes
• Renamed test method from test_gemini_3_and_3_1_pro_preview to
 test_gemini_3_3_1_and_3_5_models_max_tokens
• Expanded test scope to reflect broader Gemini model coverage

tests/unittest/test_get_max_tokens.py


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@naorpeled naorpeled merged commit ccf0fde into main Jun 6, 2026
6 checks passed
@naorpeled naorpeled deleted the copilot/add-support-for-latest-gemini-models branch June 6, 2026 16:25
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.

Add support for latest Gemini models

2 participants