Skip to content

Add Gemini 3 and 3.1 OpenRouter model entries#923

Merged
PeterDaveHello merged 1 commit intomasterfrom
feat/add-gemini-3-openrouter-models
Feb 21, 2026
Merged

Add Gemini 3 and 3.1 OpenRouter model entries#923
PeterDaveHello merged 1 commit intomasterfrom
feat/add-gemini-3-openrouter-models

Conversation

@PeterDaveHello
Copy link
Copy Markdown
Member

@PeterDaveHello PeterDaveHello commented Feb 20, 2026

User description

Add Gemini 3 and 3.1 OpenRouter model mappings so users can choose Gemini 3/3.1 models from model presets.
Do not enable them by default in activeApiModes to preserve existing starting model behavior.


PR Type

Enhancement


Description

  • Add three new Gemini 3/3.1 OpenRouter model entries

  • Include Gemini 3 Pro, Gemini 3 Flash, and Gemini 3.1 Pro variants

  • Enable users to select Gemini models from model presets

  • Preserve existing default behavior without enabling by default


Diagram Walkthrough

flowchart LR
  A["openRouterApiModelKeys"] -->|"add three entries"| B["Gemini 3 Pro<br/>Gemini 3 Flash<br/>Gemini 3.1 Pro"]
  C["Models config"] -->|"add model definitions"| D["OpenRouter Gemini<br/>model mappings"]
  B --> D
Loading

File Walkthrough

Relevant files
Enhancement
index.mjs
Add Gemini 3/3.1 OpenRouter model configurations                 

src/config/index.mjs

  • Add three new Gemini model keys to openRouterApiModelKeys array
  • Define three new model entries in Models object with OpenRouter API
    values and descriptions
  • Models include Gemini 3 Pro, Gemini 3 Flash, and Gemini 3.1 Pro
    variants
  • Maintain existing model ordering and configuration structure
+15/-0   

Summary by CodeRabbit

  • New Features
    • Added three new OpenRouter Gemini 3 model options: Gemini 3 Pro, Gemini 3 Flash, and Gemini 3.1 Pro for enhanced AI interactions.

Add Gemini 3 and 3.1 OpenRouter model mappings so users can choose
Gemini 3/3.1 models from model presets.
Do not enable them by default in activeApiModes to preserve existing
starting model behavior.
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @PeterDaveHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the application's model selection capabilities by integrating Google's Gemini 3 and 3.1 series through the OpenRouter platform. It enables users to choose these advanced models from available presets, providing more diverse options without impacting the existing default API mode configurations.

Highlights

  • New Model Integration: Added new Gemini 3 and 3.1 model identifiers to the openRouterApiModelKeys list, making them available for selection.
  • Model Configuration: Configured detailed entries for Gemini 3 Pro, Gemini 3 Flash, and Gemini 3.1 Pro models within the Models object, including their OpenRouter values and descriptive names.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/config/index.mjs
    • Added openRouter_google_gemini_3_pro, openRouter_google_gemini_3_flash, and openRouter_google_gemini_3_1_pro to the openRouterApiModelKeys array.
    • Defined new model configurations for Gemini 3 Pro, Gemini 3 Flash, and Gemini 3.1 Pro within the Models object, mapping them to their respective OpenRouter API values and descriptions.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

This pull request adds three new OpenRouter Gemini 3 model variants to the application's configuration. The changes include adding the model identifiers to the API model keys array and creating corresponding mappings with their API paths and display labels.

Changes

Cohort / File(s) Summary
OpenRouter Gemini Model Configuration
src/config/index.mjs
Added three new Gemini 3 variants (Pro, Flash, 3.1 Pro) to openRouterApiModelKeys and Models mapping with their respective API preview paths and descriptive labels.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

Review effort 1/5

Poem

🐰 Three Geminis hop into sight,
Pro and Flash, shining bright!
Preview paths all set with care,
New models floating in the air! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding Gemini 3 and 3.1 OpenRouter model entries to the configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-gemini-3-openrouter-models

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-code-review
Copy link
Copy Markdown
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Clarify preview status

Append "Preview" to the desc field for the new Gemini models to indicate they
are preview releases.

src/config/index.mjs [393-404]

-desc: 'OpenRouter (Gemini 3 Pro)',
-desc: 'OpenRouter (Gemini 3 Flash)',
-desc: 'OpenRouter (Gemini 3.1 Pro)',
+desc: 'OpenRouter (Gemini 3 Pro Preview)',
+desc: 'OpenRouter (Gemini 3 Flash Preview)',
+desc: 'OpenRouter (Gemini 3.1 Pro Preview)',

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 6

