File tree Expand file tree Collapse file tree
src/agents/plugins/gemini Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,12 +131,19 @@ export const GeminiPluginMetadata: AgentMetadata = {
131131 // Uses BaseAgentAdapter methods for cross-platform file operations
132132 lifecycle : {
133133 enrichArgs : ( args , config ) => {
134- // Gemini CLI uses -m flag for model selection
134+ // Subcommands that do not accept global -m/--model (e.g. extensions install)
135+ const noModelSubcommands = [ 'extensions' , 'health' ] ;
136+ const firstIsNoModelSubcommand = args [ 0 ] && noModelSubcommands . includes ( args [ 0 ] ) ;
137+
135138 const hasModelArg = args . some ( ( arg , idx ) =>
136139 ( arg === '-m' || arg === '--model' ) && idx < args . length - 1
137140 ) ;
138141
139- if ( ! hasModelArg && config . model ) {
142+ if (
143+ ! firstIsNoModelSubcommand &&
144+ ! hasModelArg &&
145+ config . model
146+ ) {
140147 return [ '-m' , config . model , ...args ] ;
141148 }
142149
You can’t perform that action at this time.
0 commit comments