Skip to content

feat: add price change event foundation - #8

Merged
linqiang-max merged 1 commit into
mainfrom
feat/price-change-events-foundation
Jul 28, 2026
Merged

feat: add price change event foundation#8
linqiang-max merged 1 commit into
mainfrom
feat/price-change-events-foundation

Conversation

@linqiang-max

Copy link
Copy Markdown
Contributor

Summary

Adds a trusted Price Change Events foundation for tracking verified AI API pricing changes over time.

Changes

  • Added a canonical price-change-event schema
  • Added snapshot diff generation for:
    • price_update
    • cached_price_added
    • cached_price_removed
  • Added stable event_id and dedupe_key
  • Added validation for dates, prices, URLs, source snapshot paths, and duplicate events
  • Added atomic JSONL writes and idempotent event generation
  • Added canonical events for:
    • Mistral mistral-large
    • xAI grok-4.3
  • Added unit tests and README documentation

Data integrity

  • Does not infer or invent historical prices
  • Does not treat verification timestamp changes as price changes
  • Preserves unknown provider effective dates as null
  • Uses detected_at, verified_at, and date_basis separately
  • Repeated generation does not create duplicate events
  • Existing manually added metadata is preserved

Validation

  • python scripts\validate.py
  • python scripts\validate_pricing_v2_preview.py
  • python -m unittest tests.test_price_change_events
  • git diff --check

All checks passed.

Current coverage

  • Verified price change events: 2
  • Providers covered: 2
  • Public Pricing History page is not included in this PR
  • More verified events are still required before publishing a public Pricing History page

@linqiang-max
linqiang-max merged commit dfc43d0 into main Jul 28, 2026
2 checks passed
@linqiang-max
linqiang-max deleted the feat/price-change-events-foundation branch July 28, 2026 19:37
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