Skip to content
Source
Sign inSign up
TanStack/schemas

Clear the Azure price of a model version the price list does not meter yet #331

Mergedposthog[bot](GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/331/headmerged by tombeckenham View on GitHub

Problem

  • The pricing_lost alert fires 3 to 5 times each hour, against an upper bound of 0. A real price loss on any other provider is hidden in this noise.
  • Since 2026-10-15 at about 02:00 UTC, all of these events come from one row: azure / gpt-chat-latest. They do not come from OpenCode.
  • Microsoft's models article now lists gpt-chat-latest (2026-10-07), and the adapter uses the newest version.
  • The Azure Retail Prices API meters versions 0505, 0528, 0701, and 0806 of this model. It has no 1007 meter yet.
  • azureModelRates returns null. Each 15-minute poll keeps the stored card and logs a parser_miss.
  • The kept card is for the 2026-08-06 version. The row now describes 2026-10-07, which has a different context window.

Origin

  • Issues: #307
  • Scout: signals-scout-insight-alerts
  • First signal: 2026-10-12
  • Inbox report: open
  • Task started by: auto-start, after the report was rated P2 and ready to fix

Changes

  • When every meter that names a model is for a different dated version, the adapter sets absent.pricing: 'cleared'. The price list was read, and it visibly has no price for this version.
  • This follows the FactAbsence contract in providers/types.ts. It is the same pattern as the Gemini fix (#311) and the OpenCode fix (#315).
  • The rule is narrow. A model with no meter, or with an undated meter, or a row with no version, still keeps its stored card and logs pricing_lost.
  • When Azure publishes the 1007 meter, the next poll writes the new card again.
RowMetersBeforeAfter
gpt-chat-latest 2026-10-070505, 0528, 0701, 0806Keeps the 0806 card, logs pricing_lost each pollPrice is null, no signal
gpt-chat-latest 2026-08-06samePricedPriced
Model with no meter (gpt-5.6)noneKeeps the card, logs pricing_lostNo change
o3, no version0416 onlyKeeps the card, logs pricing_lostNo change

Warning

This is a product decision. #324 lists three options: wait, copy the newest priced version, or mark the price unavailable. This PR uses a fourth option, cleared. The served price of azure/gpt-chat-latest is null until Azure meters the 2026-10-07 version. Do not merge this if a stale card is better for the catalog than no card.

Testing

  • bun run test src/server/providers/azure src/server/providers/adapters/azure src/server/ingest: all tests pass. The new test covers the cleared case and the two cases that are not cleared.
  • bun run typecheck, eslint, and prettier --check on the changed files: all pass.
  • I ran the new code against the live Learn article and the live price list. It clears only one chat row: gpt-chat-latest 2026-10-07. This is well below the bound in refusesPriceClears, which refuses 5 or more clears.

Agent context

  • I rejected a copy of the 0806 price to the 1007 row. The source does not state that the two versions have the same price.
  • I rejected unavailable. It keeps a card for the wrong version, and it is meant for a source that cannot be read.
  • The OpenCode jev-1.13 events in the report are from 2026-10-13. They stopped before this alert episode, so this PR does not change them.

Closes #324

🤖 Generated with Claude Code


Created with PostHog Desktop from this inbox report, addressing #307.

    1. Deploying with  Cloudflare Workers  Cloudflare Workers

      The latest updates on your project. Learn more about integrating Git with Workers.

      StatusNameLatest CommitPreview URLUpdated (UTC)
      ✅ Deployment successful!
      View logs
      modelschemasb4928bfcCommit Preview URL

      Branch Preview URL
      Oct 17 2026, 10:54 PM
    2. tombeckenham merged this2981fa1

    3. tombeckenham closed this

Sign in to join this conversation.