Repository navigation
feat(standard): keep each model call whole and show a trial's conversation call by call - #342
Open
pierreleca wants to merge 7 commits into
Open
pierreleca wants to merge 7 commits into
pierreleca wants to merge 7 commits into
Conversation
pierreleca
force-pushed
the
feat/model-calls-record
branch
from
November 24, 2026 11:21
5fd6fd5 to
d9ce88c
Compare
aitianshi
added a commit
that referenced
this pull request
Nov 24, 2026
Closes #379 ## What Before a live feed exists, a run now opens on Logs. Launch stages and log output live there; the first usable feed switches to Live within the same document, without reloading. Explicit tab choices are respected. Restarted stages drop stale timing/detail, terminal executions settle stage state, and unknown unit totals use an indeterminate bar. The full-run overview shows identity cards with Runner first, then Benchmark/Dataset, Agent/Model, and Trials/Duration. Task and All attempts pages keep their own status and metrics without repeating run identity. Task overview cards put timing and Tool calls on the left and Model usage on the right, stacking on narrow screens. Model usage combines a compact token bar with Prompt growth when multiple calls were recorded. Its labels and segments are input, cache, output; input means uncached input, as its tooltip explains. Cache hit is plain text. Saved trial totals provide a fallback when trajectory accounting is absent, and missing usage is stated explicitly. ## Touches backend · routes · templates and static · tests · field guide No equivalent open or closed issue/PR was found in the repository or private fork. Related open work: #336 (run facts), #338 (trial details), #340 (task step progress). These have shared-file overlap, but implement separate behavior. After merging main, pairwise merge checks are clean for #332, #336, #338, #340, #342 and #344. Unmerged #352 and #354 still require coordination in app/templates/runs/job.html and app/web/runs.py; their features are not included here. ## Before and after Task overview: the earlier real-run capture and the approved final layout from that same saved run. Run identity is now kept on the full-run overview. | Before | After | | --- | --- | | <img width="430" alt="Earlier task overview with separate growth and tool sections" src="https://raw.githubusercontent.com/ThinkFlowLab/nullius/feat/run-logs-tab/app/ui_tests/evidence/run-logs/task-after.png"> | <img width="430" alt="Timing and Tool calls on the left, combined Model usage on the right" src="https://raw.githubusercontent.com/ThinkFlowLab/nullius/feat/run-logs-tab/app/ui_tests/evidence/run-logs/model-usage-after.png"> | Full-run identity cards and Live/Results/Logs: <img width="860" alt="Full-run overview with Runner first and benchmark, dataset, agent, model, count and duration cards" src="https://raw.githubusercontent.com/ThinkFlowLab/nullius/feat/run-logs-tab/app/ui_tests/evidence/run-logs/run-overview-after.png"> ## Verified - Backend suite: 2,856 tests in 173 modules passed after merging current main outside the socket-restricted sandbox. - Route suite: 660 tests in 68 modules passed after merging current main. - Focused progress and execution tests: 83 passed. - Browser checks: desktop light/dark and narrow layout; automatic Logs → Live retains the document and `performance.timeOrigin`; tab selection and task metrics checked. - Real τ³-bench Airline task using `meta/muse-spark-1.3-contributor`: reward 1.0, 55.54 seconds agent time, 22 steps. Recorded uninterrupted from cold setup through Logs → Live, Results and the task page. The simulator and judge used `openai/gpt-4.1` because the configured dated default alias was unavailable. The earlier refused attempt was not counted as this successful run. - Field-guide checks: 2 passed. Usage regression cases cover one call, multiple calls, final metrics, trial totals, unreadable trajectories, missing usage and output-only records. - `git diff --check` passed. ## Risk Feed readiness and polling changes could leave a preparing page on the wrong tab; explicit choices must not be overridden. A terminal execution now settles a remaining stage even if its final stage event was absent, but does not manufacture a duration or unit count. Runs without launch records have no Logs tab. The overview derives the benchmark from the catalogue or a single recorded task source. The token summary preserves existing trajectory cache accounting; partial per-call records can still describe only the recorded subset. Revert to undo; no storage migration.
…ting A custom provider without a key is sent a placeholder word. The run wrote that word itself, while the launcher and the judge read it from settings.MODEL_KEY_PLACEHOLDER. Reading it from the setting here too lets every reader of a run's requests know which word is no secret.
…elay's record A trial's call record keeps the last two messages of each model call, cut to 2,000 characters and without pictures: what the model was shown at a step is lost. Each unit's relay now also keeps every call of its agent whole under the trial's .work/relay/exchanges: the request as sent and its sha256, each distinct part and picture written once, and the reply as it arrived. Only the relay's key is cut out. A failure to write never changes or stops the reply, and each file names its format so that a later one is refused rather than guessed. run --exchanges whole|text|off (whole by default) and --exchanges-max-mb N (256 a unit by default) choose and bound it; the job's config records both and a recipe takes them. The judge's and the simulated user's calls keep their call record alone.
… model calls A recipe could take the exchange record's mode, but the builder had no way to set it. The Limits step now has three small cards under the spending caps: Pictures and text (the default), Text alone and Nothing. A choice other than the default goes into the recipe and onto the run's command line; the default adds nothing. A run that calls no model shows no cards.
The record of a trial's calls is only useful once something reads it. traces/calls.py builds a trial's conversation by model call from it: each call's time, tokens and cost, what it sent that the call before had not (pictures by their sha256), its answer whole and the steps of the trajectory under it. A store of a later format is refused with a notice, and a trial without a store reads as before. runs show ... --calls prints that view as JSON, redacted. runs show ... --call N --request prints call N's request rebuilt to the bytes sent and says on stderr whether its sha256 is the recorded one. Both find an earlier try of a trial by its NAME.try-N.
…ures The Conversation tab lists the steps of a trajectory, and the pictures an agent sent its model show nowhere. A trial with an exchange record now opens the tab on its model calls, twelve a page: the selected call shows what it sent that the call before had not, its answer and the steps under it. A picture is served from the trial's own store by its sha256, only when that store lists it and only as an image type; a click opens it in a dialog over the page, and a click with a key held opens it in a tab of its own. The Artifacts tab counts the pictures and their size, with a link to the tab.
pierreleca
force-pushed
the
feat/model-calls-record
branch
from
November 24, 2026 13:55
d9ce88c to
eee9f14
Compare
The Artifacts tab lists the pictures sent to the model first, then Nullius's records, then the benchmark's own under their heading row. The trial's page imports main's evidence reader beside the calls, and the builder's Limits row keeps main's words on attempts and retries, with what each trial keeps of its model calls after the cap on them.
The rows this branch added on the exchange record retold the relay's code: its file layout, its version line, its retries and its failures. The record's section keeps two sentences and the rows a user chooses or meets: the text mode, off, the bound, what is not kept and where the result names it. The read-jobs rows and the builder's Limits row each say what the command or the choice is. Two clauses of the standard's Progress and Outcomes rows described the live feed's steps and a scored cut, which this branch does not hold; one linked a section it does not have. They go back to main's words.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #341
What
A trial's call record keeps the last two messages of each model call, cut to 2,000 characters and without pictures. Each unit's relay now also keeps every call of its agent whole in the trial's
.work/relay/exchanges: the request as sent and its sha256, each distinct part and picture once, and the reply as it arrived. Only the relay's key is cut out. A failure to write never changes a reply.run --exchanges whole|text|offand--exchanges-max-mb N(256 a unit by default) choose and bound it; the job's config, a recipe and the builder's Limits step take them.runs show ... --callsprints a trial's calls as JSON, and--call N --requestprints one request rebuilt to the bytes sent. The Conversation tab of a trial with a record lists its calls: what each sent that the call before had not, its answer and its steps. A picture, served only when its trial's store lists it, opens over the page. The Artifacts tab counts the pictures.A run without a key reads its placeholder word from
settings.MODEL_KEY_PLACEHOLDER, as the launcher does; the store leaves that word uncut.Touches
the standard · backend · routes · templates and static · docs and site
Before and after
On the builder's Limits step, look at "Model calls kept" and its three cards; on an OSWorld1 trial's page, at the Conversation tab by model call with one call selected and a picture opened over the page, and at the Artifacts tab's row "Pictures sent to the model".
main)Verified
main: nothing fails thatmainpasses (backend 174 modules, 2,974 tests; routes 72 modules, 698 tests).runs show ... --callslisted both calls, one picture each;--call 1 --requestrebuilt call 1 to its recorded sha256.field_contract.py --writeandcatalogue_docs.py --writechange nothing;git diff --checkis clean; the judge's checks pass offline.Risk
Each picture is kept once per trial, about 120 kB a screenshot above, at most 256 MB a unit. Prompts and pictures sit unredacted in the job's folder. The relay gains two options and the job's config two keys. Revert the commits to undo; a store already written is then left unread.