@@ -34,11 +34,11 @@ def _assign_temperature(self) -> float:
3434 def _get_reasoning_effort (self ) -> str :
3535 """Get reasoning effort level based on agent temperature"""
3636 if self .temperature <= 0.4 :
37- return "low" # 8k reasoning tokens
37+ return "low" # ~20% of max_tokens for reasoning
3838 elif self .temperature <= 0.8 :
39- return "medium" # 16k reasoning tokens
39+ return "medium" # ~50% of max_tokens for reasoning
4040 else :
41- return "high" # 24k reasoning tokens
41+ return "high" # ~80% of max_tokens for reasoning
4242
4343 def generate_solution (self , problem : str , request_id : str = None ) -> Tuple [AgentSolution , int ]:
4444 """Generate a solution for the given problem using reasoning API"""
@@ -51,20 +51,11 @@ def generate_solution(self, problem: str, request_id: str = None) -> Tuple[Agent
5151 problem = problem
5252 )
5353
54- # Configure reasoning parameters based on fixed budgets
54+ # Configure reasoning parameters - simplified with effort only
5555 reasoning_effort = self ._get_reasoning_effort ()
56- max_tokens = self .config ['max_tokens' ] # Fixed 32k
57-
58- # Use fixed reasoning tokens based on effort level
59- if reasoning_effort == "low" :
60- reasoning_tokens = self .config ['low_effort_tokens' ] # 8k
61- elif reasoning_effort == "medium" :
62- reasoning_tokens = self .config ['medium_effort_tokens' ] # 16k
63- else : # high
64- reasoning_tokens = self .config ['high_effort_tokens' ] # 24k
56+ max_tokens = self .config ['max_tokens' ] # Fixed 30k
6557
6658 reasoning_config = {
67- "max_tokens" : reasoning_tokens ,
6859 "effort" : reasoning_effort
6960 }
7061
@@ -134,9 +125,8 @@ def verify_solution(self, problem: str, solution: str, verifier_id: int, solutio
134125 solution = solution
135126 )
136127
137- # Use fixed verification token budgets
138- max_tokens = self .config ['max_tokens' ] # Fixed 32k
139- verification_reasoning_tokens = self .config ['verification_tokens' ] # Fixed 8k
128+ # Use simplified verification with effort parameter
129+ max_tokens = self .config ['max_tokens' ] # Fixed 30k
140130
141131 try :
142132 response = self .client .chat .completions .create (
@@ -150,8 +140,7 @@ def verify_solution(self, problem: str, solution: str, verifier_id: int, solutio
150140 timeout = 180 ,
151141 extra_body = {
152142 "reasoning" : {
153- "max_tokens" : verification_reasoning_tokens ,
154- "effort" : "low"
143+ "effort" : "low" # Low effort for verification consistency
155144 }
156145 }
157146 )
@@ -196,9 +185,8 @@ def improve_solution(self, problem: str, current_solution: str, feedback: str, i
196185 issues = "\n " .join (f"- { issue } " for issue in issues )
197186 )
198187
199- # Use fixed improvement token budgets (use high effort for iterations)
200- max_tokens = self .config ['max_tokens' ] # Fixed 32k
201- improvement_reasoning_tokens = self .config ['high_effort_tokens' ] # Fixed 24k
188+ # Use simplified improvement with high effort
189+ max_tokens = self .config ['max_tokens' ] # Fixed 30k
202190
203191 try :
204192 response = self .client .chat .completions .create (
@@ -212,8 +200,7 @@ def improve_solution(self, problem: str, current_solution: str, feedback: str, i
212200 timeout = 300 ,
213201 extra_body = {
214202 "reasoning" : {
215- "max_tokens" : improvement_reasoning_tokens ,
216- "effort" : "high"
203+ "effort" : "high" # High effort for improvements
217204 }
218205 }
219206 )
0 commit comments