fix: preserve exploration tool history and cap context budget
This commit is contained in:
1 parent
ee256ad7ce
commit
621f30e437
17 files changed
+211
-23
No files matched your search
@@ -40,6 +40,7 @@ import threading
|
||||
from typing import Any
|
||||
|
||||
from artemis.data_engine.context_vars import CURRENT_NODE_NAME
|
||||
from artemis.config.constants import MAX_CONTEXT_WINDOW_TOKENS
|
||||
from artemis.llm.usage import usage_from_message
|
||||
from artemis.utils.logger import get_logger
|
||||
|
||||
@@ -52,7 +53,7 @@ _METERS: dict[str, "SessionTokenMeter"] = {}
|
||||
# measured against when the UI reports "context used". The prompt size of the
|
||||
# last executor call (``context_base_tokens`` on its ``llm_usage`` trace) is
|
||||
# the numerator; this is the denominator.
|
||||
OPERATOR_CONTEXT_WINDOW_TOKENS = 1_000_000
|
||||
OPERATOR_CONTEXT_WINDOW_TOKENS = MAX_CONTEXT_WINDOW_TOKENS
|
||||
|
||||
# Traced node names whose LLM calls carry the live executor context. Both the
|
||||
# Pro Operator and the Flash runner are "the operator" from the user's view.
|
||||
|
||||
Reference in new issue
Block a user