llm_cost_tracker 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/README.md +116 -467
  4. data/app/controllers/llm_cost_tracker/calls_controller.rb +2 -1
  5. data/app/controllers/llm_cost_tracker/dashboard_controller.rb +3 -15
  6. data/app/controllers/llm_cost_tracker/tags_controller.rb +7 -6
  7. data/app/helpers/llm_cost_tracker/application_helper.rb +21 -6
  8. data/app/helpers/llm_cost_tracker/dashboard_filter_options_helper.rb +3 -1
  9. data/app/services/llm_cost_tracker/dashboard/date_range.rb +42 -0
  10. data/app/services/llm_cost_tracker/dashboard/filter.rb +6 -8
  11. data/app/services/llm_cost_tracker/dashboard/spend_anomaly.rb +6 -5
  12. data/app/services/llm_cost_tracker/dashboard/tag_breakdown.rb +74 -18
  13. data/app/services/llm_cost_tracker/dashboard/tag_key_explorer.rb +15 -4
  14. data/app/views/llm_cost_tracker/shared/_tag_chips.html.erb +1 -1
  15. data/app/views/llm_cost_tracker/tags/show.html.erb +4 -0
  16. data/lib/llm_cost_tracker/configuration.rb +22 -16
  17. data/lib/llm_cost_tracker/doctor.rb +1 -1
  18. data/lib/llm_cost_tracker/generators/llm_cost_tracker/install_generator.rb +1 -0
  19. data/lib/llm_cost_tracker/generators/llm_cost_tracker/templates/initializer.rb.erb +8 -2
  20. data/lib/llm_cost_tracker/integrations/anthropic.rb +12 -3
  21. data/lib/llm_cost_tracker/integrations/base.rb +77 -6
  22. data/lib/llm_cost_tracker/integrations/object_reader.rb +1 -1
  23. data/lib/llm_cost_tracker/integrations/openai.rb +14 -5
  24. data/lib/llm_cost_tracker/integrations/registry.rb +3 -1
  25. data/lib/llm_cost_tracker/integrations/ruby_llm.rb +171 -0
  26. data/lib/llm_cost_tracker/llm_api_call.rb +10 -9
  27. data/lib/llm_cost_tracker/middleware/faraday.rb +10 -6
  28. data/lib/llm_cost_tracker/parsers/gemini.rb +8 -1
  29. data/lib/llm_cost_tracker/parsers/openai_usage.rb +11 -2
  30. data/lib/llm_cost_tracker/price_freshness.rb +3 -3
  31. data/lib/llm_cost_tracker/price_registry.rb +3 -0
  32. data/lib/llm_cost_tracker/price_sync/fetcher.rb +43 -12
  33. data/lib/llm_cost_tracker/price_sync/registry_diff.rb +51 -0
  34. data/lib/llm_cost_tracker/price_sync/registry_loader.rb +6 -0
  35. data/lib/llm_cost_tracker/price_sync/registry_writer.rb +5 -1
  36. data/lib/llm_cost_tracker/price_sync.rb +103 -111
  37. data/lib/llm_cost_tracker/prices.json +225 -229
  38. data/lib/llm_cost_tracker/pricing.rb +27 -15
  39. data/lib/llm_cost_tracker/report.rb +8 -1
  40. data/lib/llm_cost_tracker/report_data.rb +25 -9
  41. data/lib/llm_cost_tracker/retention.rb +30 -7
  42. data/lib/llm_cost_tracker/storage/dispatcher.rb +68 -0
  43. data/lib/llm_cost_tracker/stream_capture.rb +7 -0
  44. data/lib/llm_cost_tracker/stream_collector.rb +25 -1
  45. data/lib/llm_cost_tracker/tag_sanitizer.rb +81 -0
  46. data/lib/llm_cost_tracker/tracker.rb +7 -59
  47. data/lib/llm_cost_tracker/version.rb +1 -1
  48. data/lib/llm_cost_tracker.rb +1 -0
  49. data/lib/tasks/llm_cost_tracker.rake +24 -78
  50. metadata +26 -15
  51. data/lib/llm_cost_tracker/price_sync/merger.rb +0 -72
  52. data/lib/llm_cost_tracker/price_sync/model_catalog.rb +0 -77
  53. data/lib/llm_cost_tracker/price_sync/raw_price.rb +0 -33
  54. data/lib/llm_cost_tracker/price_sync/refresh_plan_builder.rb +0 -164
  55. data/lib/llm_cost_tracker/price_sync/source.rb +0 -29
  56. data/lib/llm_cost_tracker/price_sync/source_result.rb +0 -7
  57. data/lib/llm_cost_tracker/price_sync/sources/litellm.rb +0 -90
  58. data/lib/llm_cost_tracker/price_sync/sources/open_router.rb +0 -93
  59. data/lib/llm_cost_tracker/price_sync/validator.rb +0 -66
