11use anyhow:: Result ;
22use std:: collections:: HashSet ;
33
4- use crate :: config:: { self , ModelRole } ;
4+ use crate :: config;
55
66use super :: super :: fixtures:: load_eval_report;
77use super :: super :: thresholds:: { parse_rule_threshold_args, EvalThresholdOptions } ;
@@ -56,7 +56,7 @@ pub(super) fn ensure_frontier_eval_models(
5656
5757 let mut models = Vec :: new ( ) ;
5858 let mut seen_models = HashSet :: new ( ) ;
59- for model in std:: iter:: once ( config. model . clone ( ) )
59+ for model in std:: iter:: once ( config. generation_model_name ( ) . to_string ( ) )
6060 . chain ( options. matrix_models . iter ( ) . cloned ( ) )
6161 . chain (
6262 std:: iter:: once ( config. verification . model_role )
@@ -66,7 +66,7 @@ pub(super) fn ensure_frontier_eval_models(
6666 . chain (
6767 options
6868 . repro_validate
69- . then ( || config. model_for_role ( ModelRole :: Fast ) . to_string ( ) ) ,
69+ . then ( || config. auditing_model_name ( ) . to_string ( ) ) ,
7070 )
7171 {
7272 if seen_models. insert ( model. clone ( ) ) {
@@ -111,6 +111,7 @@ fn is_frontier_review_model(model: &str) -> bool {
111111#[ cfg( test) ]
112112mod tests {
113113 use super :: * ;
114+ use crate :: config:: ModelRole ;
114115
115116 #[ test]
116117 fn is_frontier_review_model_accepts_requested_defaults ( ) {
@@ -124,4 +125,20 @@ mod tests {
124125 assert ! ( !is_frontier_review_model( "gpt-4o-mini" ) ) ;
125126 assert ! ( !is_frontier_review_model( "anthropic/claude-opus-4.1" ) ) ;
126127 }
128+
129+ #[ test]
130+ fn ensure_frontier_eval_models_rejects_non_frontier_auditor_when_repro_enabled ( ) {
131+ let config = config:: Config {
132+ model_reasoning : Some ( "gpt-4o-mini" . to_string ( ) ) ,
133+ auditing_model_role : ModelRole :: Reasoning ,
134+ ..config:: Config :: default ( )
135+ } ;
136+ let options = EvalRunOptions {
137+ repro_validate : true ,
138+ ..EvalRunOptions :: default ( )
139+ } ;
140+
141+ let error = ensure_frontier_eval_models ( & config, & options) . unwrap_err ( ) ;
142+ assert ! ( error. to_string( ) . contains( "gpt-4o-mini" ) ) ;
143+ }
127144}
0 commit comments