@@ -437,8 +437,8 @@ def main() -> None:
437437 transition_delay = 0.1 ,
438438 )
439439
440- # Send initial heartbeat immediately after starting
441- send_heartbeat (session_id , auth_headers )
440+ # # Send initial heartbeat immediately after starting
441+ # send_heartbeat(session_id, auth_headers)
442442
443443 # Run evaluation on the initial solution
444444 term_out = run_evaluation (eval_command = args .eval_command )
@@ -460,23 +460,14 @@ def main() -> None:
460460 )
461461
462462 # Send feedback and get next suggestion
463- try :
464- eval_and_next_solution_response = evaluate_feedback_then_suggest_next_solution (
465- session_id = session_id ,
466- execution_output = term_out ,
467- additional_instructions = current_additional_instructions , # Pass current instructions
468- api_keys = llm_api_keys , # Pass client LLM keys
469- auth_headers = auth_headers , # Pass Weco key if logged in
470- timeout = timeout ,
471- )
472- except (requests .exceptions .HTTPError , requests .exceptions .RequestException ) as suggest_error :
473- # If suggest fails, we consider it a CLI error and break the loop
474- console .print (
475- f"\n [bold red]Error communicating with API during step { step } . Stopping optimization.[/]"
476- )
477- # Error details should have been printed by handle_api_error or the exception handler in evaluate_feedback_then_suggest_next_solution
478- # Prepare to report error in finally block
479- raise RuntimeError (f"API error during suggest at step { step } " ) from suggest_error
463+ eval_and_next_solution_response = evaluate_feedback_then_suggest_next_solution (
464+ session_id = session_id ,
465+ execution_output = term_out ,
466+ additional_instructions = current_additional_instructions , # Pass current instructions
467+ api_keys = llm_api_keys , # Pass client LLM keys
468+ auth_headers = auth_headers , # Pass Weco key if logged in
469+ timeout = timeout ,
470+ )
480471
481472 # Save next solution (.runs/<session-id>/step_<step>.<extension>)
482473 write_to_path (
@@ -569,20 +560,14 @@ def main() -> None:
569560 )
570561
571562 # Final evaluation report
572- try :
573- eval_and_next_solution_response = evaluate_feedback_then_suggest_next_solution (
574- session_id = session_id ,
575- execution_output = term_out ,
576- additional_instructions = current_additional_instructions ,
577- api_keys = llm_api_keys ,
578- timeout = timeout ,
579- auth_headers = auth_headers ,
580- )
581- except (requests .exceptions .HTTPError , requests .exceptions .RequestException ) as suggest_error :
582- console .print (
583- "\n [bold red]Error communicating with API during final evaluation report. Results might be incomplete.[/]"
584- )
585- raise RuntimeError ("API error during final suggest call" ) from suggest_error
563+ eval_and_next_solution_response = evaluate_feedback_then_suggest_next_solution (
564+ session_id = session_id ,
565+ execution_output = term_out ,
566+ additional_instructions = current_additional_instructions ,
567+ api_keys = llm_api_keys ,
568+ timeout = timeout ,
569+ auth_headers = auth_headers ,
570+ )
586571
587572 # Update the progress bar
588573 summary_panel .set_step (step = steps )
0 commit comments