feat: enhance timeout management and knowledge base handling in CoSTEER components (#1130)

* feat: enhance timeout management and knowledge base handling in CoSTEER components

* fix a little bug

* fix small bug

* fix a small bug

* Update rdagent/scenarios/data_science/loop.py

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>

* add scale check

* fix a small bug

* fix CI

* use dynamic chat_token_limit & remove repeated lines

* fix CI

* remove useless comment

* fix small bug

* update draft appendix

* fix prompt

* add code correctness as top priority

---------

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
This commit is contained in:
Xu Yang
2025-07-31 13:06:28 +08:00
committed by GitHub
parent ce25bafbf7
commit 1aa5cc2535
26 changed files with 337 additions and 131 deletions
@@ -103,7 +103,7 @@ class FactorCodeEvaluator(FactorEvaluator):
user_prompt=user_prompt,
system_prompt=system_prompt,
)
> LLM_SETTINGS.chat_token_limit
> APIBackend().chat_token_limit
):
execution_feedback_to_render = execution_feedback_to_render[len(execution_feedback_to_render) // 2 :]
else:
@@ -509,7 +509,7 @@ class FactorFinalDecisionEvaluator(FactorEvaluator):
user_prompt=user_prompt,
system_prompt=system_prompt,
)
> LLM_SETTINGS.chat_token_limit
> APIBackend().chat_token_limit
):
execution_feedback_to_render = execution_feedback_to_render[len(execution_feedback_to_render) // 2 :]
else:
@@ -45,7 +45,7 @@ class FactorMultiProcessEvolvingStrategy(MultiProcessEvolvingStrategy):
APIBackend().build_messages_and_calculate_token(
user_prompt=error_summary_user_prompt, system_prompt=error_summary_system_prompt
)
< LLM_SETTINGS.chat_token_limit
< APIBackend().chat_token_limit
):
break
elif len(queried_similar_error_knowledge_to_render) > 0:
@@ -124,7 +124,7 @@ class FactorMultiProcessEvolvingStrategy(MultiProcessEvolvingStrategy):
)
if (
APIBackend().build_messages_and_calculate_token(user_prompt=user_prompt, system_prompt=system_prompt)
< LLM_SETTINGS.chat_token_limit
< APIBackend().chat_token_limit
):
break
elif len(queried_former_failed_knowledge_to_render) > 1: