refactor(agent): trim recovery tail anchor
This commit is contained in:
@@ -14,7 +14,7 @@ _MAX_REPEAT_EXTERNAL_LOOKUPS = 2
|
|||||||
|
|
||||||
# Third same-target workspace violation in a turn escalates to "stop retrying".
|
# Third same-target workspace violation in a turn escalates to "stop retrying".
|
||||||
_MAX_REPEAT_WORKSPACE_VIOLATIONS = 2
|
_MAX_REPEAT_WORKSPACE_VIOLATIONS = 2
|
||||||
_LENGTH_RECOVERY_TAIL_CHARS = 500
|
_LENGTH_RECOVERY_TAIL_CHARS = 64
|
||||||
|
|
||||||
EMPTY_FINAL_RESPONSE_MESSAGE = (
|
EMPTY_FINAL_RESPONSE_MESSAGE = (
|
||||||
"I completed the tool steps but couldn't produce a final answer. "
|
"I completed the tool steps but couldn't produce a final answer. "
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from nanobot.utils.runtime import build_length_recovery_message
|
|||||||
|
|
||||||
def test_length_recovery_message_anchors_the_existing_tail() -> None:
|
def test_length_recovery_message_anchors_the_existing_tail() -> None:
|
||||||
omitted_prefix = "OMITTED_PREFIX"
|
omitted_prefix = "OMITTED_PREFIX"
|
||||||
tail = "x" * 500
|
tail = "x" * 64
|
||||||
|
|
||||||
message = build_length_recovery_message(omitted_prefix + tail)
|
message = build_length_recovery_message(omitted_prefix + tail)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user