mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-02 07:54:48 -07:00
fix(core): ensure correct flash model steering in plan mode implementation phase (#21871)
This commit is contained in:
@@ -2529,6 +2529,26 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
return this.getGemini31LaunchedSync();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the custom tool model should be used.
|
||||
*/
|
||||
async getUseCustomToolModel(): Promise<boolean> {
|
||||
const useGemini3_1 = await this.getGemini31Launched();
|
||||
const authType = this.contentGeneratorConfig?.authType;
|
||||
return useGemini3_1 && authType === AuthType.USE_GEMINI;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the custom tool model should be used.
|
||||
*
|
||||
* Note: This method should only be called after startup, once experiments have been loaded.
|
||||
*/
|
||||
getUseCustomToolModelSync(): boolean {
|
||||
const useGemini3_1 = this.getGemini31LaunchedSync();
|
||||
const authType = this.contentGeneratorConfig?.authType;
|
||||
return useGemini3_1 && authType === AuthType.USE_GEMINI;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether Gemini 3.1 has been launched.
|
||||
*
|
||||
|
||||
@@ -168,7 +168,8 @@ export function isPreviewModel(model: string): boolean {
|
||||
model === PREVIEW_GEMINI_3_1_MODEL ||
|
||||
model === PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL ||
|
||||
model === PREVIEW_GEMINI_FLASH_MODEL ||
|
||||
model === PREVIEW_GEMINI_MODEL_AUTO
|
||||
model === PREVIEW_GEMINI_MODEL_AUTO ||
|
||||
model === GEMINI_MODEL_ALIAS_AUTO
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user