@@ -70,7 +70,7 @@ def __init__(self, env: Dict[str, str] = os.environ, testing: bool = False):
7070
7171 default_agent_model = ""
7272 if is_smartfix_coding_agent :
73- default_agent_model = "bedrock/us.anthropic.claude-3-7-sonnet-20250219 -v1:0"
73+ default_agent_model = "bedrock/us.anthropic.claude-sonnet-4-5-20250929 -v1:0"
7474 self .AGENT_MODEL = self ._get_env_var ("AGENT_MODEL" , required = False , default = default_agent_model )
7575
7676 # --- Build and Formatting Configuration ---
@@ -120,6 +120,12 @@ def __init__(self, env: Dict[str, str] = os.environ, testing: bool = False):
120120 self .ENABLE_FULL_TELEMETRY = self ._get_bool_env ("ENABLE_FULL_TELEMETRY" , default = True )
121121 self .USE_CONTRAST_LLM = self ._get_bool_env ("USE_CONTRAST_LLM" , default = True )
122122
123+ # Update agent model for Contrast LLM if no explicit model was set
124+ if (is_smartfix_coding_agent
125+ and self .USE_CONTRAST_LLM
126+ and self ._get_env_var ("AGENT_MODEL" , required = False ) is None ):
127+ self .AGENT_MODEL = "contrast/claude-sonnet-4-5"
128+
123129 # --- Vulnerability Configuration ---
124130 self .VULNERABILITY_SEVERITIES = self ._parse_and_validate_severities (
125131 self ._get_env_var ("VULNERABILITY_SEVERITIES" , required = False , default = '["CRITICAL", "HIGH"]' )
@@ -213,7 +219,8 @@ def _log_initial_settings(self):
213219 _log_config_message (f"Debug Mode: { self .DEBUG_MODE } " )
214220 _log_config_message (f"Base Branch: { self .BASE_BRANCH } " )
215221 _log_config_message (f"Run Task: { self .RUN_TASK } " )
216- _log_config_message (f"Agent Model: { self .AGENT_MODEL } " )
222+ if not self .USE_CONTRAST_LLM :
223+ _log_config_message (f"Agent Model: { self .AGENT_MODEL } " )
217224 _log_config_message (f"Coding Agent: { self .CODING_AGENT } " )
218225 _log_config_message (f"Skip Writing Security Test: { self .SKIP_WRITING_SECURITY_TEST } " )
219226 _log_config_message (f"Skip QA Review: { self .SKIP_QA_REVIEW } " )
0 commit comments