The call record: every model call, for the operator's study (M6.6a)
nisse-core records each model call of every agent into a file beside its state store (<state>.calls.db), for the status page (L7, X6): - the request body exactly as sent (never headers), the raw response with its reasoning, the model asked and the one that answered, time, tokens and llama-server's own prompt reuse (timings.cache_n); - its work item, role, run and purpose: Driver.run and nisse-dev's delegation loop open runs, nested; compaction, expert consults, the classifier and the go-ahead reader label their calls; - provenance, worked out in BudgetedClient by comparing the events at each stage: each event sent with its log id and content as sent, which a compaction replaced, which fitting shortened (by how much) and dropped. Content is stored once by hash, compressed. It is diagnostic only: the agent never reads it, a failed write is logged once and recording stops while the call goes on, and the file is deleted when the agent starts, so its layout never migrates; CallReader refuses a layout it doesn't know. While recording, the system prompt ends with one sentence saying so. `call_record: false` in either agent's YAML turns it off. The benchmark records each run beside that run's own state store, and `--keep-runs DIR` keeps both for the page. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
This commit is contained in:
1 parent
cba35eb7d4
commit
dd060566b2
22 files changed
+1346
-48
No files matched your search
@@ -63,6 +63,8 @@ OPTIONAL_KEYS = (
|
||||
"roles.classifier",
|
||||
"llm.max_output_tokens",
|
||||
"llm.request_timeout_s",
|
||||
# Record every model call for the operator's study (L7); on unless false.
|
||||
"call_record",
|
||||
)
|
||||
# Settings the old loop had (until M2.8), and what to do instead.
|
||||
RETIRED_KEYS = {
|
||||
@@ -444,6 +446,7 @@ class AgentConfig:
|
||||
profiles: Mapping[str, Profile] = field(default_factory=dict)
|
||||
max_output_tokens: int = DEFAULT_MAX_OUTPUT_TOKENS
|
||||
request_timeout_s: float = DEFAULT_REQUEST_TIMEOUT_S
|
||||
call_record: bool = True # every model call recorded for the operator (L7)
|
||||
tuning: Tuning = field(default_factory=Tuning)
|
||||
vault: VaultConfig | None = None
|
||||
config_file: Path | None = None
|
||||
@@ -521,6 +524,9 @@ class AgentConfig:
|
||||
errors.append("unset or empty — " + ", ".join(missing))
|
||||
|
||||
max_output, request_timeout = llm_numbers(values, errors)
|
||||
record = values.get("call_record", True)
|
||||
if not isinstance(record, bool):
|
||||
errors.append("call_record: true or false")
|
||||
if errors:
|
||||
raise ConfigError("cannot start: " + "; ".join(errors))
|
||||
|
||||
@@ -548,6 +554,7 @@ class AgentConfig:
|
||||
profiles=profiles,
|
||||
max_output_tokens=max_output,
|
||||
request_timeout_s=request_timeout,
|
||||
call_record=record,
|
||||
tuning=tuning,
|
||||
vault=vault,
|
||||
config_file=config_file,
|
||||
|
||||
Reference in new issue
Block a user