The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(agent): pack import lists (AST-identical)
Teknium21274c852367
diff --git a/agent/moa_loop.py b/agent/moa_loop.pyindex 6fc0af6ac31..15109857d60 100644--- a/agent/moa_loop.py+++ b/agent/moa_loop.py@@ -299,14 +299,9 @@ def _maybe_apply_moa_cache_control(Returns the messages unchanged on any error."""try:- from agent.agent_runtime_helpers import (- anthropic_prompt_cache_policy,- blank_cache_policy_stub,- )+ from agent.agent_runtime_helpers import anthropic_prompt_cache_policy, blank_cache_policy_stubfrom agent.prompt_caching import (- apply_anthropic_cache_control,- effective_cache_ttl,- envelope_tool_part_cache_markers_supported,+ apply_anthropic_cache_control, effective_cache_ttl, envelope_tool_part_cache_markers_supported,)# Explicit kwarg > runtime snapshot (threaded from the live agent) > config.@@ -436,10 +431,7 @@ def _trim_messages_for_reference(if not messages:return messages- from agent.model_metadata import (- estimate_messages_tokens_rough,- get_model_context_length,- )+ from agent.model_metadata import estimate_messages_tokens_rough, get_model_context_lengthmodel = str(slot.get("model") or "")provider = str(runtime.get("provider") or slot.get("provider") or "")diff --git a/agent/nous_rate_guard.py b/agent/nous_rate_guard.pyindex 15654598a47..3b87c8677a8 100644--- a/agent/nous_rate_guard.py+++ b/agent/nous_rate_guard.py@@ -16,12 +16,7 @@ import timefrom typing import Any, Mapping, Optionalfrom utils import atomic_write_textfrom agent.rate_limit_tracker import (- _BUCKET_TAGS,- _fmt_seconds,- _safe_float,- _safe_int,- has_rate_limit_headers,- lower_headers,+ _BUCKET_TAGS, _fmt_seconds, _safe_float, _safe_int, has_rate_limit_headers, lower_headers,)logger = logging.getLogger(__name__)