|
|
@@ -10,6 +10,12 @@ from script_build_host.agents.prompts import (
|
|
|
script_build_prompt_manifest,
|
|
|
)
|
|
|
|
|
|
+_VALIDATOR_CAPS = {
|
|
|
+ "script_retrieval_validator": 20,
|
|
|
+ "script_candidate_validator": 25,
|
|
|
+ "script_root_validator": 25,
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
def resolve_script_role_model_manifest(
|
|
|
configured: Mapping[str, object],
|
|
|
@@ -35,11 +41,20 @@ def resolve_script_role_model_manifest(
|
|
|
default: dict[str, Any] = {
|
|
|
"model": model,
|
|
|
"temperature": 0.0 if role == "validator" else 0.2,
|
|
|
- "max_iterations": max_iterations,
|
|
|
+ "max_iterations": min(
|
|
|
+ max_iterations,
|
|
|
+ 100 if role == "planner" else _VALIDATOR_CAPS.get(preset, 20),
|
|
|
+ ),
|
|
|
}
|
|
|
override = explicit.get(preset)
|
|
|
if isinstance(override, Mapping):
|
|
|
default.update(dict(override))
|
|
|
+ cap = 100 if role == "planner" else _VALIDATOR_CAPS.get(preset, 20)
|
|
|
+ default["max_iterations"] = min(
|
|
|
+ int(default.get("max_iterations", cap)), max_iterations, cap
|
|
|
+ )
|
|
|
+ if role == "validator":
|
|
|
+ default["temperature"] = 0.0
|
|
|
presets[preset] = default
|
|
|
output["presets"] = presets
|
|
|
return output
|