Skip to content

record model usage and cost per role and route entry - #257

Closed
polyominal wants to merge 1 commit into
mainfrom
model-route-totals
Closed

polyominal wants to merge 1 commit into
mainfrom
model-route-totals

Conversation

@polyominal

@polyominal polyominal commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Add usage.routes to 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_answered log 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

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

Copy link
Copy Markdown
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

@polyominal polyominal closed this Nov 23, 2026
@polyominal
polyominal deleted the model-route-totals branch November 24, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant