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

Showing 2 changed files with 50 additions and 4 deletions.

x
0 of 2 viewed, 2 left
16 additions and 0 deletionssrc/server/providers/azure-pricing.test.tsModified
View file
@@ -271,6 +271,22 @@
expect(azureModelPricing(doc, 'gpt-5.5', '2026-04-24')).toEqual({})
​
+ it('clears the price of a version the list does not meter yet', () => {
+ expect(azureModelPricing(doc, 'gpt-chat-latest', '2026-10-07')).toEqual({
+ absent: { pricing: 'cleared' },
+ })
+ expect(azureModelPricing(doc, 'gpt-4o', '2024-08-06')).toEqual({
+ absent: { pricing: 'cleared' },
+ })
+ expect(
+ azureModelPricing(doc, 'gpt-chat-latest', '2026-08-06').pricing,
+ ).toBeDefined()
+ // No meter names it, or the row names no version: a parser miss, not a
+ // stated absence, so the stored card is kept.
+ expect(azureModelPricing(doc, 'gpt-5.6', '2026-09-01')).toEqual({})
+ expect(azureModelPricing(doc, 'o3', null)).toEqual({})
+ })
+​
it('says whether the price list meters an id', () => {
expect(azureMetered(meters, 'o3-deep-research')).toBe(true)
expect(azureMetered(meters, 'gpt-5.6')).toBe(false)
34 additions and 4 deletionssrc/server/providers/azure-pricing.tsModified
View file