Skip to content

novelty analyze --estimate-only: refit the per-role token profile against measured runs per tier #1217

Todo

Description

@antonwolfy

novelty analyze --estimate-only can price below the measured bill. The issue's run (777 calls, $6.00 billed under --max-usd 6, against expected_usd: 5.93 for 815 calls) points at the extractor's output tokens: a triage run billed 4 extractor calls at 16.4k output tokens in all, $0.38 of $0.95, against the 2,359 output tokens per call of the EXTRACTOR_TOKENS["triage"] profile in dokimi/dokimi/novelty/tiers.py. This rests on the issue's billed run, not on a run of this build: the figure is not reproducible offline.

The fix that reports where the estimate is least sure (usd_by_role, least_sure_role) is in the PR that closes #631. What is left is the refit itself: fit CALL_TOKENS and EXTRACTOR_TOKENS per tier (and per role) against measured paid runs at each tier, which an offline build cannot make. Once refit, revisit the least_sure_role rule in dokimi/dokimi/novelty/cost.py, which today has no per-role error data behind it (study and untiered runs name the extractor, triage and standard name the role with the largest dollars).

Found while fixing #631. The fix's PR is #1218.

Activity

  1. self-assigned this
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions