Skip to content

Commit d825d3b

Browse files
rajbosCopilot
andauthored
chore: refresh model pricing data (#666)
- update OpenAI pricing for GPT-4.1 and GPT-5.4 models - add cached input rates where provider docs expose them - align README caching note with per-model pricing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4c8f855 commit d825d3b

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

vscode-extension/src/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ When these fields are absent, the full `inputCostPerMillion` rate is applied to
6565
- Cache reads: **10% of input rate** (e.g. $0.30/M for Claude Sonnet 4 at $3.00/M input)
6666
- Cache creation: **125% of input rate** (e.g. $3.75/M for Claude Sonnet 4)
6767

68-
**OpenAI prompt caching rates** (automatic prefix matching):
69-
- Cache reads: **50% of input rate** (e.g. $1.25/M for GPT-4o at $2.50/M input)
68+
**OpenAI prompt caching rates** (automatic prefix matching) vary by model family:
69+
- Cache reads use the explicit per-model `cachedInputCostPerMillion` values in `modelPricing.json` (for example: GPT-4o = 50% of input, GPT-4.1 = 25%, GPT-5.4 = 10%)
7070
- Note: OpenAI cache creation does not incur an extra fee, so `cacheCreationCostPerMillion` is not set for OpenAI models.
7171

7272
### Which data sources provide cache token breakdowns?

vscode-extension/src/modelPricing.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"description": "Model pricing data - costs per million tokens for input and output",
44
"metadata": {
5-
"lastUpdated": "2026-03-30",
5+
"lastUpdated": "2026-04-24",
66
"sources": [
77
{
88
"name": "OpenAI API Pricing",
9-
"url": "https://openai.com/api/pricing/",
10-
"retrievedDate": "2026-03-30"
9+
"url": "https://developers.openai.com/api/docs/pricing",
10+
"retrievedDate": "2026-04-24"
1111
},
1212
{
1313
"name": "Anthropic Claude Pricing",
@@ -127,15 +127,17 @@
127127
},
128128
"gpt-5.4": {
129129
"inputCostPerMillion": 2.50,
130+
"cachedInputCostPerMillion": 0.25,
130131
"outputCostPerMillion": 15.0,
131132
"category": "GPT-5 models",
132133
"tier": "premium",
133134
"multiplier": 1,
134135
"displayNames": ["GPT-5.4"]
135136
},
136137
"gpt-5.4-mini": {
137-
"inputCostPerMillion": 0.25,
138-
"outputCostPerMillion": 2.0,
138+
"inputCostPerMillion": 0.75,
139+
"cachedInputCostPerMillion": 0.075,
140+
"outputCostPerMillion": 4.5,
139141
"category": "GPT-5 models",
140142
"tier": "standard",
141143
"multiplier": 0,
@@ -150,23 +152,26 @@
150152
"displayNames": ["GPT-4"]
151153
},
152154
"gpt-4.1": {
153-
"inputCostPerMillion": 3.0,
154-
"outputCostPerMillion": 12.0,
155+
"inputCostPerMillion": 2.0,
156+
"cachedInputCostPerMillion": 0.5,
157+
"outputCostPerMillion": 8.0,
155158
"category": "GPT-4 models",
156159
"tier": "standard",
157160
"multiplier": 0,
158161
"displayNames": ["GPT-4.1"]
159162
},
160163
"gpt-4.1-mini": {
161-
"inputCostPerMillion": 0.8,
162-
"outputCostPerMillion": 3.2,
164+
"inputCostPerMillion": 0.4,
165+
"cachedInputCostPerMillion": 0.1,
166+
"outputCostPerMillion": 1.6,
163167
"category": "GPT-4 models",
164168
"tier": "standard",
165169
"multiplier": 0
166170
},
167171
"gpt-4.1-nano": {
168-
"inputCostPerMillion": 0.2,
169-
"outputCostPerMillion": 0.8,
172+
"inputCostPerMillion": 0.1,
173+
"cachedInputCostPerMillion": 0.025,
174+
"outputCostPerMillion": 0.4,
170175
"category": "GPT-4 models",
171176
"tier": "standard",
172177
"multiplier": 0

0 commit comments

Comments
 (0)