Skip to content

Preserve post-ceiling image token calculator rounding - #22

Merged
softmarshmallow merged 1 commit into
mainfrom
chore/image-calculator-rounding
Nov 5, 2026
Merged

softmarshmallow merged 1 commit into
mainfrom
chore/image-calculator-rounding

Conversation

@softmarshmallow

Copy link
Copy Markdown
Member

Published image token calculators can apply a quality multiplier after the base token count is rounded up. The current schema cannot record that order or the final rounding rule, so reproducing those examples can undercount tokens.

Add optional paired quality_multipliers and result_rounding fields. The checker requires positive exact decimal multipliers for every quality axis and applies positive half-up rounding after the base ceiling. Existing calculator facts and results are unchanged.

Source: OpenAI image cost calculator and its published JavaScript.

Validation: 302 checker tests pass, including new order, half-tie and malformed-data cases; catalogue validation and pinned formatter pass. This is the schema prerequisite for a separate model-data update.

@softmarshmallow
softmarshmallow merged commit dc13047 into main Nov 5, 2026
4 checks passed
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