Skip to content

fix: enable Gemini 3.1 Pro for UserTierId.STANDARD subscribers - #20206

Closed
sun-9545sunoj wants to merge 5 commits into
google-gemini:mainfrom
sun-9545sunoj:fix/gemini-3-1-pro-access-for-ai-pro-users
Closed

fix: enable Gemini 3.1 Pro for UserTierId.STANDARD subscribers#20206
sun-9545sunoj wants to merge 5 commits into
google-gemini:mainfrom
sun-9545sunoj:fix/gemini-3-1-pro-access-for-ai-pro-users

Conversation

@sun-9545sunoj

Copy link
Copy Markdown

Description

This PR addresses the issue where Gemini 3.1 Pro was unavailable or not selectable for Google AI Pro subscribers (Standard Tier).

I have updated the getGemini31LaunchedSync() logic to verify the userTier from the Code Assist server. If the tier is UserTierId.STANDARD, the model is now correctly enabled.

Changes

  • Logic: Updated config.ts to include a check for UserTierId.STANDARD.
  • Imports: Added UserTierId to runtime imports in config.ts.
  • Tests: Added a new describe block in config.test.ts covering all activation paths (AuthType, UserTier, and Experiment Flags).
  • Stability: Refactored two existing tests that were using vi.mocked() incorrectly on non-mocked methods.

Verification

  • Unit Tests: 166/166 passed (0 failed).
  • Manual Check: Verified that UserTierId.STANDARD correctly returns true for Gemini 3.1 access.

Fixes #20128

@sun-9545sunoj
sun-9545sunoj requested a review from a team as a code owner February 24, 2026 18:49
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @sun-9545sunoj, 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 addresses an issue where Google AI Pro subscribers (Standard Tier) were unable to access Gemini 3.1 Pro. The changes enhance the feature flag logic to correctly identify and enable Gemini 3.1 Pro for users with a UserTierId.STANDARD. This ensures that paid subscribers receive the expected functionality, supported by new, thorough unit tests covering various access conditions.

Highlights

  • Gemini 3.1 Pro Access: Enabled Gemini 3.1 Pro for users with UserTierId.STANDARD by updating the getGemini31LaunchedSync() logic to verify the user's tier from the Code Assist server.
  • Configuration Logic: Modified config.ts to include an explicit check for UserTierId.STANDARD when determining Gemini 3.1 Pro availability.
  • Imports: Updated config.ts to change UserTierId from a type-only import to a regular import, making it available at runtime for the new logic.
  • Unit Tests: Added a new test suite in config.test.ts to comprehensively cover all activation paths for getGemini31LaunchedSync, including AuthType, UserTier, and Experiment Flags.
  • Test Refactoring: Refactored two existing tests in config.test.ts that were incorrectly using vi.mocked() on non-mocked methods, improving test stability.
Changelog
  • packages/core/src/config/config.test.ts
    • Added a new describe block for getGemini31LaunchedSync to test various activation conditions.
    • Included tests for AuthType.USE_GEMINI, UserTierId.STANDARD, and ExperimentFlags.GEMINI_3_1_PRO_LAUNCHED.
    • Added a negative test case to ensure getGemini31LaunchedSync returns false under specific conditions.
  • packages/core/src/config/config.ts
    • Modified the getGemini31LaunchedSync method to check for UserTierId.STANDARD from the codeAssistServer.
    • Changed the import of UserTierId from a type-only import to a regular import to allow runtime access.
Activity
  • The pull request was created by sun-9545sunoj to address issue Gemini 3.1 pro model not available #20128.
  • Unit tests were verified with 166/166 passing, indicating no regressions.
  • Manual verification confirmed that UserTierId.STANDARD correctly enables Gemini 3.1 access.
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.

@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 correctly enables Gemini 3.1 Pro for STANDARD tier users by updating the getGemini31LaunchedSync logic. The accompanying tests are a great addition and cover the new logic paths. However, I've identified a minor issue in the test implementation where a spy is used ineffectively, making the tests brittle. I've provided a suggestion to improve the test's robustness.

Comment thread packages/core/src/config/config.test.ts Outdated
@samveen

samveen commented Feb 27, 2026

Copy link
Copy Markdown

what's keeping this pending? This is a big blocker for paid users of gemini.

@samveen

samveen commented Mar 2, 2026

Copy link
Copy Markdown

Neve mind. Duplicate of Fix #19676

@gemini-cli

gemini-cli Bot commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Hi there! Thank you for your interest in contributing to Gemini CLI.

To ensure we maintain high code quality and focus on our prioritized roadmap, we have updated our contribution policy (see Discussion #17383).

We only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. All other community pull requests are subject to closure after 14 days if they do not align with our current focus areas. For this reason, we strongly recommend that contributors only submit pull requests against issues explicitly labeled as 'help-wanted'.

This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding and for being part of our community!

@gemini-cli gemini-cli Bot closed this Mar 15, 2026
@sripasg sripasg added the size/m A medium sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m A medium sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gemini 3.1 pro model not available

3 participants