fix(agent): remove local context tail truncation (#5820)
* fix(agent): remove local context tail truncation * fix(agent): defer subagent type annotations * fix(agent): require context consolidator for runner * refactor(agent): minimize consolidator contract diff
This commit is contained in:
1 parent
8d0430c761
commit
29ba4c7f2d
18 files changed
+483
-855
No files matched your search
@@ -10,6 +10,13 @@ from nanobot.providers.base import GenerationSettings, LLMProvider
|
||||
from nanobot.utils.llm_runtime import LLMRuntime
|
||||
|
||||
|
||||
async def failed_test_consolidator(
|
||||
_messages: list[dict[str, Any]],
|
||||
_previous_summary: str | None,
|
||||
) -> None:
|
||||
"""Model a failed summary and raw fallback in tests not exercising compaction."""
|
||||
|
||||
|
||||
def make_run_spec(provider: LLMProvider, **kwargs: Any) -> AgentRunSpec:
|
||||
"""Build a run spec from the pre-runtime test arguments.
|
||||
|
||||
@@ -51,4 +58,5 @@ def make_run_spec(provider: LLMProvider, **kwargs: Any) -> AgentRunSpec:
|
||||
),
|
||||
context_window_tokens=context_window_tokens,
|
||||
)
|
||||
kwargs.setdefault("consolidate_history", failed_test_consolidator)
|
||||
return AgentRunSpec(runtime=runtime, **kwargs)
|
||||
Reference in new issue
Block a user