@@ -1,404 +1,400 @@
1
1
  {
2
2
  "metadata": {
3
- "updated_at": "2026-04-25",
3
+ "updated_at": "2026-04-27",
4
4
  "currency": "USD",
5
5
  "unit": "1M tokens",
6
6
  "source_urls": [
7
- "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json",
8
- "https://openrouter.ai/api/v1/models"
9
- ]
7
+ "https://developers.openai.com/api/docs/pricing",
8
+ "https://platform.claude.com/docs/en/about-claude/pricing",
9
+ "https://ai.google.dev/pricing"
10
+ ],
11
+ "schema_version": 1,
12
+ "min_gem_version": "0.4.0"
10
13
  },
11
14
  "models": {
12
- "claude-haiku-4-5": {
13
- "_source": "litellm",
15
+ "anthropic/claude-haiku-4-5": {
14
16
  "input": 1.0,
15
17
  "output": 5.0,
16
- "cache_read_input": 0.09999999999999999,
18
+ "cache_read_input": 0.1,
17
19
  "cache_write_input": 1.25,
18
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
19
- "_fetched_at": "2026-04-25T10:28:30Z"
20
+ "batch_input": 0.5,
21
+ "batch_output": 2.5
20
22
  },
21
- "claude-opus-4": {
22
- "_source": "openrouter",
23
+ "anthropic/claude-opus-4": {
23
24
  "input": 15.0,
24
25
  "output": 75.0,
25
26
  "cache_read_input": 1.5,
26
27
  "cache_write_input": 18.75,
27
- "_source_version": "e5f9f0125b69f8b3dbc2ff76f6f6caddc18896623ecd99d3beb5733c88149d45",
28
- "_fetched_at": "2026-04-25T10:28:30Z"
28
+ "batch_input": 7.5,
29
+ "batch_output": 37.5
29
30
  },
30
- "claude-opus-4-1": {
31
- "_source": "litellm",
31
+ "anthropic/claude-opus-4-1": {
32
32
  "input": 15.0,
33
33
  "output": 75.0,
34
34
  "cache_read_input": 1.5,
35
35
  "cache_write_input": 18.75,
36
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
37
- "_fetched_at": "2026-04-25T10:28:30Z"
36
+ "batch_input": 7.5,
37
+ "batch_output": 37.5
38
38
  },
39
- "claude-opus-4-5": {
40
- "_source": "litellm",
39
+ "anthropic/claude-opus-4-5": {
41
40
  "input": 5.0,
42
41
  "output": 25.0,
43
42
  "cache_read_input": 0.5,
44
43
  "cache_write_input": 6.25,
45
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
46
- "_fetched_at": "2026-04-25T10:28:30Z"
44
+ "batch_input": 2.5,
45
+ "batch_output": 12.5
47
46
  },
48
- "claude-opus-4-6": {
49
- "_source": "litellm",
47
+ "anthropic/claude-opus-4-6": {
50
48
  "input": 5.0,
51
49
  "output": 25.0,
52
50
  "cache_read_input": 0.5,
53
51
  "cache_write_input": 6.25,
54
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
55
- "_fetched_at": "2026-04-25T10:28:30Z"
52
+ "batch_input": 2.5,
53
+ "batch_output": 12.5
56
54
  },
57
- "claude-opus-4-7": {
58
- "_source": "litellm",
55
+ "anthropic/claude-opus-4-7": {
59
56
  "input": 5.0,
60
57
  "output": 25.0,
61
58
  "cache_read_input": 0.5,
62
59
  "cache_write_input": 6.25,
63
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
64
- "_fetched_at": "2026-04-25T10:28:30Z"
60
+ "batch_input": 2.5,
61
+ "batch_output": 12.5
65
62
  },
66
- "claude-sonnet-4": {
67
- "_source": "openrouter",
63
+ "anthropic/claude-sonnet-4": {
68
64
  "input": 3.0,
69
65
  "output": 15.0,
70
66
  "cache_read_input": 0.3,
71
67
  "cache_write_input": 3.75,
72
- "_source_version": "e5f9f0125b69f8b3dbc2ff76f6f6caddc18896623ecd99d3beb5733c88149d45",
73
- "_fetched_at": "2026-04-25T10:28:30Z"
68
+ "batch_input": 1.5,
69
+ "batch_output": 7.5
74
70
  },
75
- "claude-sonnet-4-5": {
76
- "_source": "litellm",
71
+ "anthropic/claude-sonnet-4-5": {
77
72
  "input": 3.0,
78
73
  "output": 15.0,
79
74
  "cache_read_input": 0.3,
80
75
  "cache_write_input": 3.75,
81
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
82
- "_fetched_at": "2026-04-25T10:28:30Z"
76
+ "batch_input": 1.5,
77
+ "batch_output": 7.5
83
78
  },
84
- "claude-sonnet-4-6": {
85
- "_source": "litellm",
79
+ "anthropic/claude-sonnet-4-6": {
86
80
  "input": 3.0,
87
81
  "output": 15.0,
88
82
  "cache_read_input": 0.3,
89
83
  "cache_write_input": 3.75,
90
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
91
- "_fetched_at": "2026-04-25T10:28:30Z"
84
+ "batch_input": 1.5,
85
+ "batch_output": 7.5
92
86
  },
93
- "gemini-2.0-flash": {
87
+ "gemini/gemini-2.0-flash": {
94
88
  "input": 0.1,
95
89
  "cache_read_input": 0.025,
96
90
  "output": 0.4,
97
- "_source": "seed"
91
+ "batch_input": 0.05,
92
+ "batch_output": 0.2
98
93
  },
99
- "gemini-2.0-flash-lite": {
94
+ "gemini/gemini-2.0-flash-lite": {
100
95
  "input": 0.075,
101
96
  "output": 0.3,
102
- "_source": "seed"
97
+ "batch_input": 0.0375,
98
+ "batch_output": 0.15
103
99
  },
104
- "gemini-2.5-flash": {
105
- "_source": "openrouter",
100
+ "gemini/gemini-2.5-flash": {
106
101
  "input": 0.3,
107
102
  "output": 2.5,
108
103
  "cache_read_input": 0.03,
109
- "cache_write_input": 0.08333333333333334,
110
- "_source_version": "e5f9f0125b69f8b3dbc2ff76f6f6caddc18896623ecd99d3beb5733c88149d45",
111
- "_fetched_at": "2026-04-25T10:28:30Z"
112
- },
113
- "gemini-2.5-flash-lite": {
114
- "_source": "openrouter",
115
- "input": 0.09999999999999999,
116
- "output": 0.39999999999999997,
104
+ "cache_write_input": 0.083333333333,
105
+ "batch_input": 0.15,
106
+ "batch_output": 1.25
107
+ },
108
+ "gemini/gemini-2.5-flash-lite": {
109
+ "input": 0.1,
110
+ "output": 0.4,
117
111
  "cache_read_input": 0.01,
118
- "cache_write_input": 0.08333333333333334,
119
- "_source_version": "e5f9f0125b69f8b3dbc2ff76f6f6caddc18896623ecd99d3beb5733c88149d45",
120
- "_fetched_at": "2026-04-25T10:28:30Z"
112
+ "cache_write_input": 0.083333333333,
113
+ "batch_input": 0.05,
114
+ "batch_output": 0.2
121
115
  },
122
- "gemini-2.5-pro": {
123
- "_source": "openrouter",
116
+ "gemini/gemini-2.5-pro": {
124
117
  "input": 1.25,
125
118
  "output": 10.0,
126
119
  "cache_read_input": 0.125,
127
120
  "cache_write_input": 0.375,
128
- "_source_version": "e5f9f0125b69f8b3dbc2ff76f6f6caddc18896623ecd99d3beb5733c88149d45",
129
- "_fetched_at": "2026-04-25T10:28:30Z"
121
+ "batch_input": 0.625,
122
+ "batch_output": 5.0
130
123
  },
131
- "gpt-3.5-turbo": {
132
- "_source": "litellm",
124
+ "openai/gpt-3.5-turbo": {
133
125
  "input": 0.5,
134
- "output": 1.5,
135
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
136
- "_fetched_at": "2026-04-25T10:28:30Z"
126
+ "output": 1.5
137
127
  },
138
- "gpt-4": {
139
- "_source": "litellm",
128
+ "openai/gpt-4": {
140
129
  "input": 30.0,
141
130
  "output": 60.0,
142
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
143
- "_fetched_at": "2026-04-25T10:28:30Z"
131
+ "batch_input": 15.0,
132
+ "batch_output": 30.0
144
133
  },
145
- "gpt-4-turbo": {
146
- "_source": "litellm",
134
+ "openai/gpt-4-turbo": {
147
135
  "input": 10.0,
148
136
  "output": 30.0,
149
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
150
- "_fetched_at": "2026-04-25T10:28:30Z"
137
+ "batch_input": 5.0,
138
+ "batch_output": 15.0
151
139
  },
152
- "gpt-4.1": {
153
- "_source": "litellm",
140
+ "openai/gpt-4.1": {
154
141
  "input": 2.0,
155
142
  "output": 8.0,
156
143
  "cache_read_input": 0.5,
157
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
158
- "_fetched_at": "2026-04-25T10:28:30Z"
159
- },
160
- "gpt-4.1-mini": {
161
- "_source": "litellm",
162
- "input": 0.39999999999999997,
163
- "output": 1.5999999999999999,
164
- "cache_read_input": 0.09999999999999999,
165
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
166
- "_fetched_at": "2026-04-25T10:28:30Z"
167
- },
168
- "gpt-4.1-nano": {
169
- "_source": "litellm",
170
- "input": 0.09999999999999999,
171
- "output": 0.39999999999999997,
172
- "cache_read_input": 0.024999999999999998,
173
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
174
- "_fetched_at": "2026-04-25T10:28:30Z"
175
- },
176
- "gpt-4o": {
177
- "_source": "litellm",
144
+ "batch_input": 1.0,
145
+ "batch_output": 4.0
146
+ },
147
+ "openai/gpt-4.1-mini": {
148
+ "input": 0.4,
149
+ "output": 1.6,
150
+ "cache_read_input": 0.1,
151
+ "batch_input": 0.2,
152
+ "batch_output": 0.8
153
+ },
154
+ "openai/gpt-4.1-nano": {
155
+ "input": 0.1,
156
+ "output": 0.4,
157
+ "cache_read_input": 0.025,
158
+ "batch_input": 0.05,
159
+ "batch_output": 0.2
160
+ },
161
+ "openai/gpt-4o": {
178
162
  "input": 2.5,
179
163
  "output": 10.0,
180
164
  "cache_read_input": 1.25,
181
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
182
- "_fetched_at": "2026-04-25T10:28:30Z"
165
+ "batch_input": 1.25,
166
+ "batch_output": 5.0
183
167
  },
184
- "gpt-4o-2024-05-13": {
185
- "_source": "litellm",
168
+ "openai/gpt-4o-2024-05-13": {
186
169
  "input": 5.0,
187
170
  "output": 15.0,
188
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
189
- "_fetched_at": "2026-04-25T10:28:30Z"
171
+ "batch_input": 2.5,
172
+ "batch_output": 7.5
190
173
  },
191
- "gpt-4o-mini": {
192
- "_source": "litellm",
174
+ "openai/gpt-4o-mini": {
193
175
  "input": 0.15,
194
176
  "output": 0.6,
195
177
  "cache_read_input": 0.075,
196
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
197
- "_fetched_at": "2026-04-25T10:28:30Z"
178
+ "batch_input": 0.075,
179
+ "batch_output": 0.3
198
180
  },
199
- "gpt-5": {
200
- "_source": "litellm",
181
+ "openai/gpt-5": {
201
182
  "input": 1.25,
202
183
  "output": 10.0,
203
184
  "cache_read_input": 0.125,
204
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
205
- "_fetched_at": "2026-04-25T10:28:30Z"
185
+ "batch_input": 0.625,
186
+ "batch_output": 5.0,
187
+ "batch_cache_read_input": 0.0625
206
188
  },
207
- "gpt-5-chat-latest": {
208
- "_source": "litellm",
189
+ "openai/gpt-5-chat-latest": {
209
190
  "input": 1.25,
210
191
  "output": 10.0,
211
- "cache_read_input": 0.125,
212
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
213
- "_fetched_at": "2026-04-25T10:28:30Z"
192
+ "cache_read_input": 0.125
214
193
  },
215
- "gpt-5-codex": {
216
- "_source": "litellm",
194
+ "openai/gpt-5-codex": {
217
195
  "input": 1.25,
218
196
  "output": 10.0,
219
- "cache_read_input": 0.125,
220
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
221
- "_fetched_at": "2026-04-25T10:28:30Z"
197
+ "cache_read_input": 0.125
222
198
  },
223
- "gpt-5-mini": {
224
- "_source": "litellm",
199
+ "openai/gpt-5-mini": {
225
200
  "input": 0.25,
226
201
  "output": 2.0,
227
- "cache_read_input": 0.024999999999999998,
228
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
229
- "_fetched_at": "2026-04-25T10:28:30Z"
230
- },
231
- "gpt-5-nano": {
232
- "_source": "litellm",
233
- "input": 0.049999999999999996,
234
- "output": 0.39999999999999997,
202
+ "cache_read_input": 0.025,
203
+ "batch_input": 0.125,
204
+ "batch_output": 1.0,
205
+ "batch_cache_read_input": 0.0125
206
+ },
207
+ "openai/gpt-5-nano": {
208
+ "input": 0.05,
209
+ "output": 0.4,
235
210
  "cache_read_input": 0.005,
236
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
237
- "_fetched_at": "2026-04-25T10:28:30Z"
211
+ "batch_input": 0.025,
212
+ "batch_output": 0.2,
213
+ "batch_cache_read_input": 0.0025
238
214
  },
239
- "gpt-5-pro": {
240
- "_source": "litellm",
215
+ "openai/gpt-5-pro": {
241
216
  "input": 15.0,
242
217
  "output": 120.0,
243
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
244
- "_fetched_at": "2026-04-25T10:28:30Z"
218
+ "batch_input": 7.5,
219
+ "batch_output": 60.0
245
220
  },
246
- "gpt-5.1": {
247
- "_source": "litellm",
221
+ "openai/gpt-5.1": {
248
222
  "input": 1.25,
249
223
  "output": 10.0,
250
224
  "cache_read_input": 0.125,
251
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
252
- "_fetched_at": "2026-04-25T10:28:30Z"
225
+ "batch_input": 0.625,
226
+ "batch_output": 5.0,
227
+ "batch_cache_read_input": 0.0625
253
228
  },
254
- "gpt-5.1-chat-latest": {
255
- "_source": "litellm",
229
+ "openai/gpt-5.1-chat-latest": {
256
230
  "input": 1.25,
257
231
  "output": 10.0,
258
- "cache_read_input": 0.125,
259
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
260
- "_fetched_at": "2026-04-25T10:28:30Z"
232
+ "cache_read_input": 0.125
261
233
  },
262
- "gpt-5.1-codex": {
263
- "_source": "litellm",
234
+ "openai/gpt-5.1-codex": {
264
235
  "input": 1.25,
265
236
  "output": 10.0,
266
- "cache_read_input": 0.125,
267
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
268
- "_fetched_at": "2026-04-25T10:28:30Z"
237
+ "cache_read_input": 0.125
269
238
  },
270
- "gpt-5.1-codex-max": {
271
- "_source": "litellm",
239
+ "openai/gpt-5.1-codex-max": {
272
240
  "input": 1.25,
273
241
  "output": 10.0,
274
- "cache_read_input": 0.125,
275
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
276
- "_fetched_at": "2026-04-25T10:28:30Z"
242
+ "cache_read_input": 0.125
277
243
  },
278
- "gpt-5.1-codex-mini": {
279
- "_source": "litellm",
244
+ "openai/gpt-5.1-codex-mini": {
280
245
  "input": 0.25,
281
246
  "output": 2.0,
282
- "cache_read_input": 0.024999999999999998,
283
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
284
- "_fetched_at": "2026-04-25T10:28:30Z"
247
+ "cache_read_input": 0.025
285
248
  },
286
- "gpt-5.2": {
287
- "_source": "litellm",
249
+ "openai/gpt-5.2": {
288
250
  "input": 1.75,
289
251
  "output": 14.0,
290
252
  "cache_read_input": 0.175,
291
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
292
- "_fetched_at": "2026-04-25T10:28:30Z"
253
+ "batch_input": 0.875,
254
+ "batch_output": 7.0,
255
+ "batch_cache_read_input": 0.0875
293
256
  },
294
- "gpt-5.2-chat-latest": {
295
- "_source": "litellm",
257
+ "openai/gpt-5.2-chat-latest": {
296
258
  "input": 1.75,
297
259
  "output": 14.0,
298
- "cache_read_input": 0.175,
299
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
300
- "_fetched_at": "2026-04-25T10:28:30Z"
260
+ "cache_read_input": 0.175
301
261
  },
302
- "gpt-5.2-codex": {
303
- "_source": "litellm",
262
+ "openai/gpt-5.2-codex": {
304
263
  "input": 1.75,
305
264
  "output": 14.0,
306
- "cache_read_input": 0.175,
307
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
308
- "_fetched_at": "2026-04-25T10:28:30Z"
265
+ "cache_read_input": 0.175
309
266
  },
310
- "gpt-5.2-pro": {
311
- "_source": "litellm",
267
+ "openai/gpt-5.2-pro": {
312
268
  "input": 21.0,
313
269
  "output": 168.0,
314
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
315
- "_fetched_at": "2026-04-25T10:28:30Z"
270
+ "batch_input": 10.5,
271
+ "batch_output": 84.0
316
272
  },
317
- "gpt-5.4": {
318
- "_source": "litellm",
273
+ "openai/gpt-5.4": {
319
274
  "input": 2.5,
320
275
  "output": 15.0,
321
276
  "cache_read_input": 0.25,
322
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
323
- "_fetched_at": "2026-04-25T10:28:30Z"
277
+ "batch_input": 1.25,
278
+ "batch_output": 7.5,
279
+ "batch_cache_read_input": 0.13
324
280
  },
325
- "gpt-5.4-mini": {
326
- "_source": "litellm",
281
+ "openai/gpt-5.4-mini": {
327
282
  "input": 0.75,
328
283
  "output": 4.5,
329
284
  "cache_read_input": 0.075,
330
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
331
- "_fetched_at": "2026-04-25T10:28:30Z"
285
+ "batch_input": 0.375,
286
+ "batch_output": 2.25,
287
+ "batch_cache_read_input": 0.0375
332
288
  },
333
- "gpt-5.4-nano": {
334
- "_source": "litellm",
335
- "input": 0.19999999999999998,
289
+ "openai/gpt-5.4-nano": {
290
+ "input": 0.2,
336
291
  "output": 1.25,
337
292
  "cache_read_input": 0.02,
338
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
339
- "_fetched_at": "2026-04-25T10:28:30Z"
293
+ "batch_input": 0.1,
294
+ "batch_output": 0.625,
295
+ "batch_cache_read_input": 0.01
340
296
  },
341
- "gpt-5.4-pro": {
342
- "_source": "litellm",
297
+ "openai/gpt-5.4-pro": {
343
298
  "input": 30.0,
344
299
  "output": 180.0,
345
- "cache_read_input": 3.0,
346
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
347
- "_fetched_at": "2026-04-25T10:28:30Z"
300
+ "batch_input": 15.0,
301
+ "batch_output": 90.0
348
302
  },
349
- "gpt-5.5": {
350
- "_source": "litellm",
303
+ "openai/gpt-5.5": {
351
304
  "input": 5.0,
352
305
  "output": 30.0,
353
306
  "cache_read_input": 0.5,
354
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
355
- "_fetched_at": "2026-04-25T10:28:30Z"
356
- },
357
- "gpt-5.5-pro": {
358
- "_source": "litellm",
359
- "input": 60.0,
360
- "output": 360.0,
361
- "cache_read_input": 6.0,
362
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
363
- "_fetched_at": "2026-04-25T10:28:30Z"
364
- },
365
- "o1": {
366
- "_source": "litellm",
307
+ "batch_input": 2.5,
308
+ "batch_output": 15.0,
309
+ "batch_cache_read_input": 0.25
310
+ },
311
+ "openai/gpt-5.5-pro": {
312
+ "input": 30.0,
313
+ "output": 180.0,
314
+ "batch_input": 15.0,
315
+ "batch_output": 90.0
316
+ },
317
+ "openai/o1": {
367
318
  "input": 15.0,
368
319
  "output": 60.0,
369
320
  "cache_read_input": 7.5,
370
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
371
- "_fetched_at": "2026-04-25T10:28:30Z"
321
+ "batch_input": 7.5,
322
+ "batch_output": 30.0
372
323
  },
373
- "o1-mini": {
324
+ "openai/o1-mini": {
374
325
  "input": 1.1,
375
326
  "cache_read_input": 0.55,
376
327
  "output": 4.4,
377
- "_source": "seed"
328
+ "batch_input": 0.55,
329
+ "batch_output": 2.2
378
330
  },
379
- "o3": {
380
- "_source": "litellm",
331
+ "openai/o3": {
381
332
  "input": 2.0,
382
333
  "output": 8.0,
383
334
  "cache_read_input": 0.5,
384
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
385
- "_fetched_at": "2026-04-25T10:28:30Z"
335
+ "batch_input": 1.0,
336
+ "batch_output": 4.0
386
337
  },
387
- "o3-mini": {
388
- "_source": "litellm",
338
+ "openai/o3-mini": {
389
339
  "input": 1.1,
390
340
  "output": 4.4,
391
341
  "cache_read_input": 0.55,
392
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
393
- "_fetched_at": "2026-04-25T10:28:30Z"
342
+ "batch_input": 0.55,
343
+ "batch_output": 2.2
394
344
  },
395
- "o4-mini": {
396
- "_source": "litellm",
345
+ "openai/o4-mini": {
397
346
  "input": 1.1,
398
347
  "output": 4.4,
399
348
  "cache_read_input": 0.275,
400
- "_source_version": "W/\"94f52f337ca0b4f45b6b9c56dcb43317895294a30d00ce62cf9376ab3bfddccf\"",
401
- "_fetched_at": "2026-04-25T10:28:30Z"
349
+ "batch_input": 0.55,
350
+ "batch_output": 2.2
351
+ },
352
+ "anthropic/claude-haiku-3-5": {
353
+ "input": 0.8,
354
+ "cache_write_input": 1.0,
355
+ "cache_read_input": 0.08,
356
+ "output": 4.0,
357
+ "batch_input": 0.4,
358
+ "batch_output": 2.0
359
+ },
360
+ "anthropic/claude-haiku-3": {
361
+ "input": 0.25,
362
+ "cache_write_input": 0.3,
363
+ "cache_read_input": 0.03,
364
+ "output": 1.25,
365
+ "batch_input": 0.125,
366
+ "batch_output": 0.625
367
+ },
368
+ "openai/o1-pro": {
369
+ "input": 150.0,
370
+ "output": 600.0,
371
+ "batch_input": 75.0,
372
+ "batch_output": 300.0
373
+ },
374
+ "openai/o3-pro": {
375
+ "input": 20.0,
376
+ "output": 80.0,
377
+ "batch_input": 10.0,
378
+ "batch_output": 40.0
379
+ },
380
+ "openai/gpt-5.3-chat-latest": {
381
+ "input": 1.75,
382
+ "output": 14.0,
383
+ "cache_read_input": 0.175
384
+ },
385
+ "openai/chatgpt-4o-latest": {
386
+ "input": 5.0,
387
+ "output": 15.0
388
+ },
389
+ "openai/gpt-5.3-codex": {
390
+ "input": 1.75,
391
+ "output": 14.0,
392
+ "cache_read_input": 0.175
393
+ },
394
+ "openai/codex-mini-latest": {
395
+ "input": 1.5,
396
+ "output": 6.0,
397
+ "cache_read_input": 0.375
402
398
  }
403
399
  }
404
400
  }