@@ -34,6 +34,12 @@ def pytest_addoption(parser) -> None:
3434 default = None ,
3535 help = ("Override the number of runs for evaluation_test. Pass an integer (e.g., 1, 5, 10)." ),
3636 )
37+ group .addoption (
38+ "--ep-max-concurrent-rollouts" ,
39+ action = "store" ,
40+ default = None ,
41+ help = ("Override the maximum number of concurrent rollouts. Pass an integer (e.g., 8, 50, 100)." ),
42+ )
3743 group .addoption (
3844 "--ep-print-summary" ,
3945 action = "store_true" ,
@@ -62,14 +68,13 @@ def pytest_addoption(parser) -> None:
6268 default = None ,
6369 help = (
6470 "Set reasoning.effort for providers that support it (e.g., Fireworks) via LiteLLM extra_body. "
65- "Values: low|medium|high"
71+ "Values: low|medium|high|none "
6672 ),
6773 )
6874 group .addoption (
6975 "--ep-max-retry" ,
7076 action = "store" ,
71- type = int ,
72- default = 0 ,
77+ default = None ,
7378 help = ("Failed rollouts (with rollout_status.code indicating error) will be retried up to this many times." ),
7479 )
7580 group .addoption (
@@ -98,7 +103,7 @@ def _normalize_max_rows(val: Optional[str]) -> Optional[str]:
98103 return None
99104
100105
101- def _normalize_num_runs (val : Optional [str ]) -> Optional [str ]:
106+ def _normalize_number (val : Optional [str ]) -> Optional [str ]:
102107 if val is None :
103108 return None
104109 s = val .strip ()
@@ -131,10 +136,15 @@ def pytest_configure(config) -> None:
131136 os .environ ["EP_MAX_DATASET_ROWS" ] = norm
132137
133138 num_runs_val = config .getoption ("--ep-num-runs" )
134- norm_runs = _normalize_num_runs (num_runs_val )
139+ norm_runs = _normalize_number (num_runs_val )
135140 if norm_runs is not None :
136141 os .environ ["EP_NUM_RUNS" ] = norm_runs
137142
143+ max_concurrent_val = config .getoption ("--ep-max-concurrent-rollouts" )
144+ norm_concurrent = _normalize_number (max_concurrent_val )
145+ if norm_concurrent is not None :
146+ os .environ ["EP_MAX_CONCURRENT_ROLLOUTS" ] = norm_concurrent
147+
138148 if config .getoption ("--ep-print-summary" ):
139149 os .environ ["EP_PRINT_SUMMARY" ] = "1"
140150
@@ -143,10 +153,13 @@ def pytest_configure(config) -> None:
143153 os .environ ["EP_SUMMARY_JSON" ] = summary_json_path
144154
145155 max_retry = config .getoption ("--ep-max-retry" )
146- os .environ ["EP_MAX_RETRY" ] = str (max_retry )
156+ norm_max_retry = _normalize_number (max_retry )
157+ if norm_max_retry is not None :
158+ os .environ ["EP_MAX_RETRY" ] = norm_max_retry
147159
148160 fail_on_max_retry = config .getoption ("--ep-fail-on-max-retry" )
149- os .environ ["EP_FAIL_ON_MAX_RETRY" ] = fail_on_max_retry
161+ if fail_on_max_retry is not None :
162+ os .environ ["EP_FAIL_ON_MAX_RETRY" ] = fail_on_max_retry
150163
151164 # Allow ad-hoc overrides of input params via CLI flags
152165 try :
@@ -178,7 +191,8 @@ def pytest_configure(config) -> None:
178191 if reasoning_effort :
179192 # Always place under extra_body to avoid LiteLLM rejecting top-level params
180193 eb = merged .setdefault ("extra_body" , {})
181- eb ["reasoning_effort" ] = str (reasoning_effort )
194+ # Convert "none" string to None value for API compatibility
195+ eb ["reasoning_effort" ] = None if reasoning_effort .lower () == "none" else str (reasoning_effort )
182196 if merged :
183197 os .environ ["EP_INPUT_PARAMS_JSON" ] = _json .dumps (merged )
184198 except Exception :
0 commit comments