From a80432112dcc8c6c253b1f2c16431f5fc389ba27 Mon Sep 17 00:00:00 2001 From: mofree <47296694+mofree@users.noreply.github.com> Date: Fri, 7 Aug 2026 15:18:20 +0800 Subject: [PATCH] Fix qwen3 prompt selection in reset Remove 'qwen3' from the O1 prompt branch in reset() so that it reaches the R1 prompt branch, keeping prompt selection consistent with __init__() and the `` parser in act(). Related observations not addressed by this commit: - 'qwen3' model-name detection is case-sensitive. - act() contains an if/else with same branches that execute the same statement. --- secgym/agents/baseline_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secgym/agents/baseline_agent.py b/secgym/agents/baseline_agent.py index 0246fd0..cd26b1b 100644 --- a/secgym/agents/baseline_agent.py +++ b/secgym/agents/baseline_agent.py @@ -274,7 +274,7 @@ def reset(self, change_seed=True): self.step_count = 0 sys_prompt = BASE_PROMPT - if "o1" in self.config_list[0]['model'] or "o3" in self.config_list[0]['model'] or "o4" in self.config_list[0]['model'] or "meta-llama" in self.config_list[0]['model'] or "qwen3" in self.config_list[0]['model']: + if "o1" in self.config_list[0]['model'] or "o3" in self.config_list[0]['model'] or "o4" in self.config_list[0]['model'] or "meta-llama" in self.config_list[0]['model']: sys_prompt = O1_PROMPT elif "r1" in self.config_list[0]['model'] or "R1" in self.config_list[0]['model'] or "qwen3" in self.config_list[0]['model']: sys_prompt = R1_PROMPT