Repository navigation
record model usage and cost per role and route entry - #257
Closed
polyominal wants to merge 1 commit into
Closed
polyominal wants to merge 1 commit into
polyominal wants to merge 1 commit into
Conversation
Keep the index of the model route entry that answered each request. Use the workflow and frozen run prices to total selected requests, reported tokens, and priced spend across all calls of a role. Preserve incomplete and unpriced usage explicitly, including on routes with no budget. Older outcomes remain readable. AI-assisted: gpt-6.2-astra
polyominal
marked this pull request as draft
November 22, 2026 08:16
Collaborator
Author
|
Closing at the owner's request: per-role usage and cost overlap the budget and pricing work under way; to be redone when a consumer needs it. AI-assisted: claude-opus-5.5 |
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.
Add
usage.routesto the outcome of a run that answered requests through a selected model entry. Each row identifies the workflow role, entry index and client API. It reports the request count, reported token totals and the portion of cost covered by the prices frozen at run start. Repeated invocations of a judge role contribute to the same entry. Unbudgeted entries are included.The
model_answeredlog event now records the selected entry index when one is known. Unmatched requests remain in the run total. Unpriced models and missing or partial usage are reported explicitly. Older logs and outcomes remain readable. The existing budget enforcement and its exit behavior are unchanged.Inspect AI’s separate aggregation of role usage across samples informed the grouping across calls. Pumpkin retains the route entry as well so operators can distinguish a role’s different allocations. Inspect AI role aggregation · Feature request #73
All 373 CI tests and workspace doctests passed. Runtime fixtures cover repeated jobs, multiple entries for one API, a final judge, priced and unpriced models, refusals, and cut or missing usage. A separate reconciliation matched eleven route rows across five simulated outcomes to their selected log events and token categories.
AI-assisted: gpt-6.2-astra