Skip to content

fix(pricing): handle scheduled built-in prices in Settings and saves - #107

Merged
bhavsarpratik merged 1 commit into
splunk:mainfrom
johnciavarella:fix/scheduled-price-overrides
Nov 2, 2026
Merged

bhavsarpratik merged 1 commit into
splunk:mainfrom
johnciavarella:fix/scheduled-price-overrides

Conversation

@johnciavarella

Copy link
Copy Markdown
Contributor

Problem

The #92 review asked for the shared pricing change to go in its own pull request: #92 (comment)

For a model with a scheduled built-in price change, Settings → Model pricing has two problems:

  • All-history saves are dropped. An "apply to all history" save at today's built-in price is treated as "use built-in" and dropped, so the earlier scheduled price comes back for usage before the cutover.
  • Dated saves are compared with the wrong price. They are checked against the latest built-in price, not the one in effect from the save's start date.
    • Saving the earlier built-in price for a date before the change pins it permanently, even past the scheduled increase.
    • Saving today's price from a date before the change is silently ignored.

What changed

  • Settings display: Settings → Model pricing shows the built-in price in effect now, so a model with a scheduled change shows the rate that applies today.
  • All-history saves: a save equal to a scheduled model's current built-in price is kept as an override. It then applies before the scheduled change too.
  • Dated saves: a dated save is compared with the built-in price in effect from its start date.
    • Saving that price keeps following the built-in, including any later scheduled change.
    • Saving today's price from a date before the change is kept as an override for that window.
  • All history: an "All history" save always replaces the timeline with one flat price after the user confirms. Saving the earlier price shown before a change keeps it after the change as well, and a test pins this.
  • Unaffected models: models without scheduled price changes, and every other Settings flow (restore, custom and retired models, discounts), behave as before.

Today this affects:

  • Codex: gpt-5.6, gpt-5.6-sol, gpt-5.6-terra and gpt-5.6-luna
  • Cursor: gpt-5.6-sol

The Antigravity PR (#92) adds Gemini models with scheduled increases on 2026-12-01 and 2027-01-01, and they benefit from the same handling.

Related: #92

Validation

  • python3 -m unittest discover -s tests: 2,247 tests, OK (17 skipped)
  • Tests: 9 new tests in tests/integration/test_model_pricing_compat.py.
    • With token_meter/app.py reverted to main, 7 fail: all-history keep, dated follow-schedule, a dated save of today's price before the change, replacing an existing override, the Cursor path with restore and idempotent re-save, the displayed price in effect now, and re-saving the shown price before a change.
    • The unscheduled-model guard passes on both.
  • py_compile: OK
  • git diff --check: clean

Limitations

Split out of the Antigravity runtime review (splunk#92) for separate review.

- Settings → Model pricing shows the built-in price in effect now, so a
  model with a scheduled price change shows the rate that applies today.
- An "apply to all history" save equal to a scheduled model's current
  built-in price is kept as an override, so it applies before the
  scheduled change too, instead of silently restoring the earlier price.
  "All history" always replaces the timeline with one flat price, so
  saving the earlier price shown before a change keeps it after the
  change as well.
- A dated save is compared with the built-in price in effect from its
  start date. Saving that price keeps following the built-in, including
  any later scheduled change, instead of pinning it. Saving the current
  price from a date before the change is kept as an override for that
  window, instead of being silently dropped.
- Models without scheduled price changes behave as before.

Today this affects gpt-5.6, gpt-5.6-sol, gpt-5.6-terra, and gpt-5.6-luna on
Codex, and gpt-5.6-sol on Cursor.
@bhavsarpratik
bhavsarpratik merged commit 03da028 into splunk:main Nov 2, 2026
10 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.

2 participants