feat: launch Gemini 3 Flash in Gemini CLI ️ (#15196)

Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
Co-authored-by: joshualitt <joshualitt@google.com>
Co-authored-by: Sehoon Shon <sshon@google.com>
Co-authored-by: Adam Weidman <65992621+adamfweidman@users.noreply.github.com>
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
Co-authored-by: Jenna Inouye <jinouye@google.com>
This commit is contained in:
Tommaso Sciortino
2025-12-17 09:43:21 -08:00
committed by GitHub
parent 18698d6929
commit bf90b59935
65 changed files with 1898 additions and 2060 deletions
+20 -16
View File
@@ -10,11 +10,13 @@ import { CodebaseInvestigatorAgent } from './codebase-investigator.js';
import { type z } from 'zod';
import { debugLogger } from '../utils/debugLogger.js';
import {
DEFAULT_GEMINI_MODEL_AUTO,
GEMINI_MODEL_ALIAS_PRO,
PREVIEW_GEMINI_MODEL,
DEFAULT_GEMINI_MODEL,
GEMINI_MODEL_ALIAS_AUTO,
PREVIEW_GEMINI_FLASH_MODEL,
isPreviewModel,
} from '../config/models.js';
import type { ModelConfigAlias } from '../services/modelConfigService.js';
import { coreEvents, CoreEvent } from '../utils/events.js';
/**
* Returns the model config alias for a given agent definition.
@@ -41,6 +43,10 @@ export class AgentRegistry {
async initialize(): Promise<void> {
this.loadBuiltInAgents();
coreEvents.on(CoreEvent.ModelChanged, () => {
this.loadBuiltInAgents();
});
if (this.config.getDebugMode()) {
debugLogger.log(
`[AgentRegistry] Initialized with ${this.agents.size} agents.`,
@@ -53,19 +59,17 @@ export class AgentRegistry {
// Only register the agent if it's enabled in the settings.
if (investigatorSettings?.enabled) {
let model =
investigatorSettings.model ??
CodebaseInvestigatorAgent.modelConfig.model;
// If the user is using the preview model for the main agent, force the sub-agent to use it too
// if it's configured to use 'pro' or 'auto'.
if (this.config.getModel() === PREVIEW_GEMINI_MODEL) {
if (
model === GEMINI_MODEL_ALIAS_PRO ||
model === DEFAULT_GEMINI_MODEL_AUTO
) {
model = PREVIEW_GEMINI_MODEL;
}
let model;
const settingsModel = investigatorSettings.model;
// Check if the user explicitly set a model in the settings.
if (settingsModel && settingsModel !== GEMINI_MODEL_ALIAS_AUTO) {
model = settingsModel;
} else {
// Use Preview Flash model if the main model is any of the preview models
// If the main model is not preview model, use default pro model.
model = isPreviewModel(this.config.getModel())
? PREVIEW_GEMINI_FLASH_MODEL
: DEFAULT_GEMINI_MODEL;
}
const agentDef = {