Skip to content

fix(cli): add gemini-3.5-flash to model selector for all users (#28483) - #28485

Closed
kunalrawat425 wants to merge 4 commits into
google-gemini:mainfrom
kunalrawat425:fix/28483-model-selector-gemini-3-5-flash
Closed

fix(cli): add gemini-3.5-flash to model selector for all users (#28483)#28485
kunalrawat425 wants to merge 4 commits into
google-gemini:mainfrom
kunalrawat425:fix/28483-model-selector-gemini-3-5-flash

Conversation

@kunalrawat425

@kunalrawat425 kunalrawat425 commented Jul 22, 2026

Copy link
Copy Markdown

Problem

Fixes #28483 — users on v0.51.0 cannot select gemini-3.5-flash or gemini-3.6-flash from the model selector.

Root cause: buildAvailableModels and ModelDialog (legacy paths) only surface DEFAULT_GEMINI_FLASH_MODEL which stays as gemini-2.5-flash until the backend GEMINI_3_5_FLASH_GA_LAUNCHED experiment flag fires. Users not yet enrolled in the rollout cannot see gemini-3.5-flash as a selectable option, and gemini-3.6-flash was not defined in the codebase at all.

Fix

  1. Add DEFAULT_GEMINI_3_5_FLASH_MODEL (gemini-3.5-flash) to the legacy-path manualOptions list in both acpUtils.ts and ModelDialog.tsx, guarded by a deduplication check so it does not appear twice once the GA flag promotes it to DEFAULT_GEMINI_FLASH_MODEL.

  2. Add gemini-3.6-flash and gemini-3.5-flash-lite as new model constants and surface them in the legacy model selector in both acpUtils.ts and ModelDialog.tsx, defaultModelConfigs.ts, VALID_GEMINI_MODELS, and documentation.

  3. Guard resolveModel() to prevent overriding an explicitly-set gemini-3.6-flash back to the default flash model.

Changes

File Change
packages/core/src/config/models.ts Add DEFAULT_GEMINI_3_5_FLASH_MODEL, DEFAULT_GEMINI_3_6_FLASH_MODEL, DEFAULT_GEMINI_3_5_FLASH_LITE_MODEL constants; add to VALID_GEMINI_MODELS; guard resolveModel
packages/core/src/config/defaultModelConfigs.ts Add model configs for gemini-3.5-flash, gemini-3.6-flash, gemini-3.5-flash-lite
packages/core/index.ts Export new model constants from public package index
packages/cli/src/acp/acpUtils.ts Add new models to manualOptions with dedup guard for gemini-3.5-flash
packages/cli/src/ui/components/ModelDialog.tsx Add new models to legacy selector with dedup guard for gemini-3.5-flash
packages/cli/src/acp/acpUtils.test.ts New: 3 tests covering selector contents
packages/core/src/config/models.test.ts Tests for resolveModel guard
schemas/settings.schema.json Add new model IDs to allowed values
docs/reference/configuration.md Document new model options

Test plan

  • npx vitest run packages/cli/src/acp/acpUtils.test.ts packages/core/src/config/models.test.ts — 98 tests pass
  • npm run build — clean build, no type errors introduced by this PR
  • Pre-commit hooks pass (ESLint + Prettier)
  • Manual: run gemini/model → verify gemini-3.5-flash, gemini-3.6-flash, and gemini-3.5-flash-lite appear in the list

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 a visibility issue for the gemini-3.5-flash model in the CLI, ensuring it is selectable for all users regardless of experiment rollout status. Additionally, it enhances the CLI's robustness by adding an auto-compression feature for context overflows and improving the usability of error messages by sanitizing embedded URLs.

Highlights

  • Model Selector Fix: Added gemini-3.5-flash as an explicit option in the legacy model selector to ensure availability for all users, including a deduplication guard.
  • Auto-Compression Feature: Introduced autoCompressOnOverflow setting to automatically compress chat history when context limits are reached, improving the user experience during long sessions.
  • URL Sanitization: Implemented sanitizeUrlsInMessage to strip trailing punctuation from URLs in error messages, ensuring links remain clickable.
  • Code Cleanup: Refactored vscode-ide-companion extension activation to remove unnecessary wrapping parentheses in subscription pushes.
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 the 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 counterproductive. 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.

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.

@github-actions github-actions Bot added the size/l A large sized PR label Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

📊 PR Size: size/L

  • Lines changed: 355
  • Additions: +351
  • Deletions: -4
  • Files changed: 9

@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 introduces several enhancements and bug fixes across the repository. Key changes include adding an autoCompressOnOverflow setting to automatically compress chat history when approaching context limits, ensuring gemini-3.5-flash is always available as a selectable model, sanitizing trailing punctuation from URLs in error messages, and fixing skill description parsing for single-line or colon-containing descriptions. Feedback on these changes highlights that the background auto-compression task in useGeminiStream.ts lacks proper cancellation handling and should accept and propagate an AbortSignal to prevent dangling operations.

Comment thread packages/cli/src/ui/hooks/useGeminiStream.ts Outdated
@kunalrawat425
kunalrawat425 force-pushed the fix/28483-model-selector-gemini-3-5-flash branch from 2015e83 to f932f10 Compare July 22, 2026 15:57
@github-actions github-actions Bot added the size/m A medium sized PR label Jul 22, 2026
@kunalrawat425

Copy link
Copy Markdown
Author

I have split the other unrelated fixes into separate focused pull requests:

…#28483)

gemini-3.5-flash was absent from the manual model picker for users not
enrolled in the GEMINI_3_5_FLASH_GA_LAUNCHED experiment, because
buildAvailableModels only listed DEFAULT_GEMINI_FLASH_MODEL (which
remains gemini-2.5-flash until the flag fires).

Fix: always include DEFAULT_GEMINI_3_5_FLASH_MODEL as an explicit
option in the legacy-path manualOptions list, with a deduplication
guard so it does not appear twice when the flag has already promoted
it to the default flash model.

Also export DEFAULT_GEMINI_3_5_FLASH_MODEL from the core package
index so it can be consumed by CLI code without reaching into
internal package paths.
…del selector

This adds constants, aliases, definitions, and resolutions for gemini-3.6-flash and gemini-3.5-flash-lite, surfacing them correctly in the manual picker and model dialog, and regenerates settings schema and documentation.
When the GEMINI_3_5_FLASH_GA_LAUNCHED experiment flag fires,
DEFAULT_GEMINI_FLASH_MODEL is mutated to 'gemini-3.5-flash', which
equals DEFAULT_GEMINI_3_5_FLASH_MODEL. Without the guard the legacy
options list in ModelDialog showed the same model entry twice.

Apply the same conditional-spread dedup guard used in acpUtils.ts.
@kunalrawat425
kunalrawat425 force-pushed the fix/28483-model-selector-gemini-3-5-flash branch from bb09dcf to be4b3c6 Compare July 23, 2026 04:44
@kunalrawat425

Copy link
Copy Markdown
Author

Good question — the short answer is no, this PR only affects the manual model picker, not the auto router.

The auto mode resolves to concrete models via resolveModel() in packages/core/src/config/models.ts, controlled entirely by backend experiment flags (useGemini3_1, useGemini3_5Flash, hasAccessToPreview) — not by what appears in the picker list. Specifically:

  • auto → Pro tier: gemini-3.1-pro-preview (if useGemini3_1) else gemini-3-flash-preview / gemini-2.5-pro
  • auto → Flash tier: gemini-3.5-flash (if useGemini3_5Flash flag fires) else DEFAULT_GEMINI_FLASH_MODEL (gemini-2.5-flash)

gemini-3.6-flash and gemini-3.5-flash-lite are not in the auto routing switch — auto will not route to them unless a future backend change adds them there.

What this PR does is narrower: it adds gemini-3.5-flash, gemini-3.6-flash, and gemini-3.5-flash-lite as explicitly selectable options in the manual picker (/model → Manual), so users can explicitly choose them regardless of which experiment flags are active for them.

If the intent is also for auto to consider gemini-3.6-flash, that would require a separate change to resolveModel() and the auto model routing logic.

@kunalrawat425

Copy link
Copy Markdown
Author

Flagging for maintainer attention — this PR is ready for review:

  • ✅ All automated checks pass (check-changes, size-label, cla/google)
  • ✅ Tests added (98 pass)
  • ✅ Docs updated (docs/reference/configuration.md)
  • ✅ Confirmed working locally — gemini-3.6-flash selectable and responds correctly
  • ✅ Scope is tight — only touches the manual model picker, no impact on auto routing

The scope question from @hi-fox has been answered. Happy to make any changes the team needs.

@kchugh-s

Copy link
Copy Markdown

Is there a way to see where the PR ranks in maintainers' triage? Or are they chosen at random

@gemini-cli

gemini-cli Bot commented Jul 30, 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 only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'.

This PR will be closed in 7 days if it remains without that designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding.

@gemini-cli

gemini-cli Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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.

@kchugh-s

kchugh-s commented Aug 7, 2026

Copy link
Copy Markdown

This type of triage is abysmal. Someone performed free labor to improve a company's product and it's been ignored

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

Labels

area/core Issues related to User Interface, OS Support, Core Functionality priority/p2 Important but can be addressed in a future release. size/l A large sized PR size/m A medium sized PR status/pr-nudge-sent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gemini Flash 3.6 is missing from the model selector

2 participants