Skip to content

Price what-if moves by request-level context tier - #102

Open
kwisatzh wants to merge 3 commits into
mainfrom
research/tiered-prices-20261119
Open

kwisatzh wants to merge 3 commits into
mainfrom
research/tiered-prices-20261119

Conversation

@kwisatzh

@kwisatzh kwisatzh commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Result

what-if selects an ordered price tier per request from complete prompt length, including cache reads and writes. It applies that tier to the full request, including output, and reports covered request counts by target tier. Missing rates still refuse the move; v1 single-row tables remain readable.

Pricing provenance

The bundled runtime v2 table records the 2026-11-19 check and direct provider URLs in docs/prices/source-record-20261119.json. The original v1 prices.json remains byte-identical at its published hash for the frozen model-mix and calibration checks; the v2 table is separately inventoried. Standard/global synchronous text rates only; cache-write TTL is an explicit table assumption.

Verification

  • Go 1.26.11: go test -race ./..., go vet ./..., govulncheck -scan=symbol ./... passed.
  • The model-mix reproducer and its 21 tests, calibration 24 tests, all examples/investigate.sh variants, examples/demo.sh, and seven media tests passed.
  • Staticcheck has the same seven findings as main, with no new finding.
  • Boundary, mixed-request, factor, missing-tier, v1 compatibility and JSON tier-count tests added.

No release or tag in this PR.

Signed-off-by: Vijay <evijay@gmail.com>
Signed-off-by: Vijay <evijay@gmail.com>
Signed-off-by: Vijay <evijay@gmail.com>
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