__

Why: This is a good suggestion for improving user clarity, as adding "Preview" to the description desc makes it consistent with the model value which includes -preview.

Low
Reorder model keys for grouping

Reorder the openRouterApiModelKeys array to group all Gemini model keys together
for better organization.

src/config/index.mjs [106-111]

 export const openRouterApiModelKeys = [
+  'openRouter_anthropic_claude_sonnet4',
+  'openRouter_google_gemini_2_5_pro',
   'openRouter_google_gemini_3_pro',
   'openRouter_google_gemini_3_flash',
   'openRouter_google_gemini_3_1_pro',
-  'openRouter_anthropic_claude_sonnet4',
  • Apply / Chat
Suggestion importance[1-10]: 4

__

Why: The suggestion correctly points out an inconsistent ordering of model keys and proposes a change that improves code organization and readability by grouping related models.

Low
  • More

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Code Review

The pull request adds model entries for Gemini 3 and 3.1 on OpenRouter. While this follows the repository's pattern of including speculative model versions, these specific models do not currently exist on the OpenRouter platform or in Google's official lineup. Using these entries will result in failed API requests (404 errors). Additionally, the placement of these models at the top of the OpenRouter selection list may push functional models out of immediate view.

Comment thread src/config/index.mjs
Comment thread src/config/index.mjs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds OpenRouter model mappings for three new Gemini models (3 Pro, 3 Flash, and 3.1 Pro) to enable users to select these models from the model presets dropdown. The changes maintain backward compatibility by not adding these models to the default active list.

Changes:

  • Added three new Gemini model keys to the openRouterApiModelKeys array
  • Added corresponding model configuration entries in the Models object with OpenRouter API values and descriptions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/config/index.mjs (1)

107-109: Consider grouping new Gemini 3 entries with the existing Gemini 2.5 entries for consistency.

In openRouterApiModelKeys, the three new keys are prepended before all Claude entries (line 110+), while openRouter_google_gemini_2_5_pro and openRouter_google_gemini_2_5_flash sit after the Claude block (lines 116–117). This splits the Google/Gemini entries across the array, while the corresponding Models object entries (lines 393–404) are correctly grouped with the other Gemini models.

♻️ Suggested reordering to keep all Gemini keys adjacent
 export const openRouterApiModelKeys = [
-  'openRouter_google_gemini_3_pro',
-  'openRouter_google_gemini_3_flash',
-  'openRouter_google_gemini_3_1_pro',
   'openRouter_anthropic_claude_sonnet4',
   'openRouter_anthropic_claude_sonnet4_5',
   'openRouter_anthropic_claude_opus4_5',
   'openRouter_anthropic_claude_opus4_6',
   'openRouter_anthropic_claude_haiku4_5',
   'openRouter_anthropic_claude_3_7_sonnet',
+  'openRouter_google_gemini_3_pro',
+  'openRouter_google_gemini_3_flash',
+  'openRouter_google_gemini_3_1_pro',
   'openRouter_google_gemini_2_5_pro',
   'openRouter_google_gemini_2_5_flash',
   'openRouter_openai_o3',
   'openRouter_openai_gpt_4_1_mini',
 ]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/config/index.mjs` around lines 107 - 109, The openRouterApiModelKeys
array currently splits Google/Gemini entries by prepending
'openRouter_google_gemini_3_pro', 'openRouter_google_gemini_3_flash', and
'openRouter_google_gemini_3_1_pro' before the Claude entries; move these three
keys so they sit adjacent to the existing Gemini entries (e.g., next to
'openRouter_google_gemini_2_5_pro' and 'openRouter_google_gemini_2_5_flash') to
keep all Gemini keys contiguous and consistent with the Models object grouping.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/config/index.mjs`:
- Around line 107-109: The openRouterApiModelKeys array currently splits
Google/Gemini entries by prepending 'openRouter_google_gemini_3_pro',
'openRouter_google_gemini_3_flash', and 'openRouter_google_gemini_3_1_pro'
before the Claude entries; move these three keys so they sit adjacent to the
existing Gemini entries (e.g., next to 'openRouter_google_gemini_2_5_pro' and
'openRouter_google_gemini_2_5_flash') to keep all Gemini keys contiguous and
consistent with the Models object grouping.

@PeterDaveHello PeterDaveHello merged commit 9746218 into master Feb 21, 2026
6 checks passed
@PeterDaveHello PeterDaveHello deleted the feat/add-gemini-3-openrouter-models branch February 21, 2026 15:59
@Pakniat66
Copy link
Copy Markdown

Perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants