@@ -101,8 +101,19 @@ async function runExperimentCommand(configInput: string, options: { dry?: boolea
101101 console . log ( chalk . green ( ` - ${ name } ` ) ) ;
102102 }
103103
104- console . log ( chalk . blue ( `\nRunning ${ evalNames . length } eval(s) x ${ config . runs } run(s) = ${ evalNames . length * config . runs } total runs` ) ) ;
105- console . log ( chalk . blue ( `Agent: ${ config . agent } , Model: ${ config . model } , Timeout: ${ config . timeout } s, Early Exit: ${ config . earlyExit } ` ) ) ;
104+ const models = Array . isArray ( config . model ) ? config . model : [ config . model ] ;
105+
106+ // Show info for all models
107+ const totalRunsPerModel = evalNames . length * config . runs ;
108+ const totalRuns = totalRunsPerModel * models . length ;
109+
110+ if ( models . length > 1 ) {
111+ console . log ( chalk . blue ( `\nRunning ${ evalNames . length } eval(s) x ${ config . runs } run(s) x ${ models . length } model(s) = ${ totalRuns } total runs` ) ) ;
112+ console . log ( chalk . blue ( `Agent: ${ config . agent } , Models: ${ models . join ( ', ' ) } , Timeout: ${ config . timeout } s, Early Exit: ${ config . earlyExit } ` ) ) ;
113+ } else {
114+ console . log ( chalk . blue ( `\nRunning ${ evalNames . length } eval(s) x ${ config . runs } run(s) = ${ totalRuns } total runs` ) ) ;
115+ console . log ( chalk . blue ( `Agent: ${ config . agent } , Model: ${ models [ 0 ] } , Timeout: ${ config . timeout } s, Early Exit: ${ config . earlyExit } ` ) ) ;
116+ }
106117
107118 // Show which sandbox backend will be used
108119 const sandboxInfo = getSandboxBackendInfo ( { backend : config . sandbox } ) ;
@@ -127,23 +138,44 @@ async function runExperimentCommand(configInput: string, options: { dry?: boolea
127138 const selectedFixtures = fixtures . filter ( ( f ) => evalNames . includes ( f . name ) ) ;
128139
129140 // Get experiment name from config file
130- const experimentName = basename ( configPath , '.ts' ) . replace ( / \. j s $ / , '' ) ;
141+ const baseExperimentName = basename ( configPath , '.ts' ) . replace ( / \. j s $ / , '' ) ;
131142 const resultsDir = resolve ( process . cwd ( ) , 'results' ) ;
132143
133144 console . log ( chalk . blue ( '\nStarting experiment...' ) ) ;
134145
135- // Run the experiment
136- const results = await runExperiment ( {
137- config,
138- fixtures : selectedFixtures ,
139- apiKey,
140- resultsDir,
141- experimentName,
142- onProgress : ( msg ) => console . log ( msg ) ,
143- } ) ;
146+ // Run experiments for each model
147+ let allPassed = true ;
148+ for ( const model of models ) {
149+ // Create a config for this specific model
150+ const modelConfig = { ...config , model } ;
151+
152+ // Include model in experiment name when multiple models are specified
153+ const experimentName = models . length > 1
154+ ? `${ baseExperimentName } /${ model } `
155+ : baseExperimentName ;
156+
157+ if ( models . length > 1 ) {
158+ console . log ( chalk . blue ( `\n--- Running with model: ${ model } ---` ) ) ;
159+ }
160+
161+ // Run the experiment
162+ const results = await runExperiment ( {
163+ config : modelConfig ,
164+ fixtures : selectedFixtures ,
165+ apiKey,
166+ resultsDir,
167+ experimentName,
168+ onProgress : ( msg ) => console . log ( msg ) ,
169+ } ) ;
170+
171+ // Check if this experiment passed
172+ const experimentPassed = results . evals . every ( ( e ) => e . passedRuns === e . totalRuns ) ;
173+ if ( ! experimentPassed ) {
174+ allPassed = false ;
175+ }
176+ }
144177
145178 // Exit with appropriate code
146- const allPassed = results . evals . every ( ( e ) => e . passedRuns === e . totalRuns ) ;
147179 process . exit ( allPassed ? 0 : 1 ) ;
148180 } catch ( error ) {
149181 if ( error instanceof Error ) {
0 commit comments