@yaks/model 0.0.0-stage → 0.2.36
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.
- package/LICENSE +202 -0
- package/README.md +868 -2
- package/_dist/afford.d.ts +69 -0
- package/_dist/afford.d.ts.map +1 -0
- package/_dist/attribute.d.ts +52 -0
- package/_dist/attribute.d.ts.map +1 -0
- package/_dist/batch.d.ts +28 -0
- package/_dist/batch.d.ts.map +1 -0
- package/_dist/cache.d.ts +15 -0
- package/_dist/cache.d.ts.map +1 -0
- package/_dist/deferred.d.ts +9 -0
- package/_dist/deferred.d.ts.map +1 -0
- package/_dist/graph.d.ts +3 -0
- package/_dist/graph.d.ts.map +1 -0
- package/_dist/image.d.ts +46 -0
- package/_dist/image.d.ts.map +1 -0
- package/_dist/inference.d.ts +58 -0
- package/_dist/inference.d.ts.map +1 -0
- package/_dist/limits.d.ts +142 -0
- package/_dist/limits.d.ts.map +1 -0
- package/_dist/media.d.ts +28 -0
- package/_dist/media.d.ts.map +1 -0
- package/_dist/message.d.ts +5 -0
- package/_dist/message.d.ts.map +1 -0
- package/_dist/mod.d.ts +298 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/offers.d.ts +19 -0
- package/_dist/offers.d.ts.map +1 -0
- package/_dist/onward.d.ts +77 -0
- package/_dist/onward.d.ts.map +1 -0
- package/_dist/prices.d.ts +27 -0
- package/_dist/prices.d.ts.map +1 -0
- package/_dist/provider.d.ts +49 -0
- package/_dist/provider.d.ts.map +1 -0
- package/_dist/results.d.ts +21 -0
- package/_dist/results.d.ts.map +1 -0
- package/_dist/route.d.ts +189 -0
- package/_dist/route.d.ts.map +1 -0
- package/_dist/sse.d.ts +4 -0
- package/_dist/sse.d.ts.map +1 -0
- package/_dist/stall.d.ts +47 -0
- package/_dist/stall.d.ts.map +1 -0
- package/_dist/step.d.ts +71 -0
- package/_dist/step.d.ts.map +1 -0
- package/_dist/submission.d.ts +7 -0
- package/_dist/submission.d.ts.map +1 -0
- package/_dist/vocab.d.ts +82 -0
- package/_dist/vocab.d.ts.map +1 -0
- package/_dist/windows.d.ts +6 -0
- package/_dist/windows.d.ts.map +1 -0
- package/afford.js +135 -0
- package/afford.js.map +1 -0
- package/afford.ts +208 -0
- package/attribute.js +109 -0
- package/attribute.js.map +1 -0
- package/attribute.ts +120 -0
- package/batch.js +8 -0
- package/batch.js.map +1 -0
- package/batch.ts +37 -0
- package/cache.js +28 -0
- package/cache.js.map +1 -0
- package/cache.ts +53 -0
- package/deferred.js +29 -0
- package/deferred.js.map +1 -0
- package/deferred.ts +54 -0
- package/deno.json +1 -0
- package/graph.js +8 -0
- package/graph.js.map +1 -0
- package/graph.ts +9 -0
- package/image.js +118 -0
- package/image.js.map +1 -0
- package/image.ts +108 -0
- package/inference.js +119 -0
- package/inference.js.map +1 -0
- package/inference.ts +223 -0
- package/limits.js +204 -0
- package/limits.js.map +1 -0
- package/limits.ts +230 -0
- package/media.js +76 -0
- package/media.js.map +1 -0
- package/media.ts +139 -0
- package/message.js +21 -0
- package/message.js.map +1 -0
- package/message.ts +17 -0
- package/mod.js +396 -0
- package/mod.js.map +1 -0
- package/mod.ts +695 -0
- package/offers.js +53 -0
- package/offers.js.map +1 -0
- package/offers.ts +84 -0
- package/onward.js +110 -0
- package/onward.js.map +1 -0
- package/onward.ts +123 -0
- package/package.json +53 -4
- package/prices.js +61 -0
- package/prices.js.map +1 -0
- package/prices.json +643 -0
- package/prices.ts +60 -0
- package/provider.js +6 -0
- package/provider.js.map +1 -0
- package/provider.ts +89 -0
- package/results.js +51 -0
- package/results.js.map +1 -0
- package/results.ts +47 -0
- package/route.js +263 -0
- package/route.js.map +1 -0
- package/route.ts +359 -0
- package/sse.js +71 -0
- package/sse.js.map +1 -0
- package/sse.ts +82 -0
- package/stall.js +166 -0
- package/stall.js.map +1 -0
- package/stall.ts +201 -0
- package/step.js +226 -0
- package/step.js.map +1 -0
- package/step.ts +265 -0
- package/submission.js +38 -0
- package/submission.js.map +1 -0
- package/submission.ts +38 -0
- package/vocab.js +83 -0
- package/vocab.js.map +1 -0
- package/vocab.json +613 -0
- package/vocab.ts +139 -0
- package/windows.js +35 -0
- package/windows.js.map +1 -0
- package/windows.ts +28 -0
package/prices.json
ADDED
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "https://openrouter.ai/api/v1/models",
|
|
3
|
+
"day": "2026-11-19",
|
|
4
|
+
"prices": {
|
|
5
|
+
"claude-fable-5": {
|
|
6
|
+
"input": 10,
|
|
7
|
+
"output": 50,
|
|
8
|
+
"cached": 1,
|
|
9
|
+
"cache_write": 12.5,
|
|
10
|
+
"web_search": 0.01,
|
|
11
|
+
"cache_write_1h": 20
|
|
12
|
+
},
|
|
13
|
+
"claude-fable-5-1": {
|
|
14
|
+
"input": 10,
|
|
15
|
+
"output": 50,
|
|
16
|
+
"cached": 0.25,
|
|
17
|
+
"cache_write": 12.5,
|
|
18
|
+
"web_search": 0.01,
|
|
19
|
+
"cache_write_1h": 20
|
|
20
|
+
},
|
|
21
|
+
"claude-fable-5-2": {
|
|
22
|
+
"input": 8,
|
|
23
|
+
"output": 40,
|
|
24
|
+
"cached": 0.2,
|
|
25
|
+
"cache_write": 10,
|
|
26
|
+
"web_search": 0.01,
|
|
27
|
+
"cache_write_1h": 16
|
|
28
|
+
},
|
|
29
|
+
"claude-haiku-4-5": {
|
|
30
|
+
"input": 1,
|
|
31
|
+
"output": 5,
|
|
32
|
+
"cached": 0.1,
|
|
33
|
+
"cache_write": 1.25,
|
|
34
|
+
"web_search": 0.01,
|
|
35
|
+
"cache_write_1h": 2
|
|
36
|
+
},
|
|
37
|
+
"claude-haiku-5-5": {
|
|
38
|
+
"input": 0.1,
|
|
39
|
+
"output": 0.5,
|
|
40
|
+
"cached": 0.01,
|
|
41
|
+
"cache_write": 0.125,
|
|
42
|
+
"web_search": 0.01,
|
|
43
|
+
"cache_write_1h": 0.2
|
|
44
|
+
},
|
|
45
|
+
"claude-opus-4-1": {
|
|
46
|
+
"input": 15,
|
|
47
|
+
"output": 75,
|
|
48
|
+
"cached": 1.5,
|
|
49
|
+
"cache_write": 18.75,
|
|
50
|
+
"web_search": 0.01,
|
|
51
|
+
"cache_write_1h": 30
|
|
52
|
+
},
|
|
53
|
+
"claude-opus-4-5": {
|
|
54
|
+
"input": 5,
|
|
55
|
+
"output": 25,
|
|
56
|
+
"cached": 0.5,
|
|
57
|
+
"cache_write": 6.25,
|
|
58
|
+
"web_search": 0.01,
|
|
59
|
+
"cache_write_1h": 10
|
|
60
|
+
},
|
|
61
|
+
"claude-opus-4-6": {
|
|
62
|
+
"input": 5,
|
|
63
|
+
"output": 25,
|
|
64
|
+
"cached": 0.5,
|
|
65
|
+
"cache_write": 6.25,
|
|
66
|
+
"web_search": 0.01,
|
|
67
|
+
"cache_write_1h": 10
|
|
68
|
+
},
|
|
69
|
+
"claude-opus-4-7": {
|
|
70
|
+
"input": 5,
|
|
71
|
+
"output": 25,
|
|
72
|
+
"cached": 0.5,
|
|
73
|
+
"cache_write": 6.25,
|
|
74
|
+
"web_search": 0.01,
|
|
75
|
+
"cache_write_1h": 10
|
|
76
|
+
},
|
|
77
|
+
"claude-opus-4-8": {
|
|
78
|
+
"input": 5,
|
|
79
|
+
"output": 25,
|
|
80
|
+
"cached": 0.5,
|
|
81
|
+
"cache_write": 6.25,
|
|
82
|
+
"web_search": 0.01,
|
|
83
|
+
"cache_write_1h": 10
|
|
84
|
+
},
|
|
85
|
+
"claude-opus-5": {
|
|
86
|
+
"input": 5,
|
|
87
|
+
"output": 25,
|
|
88
|
+
"cached": 0.5,
|
|
89
|
+
"cache_write": 6.25,
|
|
90
|
+
"web_search": 0.01,
|
|
91
|
+
"cache_write_1h": 10
|
|
92
|
+
},
|
|
93
|
+
"claude-opus-5-5": {
|
|
94
|
+
"input": 4,
|
|
95
|
+
"output": 20,
|
|
96
|
+
"cached": 0.2,
|
|
97
|
+
"cache_write": 5,
|
|
98
|
+
"web_search": 0.01,
|
|
99
|
+
"cache_write_1h": 8
|
|
100
|
+
},
|
|
101
|
+
"claude-sonnet-4-5": {
|
|
102
|
+
"input": 3,
|
|
103
|
+
"output": 15,
|
|
104
|
+
"cached": 0.3,
|
|
105
|
+
"cache_write": 3.75,
|
|
106
|
+
"web_search": 0.01,
|
|
107
|
+
"cache_write_1h": 6
|
|
108
|
+
},
|
|
109
|
+
"claude-sonnet-4-6": {
|
|
110
|
+
"input": 3,
|
|
111
|
+
"output": 15,
|
|
112
|
+
"cached": 0.3,
|
|
113
|
+
"cache_write": 3.75,
|
|
114
|
+
"web_search": 0.01,
|
|
115
|
+
"cache_write_1h": 6
|
|
116
|
+
},
|
|
117
|
+
"claude-sonnet-5": {
|
|
118
|
+
"input": 2,
|
|
119
|
+
"output": 10,
|
|
120
|
+
"cached": 0.2,
|
|
121
|
+
"cache_write": 2.5,
|
|
122
|
+
"web_search": 0.01,
|
|
123
|
+
"cache_write_1h": 4
|
|
124
|
+
},
|
|
125
|
+
"claude-sonnet-5-5": {
|
|
126
|
+
"input": 2,
|
|
127
|
+
"output": 10,
|
|
128
|
+
"cached": 0.1,
|
|
129
|
+
"cache_write": 2.5,
|
|
130
|
+
"web_search": 0.01,
|
|
131
|
+
"cache_write_1h": 4
|
|
132
|
+
},
|
|
133
|
+
"gpt-3.5-turbo-0613": {
|
|
134
|
+
"input": 1,
|
|
135
|
+
"output": 2
|
|
136
|
+
},
|
|
137
|
+
"gpt-3.5-turbo-16k": {
|
|
138
|
+
"input": 3,
|
|
139
|
+
"output": 4
|
|
140
|
+
},
|
|
141
|
+
"gpt-4": {
|
|
142
|
+
"input": 30,
|
|
143
|
+
"output": 60
|
|
144
|
+
},
|
|
145
|
+
"gpt-4.1": {
|
|
146
|
+
"input": 2,
|
|
147
|
+
"output": 8,
|
|
148
|
+
"cached": 0.5,
|
|
149
|
+
"web_search": 0.01
|
|
150
|
+
},
|
|
151
|
+
"gpt-4.1-mini": {
|
|
152
|
+
"input": 0.4,
|
|
153
|
+
"output": 1.6,
|
|
154
|
+
"cached": 0.1,
|
|
155
|
+
"web_search": 0.01
|
|
156
|
+
},
|
|
157
|
+
"gpt-4.1-nano": {
|
|
158
|
+
"input": 0.1,
|
|
159
|
+
"output": 0.4,
|
|
160
|
+
"cached": 0.03,
|
|
161
|
+
"web_search": 0.01
|
|
162
|
+
},
|
|
163
|
+
"gpt-4o": {
|
|
164
|
+
"input": 2.5,
|
|
165
|
+
"output": 10,
|
|
166
|
+
"cached": 1.25
|
|
167
|
+
},
|
|
168
|
+
"gpt-4o-2024-05-13": {
|
|
169
|
+
"input": 5,
|
|
170
|
+
"output": 15
|
|
171
|
+
},
|
|
172
|
+
"gpt-4o-2024-08-06": {
|
|
173
|
+
"input": 2.5,
|
|
174
|
+
"output": 10,
|
|
175
|
+
"cached": 1.25
|
|
176
|
+
},
|
|
177
|
+
"gpt-4o-2024-11-20": {
|
|
178
|
+
"input": 2.5,
|
|
179
|
+
"output": 10,
|
|
180
|
+
"cached": 1.25
|
|
181
|
+
},
|
|
182
|
+
"gpt-4o-mini": {
|
|
183
|
+
"input": 0.15,
|
|
184
|
+
"output": 0.6,
|
|
185
|
+
"cached": 0.075
|
|
186
|
+
},
|
|
187
|
+
"gpt-4o-mini-2024-07-18": {
|
|
188
|
+
"input": 0.15,
|
|
189
|
+
"output": 0.6,
|
|
190
|
+
"cached": 0.075
|
|
191
|
+
},
|
|
192
|
+
"gpt-5": {
|
|
193
|
+
"input": 1.25,
|
|
194
|
+
"output": 10,
|
|
195
|
+
"cached": 0.125,
|
|
196
|
+
"web_search": 0.01
|
|
197
|
+
},
|
|
198
|
+
"gpt-5-image": {
|
|
199
|
+
"input": 10,
|
|
200
|
+
"output": 10,
|
|
201
|
+
"cached": 1.25,
|
|
202
|
+
"web_search": 0.01
|
|
203
|
+
},
|
|
204
|
+
"gpt-5-image-mini": {
|
|
205
|
+
"input": 2.5,
|
|
206
|
+
"output": 2,
|
|
207
|
+
"cached": 0.25,
|
|
208
|
+
"web_search": 0.01
|
|
209
|
+
},
|
|
210
|
+
"gpt-5-mini": {
|
|
211
|
+
"input": 0.25,
|
|
212
|
+
"output": 2,
|
|
213
|
+
"cached": 0.025,
|
|
214
|
+
"web_search": 0.01
|
|
215
|
+
},
|
|
216
|
+
"gpt-5-nano": {
|
|
217
|
+
"input": 0.05,
|
|
218
|
+
"output": 0.4,
|
|
219
|
+
"cached": 0.005,
|
|
220
|
+
"web_search": 0.01
|
|
221
|
+
},
|
|
222
|
+
"gpt-5-pro": {
|
|
223
|
+
"input": 15,
|
|
224
|
+
"output": 120,
|
|
225
|
+
"web_search": 0.01
|
|
226
|
+
},
|
|
227
|
+
"gpt-5.1": {
|
|
228
|
+
"input": 1.25,
|
|
229
|
+
"output": 10,
|
|
230
|
+
"cached": 0.125,
|
|
231
|
+
"web_search": 0.01
|
|
232
|
+
},
|
|
233
|
+
"gpt-5.1-codex": {
|
|
234
|
+
"input": 1.25,
|
|
235
|
+
"output": 10,
|
|
236
|
+
"cached": 0.13,
|
|
237
|
+
"web_search": 0.01
|
|
238
|
+
},
|
|
239
|
+
"gpt-5.1-codex-max": {
|
|
240
|
+
"input": 1.25,
|
|
241
|
+
"output": 10,
|
|
242
|
+
"cached": 0.125,
|
|
243
|
+
"web_search": 0.01
|
|
244
|
+
},
|
|
245
|
+
"gpt-5.1-codex-mini": {
|
|
246
|
+
"input": 0.25,
|
|
247
|
+
"output": 2,
|
|
248
|
+
"cached": 0.03,
|
|
249
|
+
"web_search": 0.01
|
|
250
|
+
},
|
|
251
|
+
"gpt-5.2": {
|
|
252
|
+
"input": 1.75,
|
|
253
|
+
"output": 14,
|
|
254
|
+
"cached": 0.175,
|
|
255
|
+
"web_search": 0.01
|
|
256
|
+
},
|
|
257
|
+
"gpt-5.2-chat": {
|
|
258
|
+
"input": 1.75,
|
|
259
|
+
"output": 14,
|
|
260
|
+
"cached": 0.175,
|
|
261
|
+
"web_search": 0.01
|
|
262
|
+
},
|
|
263
|
+
"gpt-5.2-codex": {
|
|
264
|
+
"input": 1.75,
|
|
265
|
+
"output": 14,
|
|
266
|
+
"cached": 0.175,
|
|
267
|
+
"web_search": 0.01
|
|
268
|
+
},
|
|
269
|
+
"gpt-5.2-pro": {
|
|
270
|
+
"input": 21,
|
|
271
|
+
"output": 168,
|
|
272
|
+
"web_search": 0.01
|
|
273
|
+
},
|
|
274
|
+
"gpt-5.3-codex": {
|
|
275
|
+
"input": 1.75,
|
|
276
|
+
"output": 14,
|
|
277
|
+
"cached": 0.175,
|
|
278
|
+
"web_search": 0.01
|
|
279
|
+
},
|
|
280
|
+
"gpt-5.4": {
|
|
281
|
+
"input": 2.5,
|
|
282
|
+
"output": 15,
|
|
283
|
+
"cached": 0.25,
|
|
284
|
+
"web_search": 0.01
|
|
285
|
+
},
|
|
286
|
+
"gpt-5.4-image-2": {
|
|
287
|
+
"input": 8,
|
|
288
|
+
"output": 15,
|
|
289
|
+
"cached": 2,
|
|
290
|
+
"web_search": 0.01
|
|
291
|
+
},
|
|
292
|
+
"gpt-5.4-mini": {
|
|
293
|
+
"input": 0.75,
|
|
294
|
+
"output": 4.5,
|
|
295
|
+
"cached": 0.075,
|
|
296
|
+
"web_search": 0.01
|
|
297
|
+
},
|
|
298
|
+
"gpt-5.4-nano": {
|
|
299
|
+
"input": 0.2,
|
|
300
|
+
"output": 1.25,
|
|
301
|
+
"cached": 0.02,
|
|
302
|
+
"web_search": 0.01
|
|
303
|
+
},
|
|
304
|
+
"gpt-5.4-pro": {
|
|
305
|
+
"input": 30,
|
|
306
|
+
"output": 180,
|
|
307
|
+
"web_search": 0.01
|
|
308
|
+
},
|
|
309
|
+
"gpt-5.5": {
|
|
310
|
+
"input": 5,
|
|
311
|
+
"output": 30,
|
|
312
|
+
"cached": 0.5,
|
|
313
|
+
"web_search": 0.01
|
|
314
|
+
},
|
|
315
|
+
"gpt-5.5-pro": {
|
|
316
|
+
"input": 30,
|
|
317
|
+
"output": 180,
|
|
318
|
+
"web_search": 0.01
|
|
319
|
+
},
|
|
320
|
+
"gpt-5.6-luna": {
|
|
321
|
+
"input": 0.2,
|
|
322
|
+
"output": 1.2,
|
|
323
|
+
"cached": 0.02,
|
|
324
|
+
"cache_write": 0.25,
|
|
325
|
+
"cache_write_12h": 0.5,
|
|
326
|
+
"web_search": 0.01
|
|
327
|
+
},
|
|
328
|
+
"gpt-5.6-luna-pro": {
|
|
329
|
+
"input": 0.2,
|
|
330
|
+
"output": 1.2,
|
|
331
|
+
"cached": 0.02,
|
|
332
|
+
"cache_write": 0.25,
|
|
333
|
+
"cache_write_12h": 0.5,
|
|
334
|
+
"web_search": 0.01
|
|
335
|
+
},
|
|
336
|
+
"gpt-5.6-sol": {
|
|
337
|
+
"input": 4,
|
|
338
|
+
"output": 20,
|
|
339
|
+
"cached": 0.4,
|
|
340
|
+
"cache_write": 5,
|
|
341
|
+
"cache_write_12h": 10,
|
|
342
|
+
"web_search": 0.01
|
|
343
|
+
},
|
|
344
|
+
"gpt-5.6-sol-pro": {
|
|
345
|
+
"input": 4,
|
|
346
|
+
"output": 20,
|
|
347
|
+
"cached": 0.4,
|
|
348
|
+
"cache_write": 5,
|
|
349
|
+
"cache_write_12h": 10,
|
|
350
|
+
"web_search": 0.01
|
|
351
|
+
},
|
|
352
|
+
"gpt-5.6-terra": {
|
|
353
|
+
"input": 2,
|
|
354
|
+
"output": 12,
|
|
355
|
+
"cached": 0.2,
|
|
356
|
+
"cache_write": 2.5,
|
|
357
|
+
"cache_write_12h": 5,
|
|
358
|
+
"web_search": 0.01
|
|
359
|
+
},
|
|
360
|
+
"gpt-5.6-terra-pro": {
|
|
361
|
+
"input": 2,
|
|
362
|
+
"output": 12,
|
|
363
|
+
"cached": 0.2,
|
|
364
|
+
"cache_write": 2.5,
|
|
365
|
+
"cache_write_12h": 5,
|
|
366
|
+
"web_search": 0.01
|
|
367
|
+
},
|
|
368
|
+
"gpt-6-astra": {
|
|
369
|
+
"input": 10,
|
|
370
|
+
"output": 50,
|
|
371
|
+
"cached": 1,
|
|
372
|
+
"cache_write": 12.5,
|
|
373
|
+
"cache_write_12h": 25,
|
|
374
|
+
"web_search": 0.01
|
|
375
|
+
},
|
|
376
|
+
"gpt-6-astra-pro": {
|
|
377
|
+
"input": 10,
|
|
378
|
+
"output": 50,
|
|
379
|
+
"cached": 1,
|
|
380
|
+
"cache_write": 12.5,
|
|
381
|
+
"cache_write_12h": 25,
|
|
382
|
+
"web_search": 0.01
|
|
383
|
+
},
|
|
384
|
+
"gpt-6-luna": {
|
|
385
|
+
"input": 0.1,
|
|
386
|
+
"output": 0.5,
|
|
387
|
+
"cached": 0.01,
|
|
388
|
+
"cache_write": 0.125,
|
|
389
|
+
"cache_write_12h": 0.25,
|
|
390
|
+
"web_search": 0.01
|
|
391
|
+
},
|
|
392
|
+
"gpt-6-luna-pro": {
|
|
393
|
+
"input": 0.1,
|
|
394
|
+
"output": 0.5,
|
|
395
|
+
"cached": 0.01,
|
|
396
|
+
"cache_write": 0.125,
|
|
397
|
+
"cache_write_12h": 0.25,
|
|
398
|
+
"web_search": 0.01
|
|
399
|
+
},
|
|
400
|
+
"gpt-6-sol": {
|
|
401
|
+
"input": 2,
|
|
402
|
+
"output": 10,
|
|
403
|
+
"cached": 0.2,
|
|
404
|
+
"cache_write": 2.5,
|
|
405
|
+
"cache_write_12h": 5,
|
|
406
|
+
"web_search": 0.01
|
|
407
|
+
},
|
|
408
|
+
"gpt-6-sol-pro": {
|
|
409
|
+
"input": 2,
|
|
410
|
+
"output": 10,
|
|
411
|
+
"cached": 0.2,
|
|
412
|
+
"cache_write": 2.5,
|
|
413
|
+
"cache_write_12h": 5,
|
|
414
|
+
"web_search": 0.01
|
|
415
|
+
},
|
|
416
|
+
"gpt-6.1-sol": {
|
|
417
|
+
"input": 2,
|
|
418
|
+
"output": 10,
|
|
419
|
+
"cached": 0.1,
|
|
420
|
+
"cache_write": 2.5,
|
|
421
|
+
"cache_write_12h": 5,
|
|
422
|
+
"web_search": 0.01
|
|
423
|
+
},
|
|
424
|
+
"gpt-6.1-sol-pro": {
|
|
425
|
+
"input": 2,
|
|
426
|
+
"output": 10,
|
|
427
|
+
"cached": 0.1,
|
|
428
|
+
"cache_write": 2.5,
|
|
429
|
+
"cache_write_12h": 5,
|
|
430
|
+
"web_search": 0.01
|
|
431
|
+
},
|
|
432
|
+
"gpt-6.1-terra": {
|
|
433
|
+
"input": 1,
|
|
434
|
+
"output": 5,
|
|
435
|
+
"cached": 0.05,
|
|
436
|
+
"cache_write": 1.25,
|
|
437
|
+
"cache_write_12h": 2.5,
|
|
438
|
+
"web_search": 0.01
|
|
439
|
+
},
|
|
440
|
+
"gpt-6.1-terra-pro": {
|
|
441
|
+
"input": 1,
|
|
442
|
+
"output": 5,
|
|
443
|
+
"cached": 0.05,
|
|
444
|
+
"cache_write": 1.25,
|
|
445
|
+
"cache_write_12h": 2.5,
|
|
446
|
+
"web_search": 0.01
|
|
447
|
+
},
|
|
448
|
+
"gpt-6.2-astra": {
|
|
449
|
+
"input": 8,
|
|
450
|
+
"output": 40,
|
|
451
|
+
"cached": 0.4,
|
|
452
|
+
"cache_write": 10,
|
|
453
|
+
"cache_write_12h": 20,
|
|
454
|
+
"web_search": 0.01
|
|
455
|
+
},
|
|
456
|
+
"gpt-6.2-astra-pro": {
|
|
457
|
+
"input": 8,
|
|
458
|
+
"output": 40,
|
|
459
|
+
"cached": 0.4,
|
|
460
|
+
"cache_write": 10,
|
|
461
|
+
"cache_write_12h": 20,
|
|
462
|
+
"web_search": 0.01
|
|
463
|
+
},
|
|
464
|
+
"gpt-6.2-sol": {
|
|
465
|
+
"input": 2,
|
|
466
|
+
"output": 10,
|
|
467
|
+
"cached": 0.1,
|
|
468
|
+
"cache_write": 2.5,
|
|
469
|
+
"cache_write_12h": 5,
|
|
470
|
+
"web_search": 0.01
|
|
471
|
+
},
|
|
472
|
+
"gpt-6.2-sol-pro": {
|
|
473
|
+
"input": 2,
|
|
474
|
+
"output": 10,
|
|
475
|
+
"cached": 0.1,
|
|
476
|
+
"cache_write": 2.5,
|
|
477
|
+
"cache_write_12h": 5,
|
|
478
|
+
"web_search": 0.01
|
|
479
|
+
},
|
|
480
|
+
"gpt-audio": {
|
|
481
|
+
"input": 2.5,
|
|
482
|
+
"output": 10
|
|
483
|
+
},
|
|
484
|
+
"gpt-audio-mini": {
|
|
485
|
+
"input": 0.6,
|
|
486
|
+
"output": 2.4
|
|
487
|
+
},
|
|
488
|
+
"gpt-chat-latest": {
|
|
489
|
+
"input": 5,
|
|
490
|
+
"output": 30,
|
|
491
|
+
"cached": 0.5,
|
|
492
|
+
"web_search": 0.01
|
|
493
|
+
},
|
|
494
|
+
"gpt-oss-120b": {
|
|
495
|
+
"input": 0.15,
|
|
496
|
+
"output": 0.6,
|
|
497
|
+
"cached": 0.075
|
|
498
|
+
},
|
|
499
|
+
"gpt-oss-20b": {
|
|
500
|
+
"input": 0.018,
|
|
501
|
+
"output": 0.09,
|
|
502
|
+
"cached": 0.009
|
|
503
|
+
},
|
|
504
|
+
"gpt-oss-safeguard-20b": {
|
|
505
|
+
"input": 0.075,
|
|
506
|
+
"output": 0.3,
|
|
507
|
+
"cached": 0.0375
|
|
508
|
+
},
|
|
509
|
+
"grok-4.20": {
|
|
510
|
+
"input": 1.25,
|
|
511
|
+
"output": 2.5,
|
|
512
|
+
"cached": 0.2,
|
|
513
|
+
"web_search": 0.005
|
|
514
|
+
},
|
|
515
|
+
"grok-4.20-multi-agent": {
|
|
516
|
+
"input": 1.25,
|
|
517
|
+
"output": 2.5,
|
|
518
|
+
"cached": 0.2,
|
|
519
|
+
"web_search": 0.005
|
|
520
|
+
},
|
|
521
|
+
"grok-4.3": {
|
|
522
|
+
"input": 1.25,
|
|
523
|
+
"output": 2.5,
|
|
524
|
+
"cached": 0.2,
|
|
525
|
+
"web_search": 0.005
|
|
526
|
+
},
|
|
527
|
+
"grok-4.5": {
|
|
528
|
+
"input": 2,
|
|
529
|
+
"output": 6,
|
|
530
|
+
"cached": 0.3,
|
|
531
|
+
"web_search": 0.005
|
|
532
|
+
},
|
|
533
|
+
"grok-4.6": {
|
|
534
|
+
"input": 2,
|
|
535
|
+
"output": 6,
|
|
536
|
+
"cached": 0.5,
|
|
537
|
+
"web_search": 0.005
|
|
538
|
+
},
|
|
539
|
+
"grok-4.7": {
|
|
540
|
+
"input": 2,
|
|
541
|
+
"output": 6,
|
|
542
|
+
"cached": 0.5,
|
|
543
|
+
"web_search": 0.005
|
|
544
|
+
},
|
|
545
|
+
"o3": {
|
|
546
|
+
"input": 2,
|
|
547
|
+
"output": 8,
|
|
548
|
+
"cached": 0.5,
|
|
549
|
+
"web_search": 0.01
|
|
550
|
+
},
|
|
551
|
+
"o3-pro": {
|
|
552
|
+
"input": 20,
|
|
553
|
+
"output": 80,
|
|
554
|
+
"web_search": 0.01
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"labels": {
|
|
558
|
+
"claude-fable-5": "Fable 5",
|
|
559
|
+
"claude-fable-5-1": "Fable 5.1",
|
|
560
|
+
"claude-fable-5-2": "Fable 5.2",
|
|
561
|
+
"claude-haiku-4-5": "Haiku 4.5",
|
|
562
|
+
"claude-haiku-5-5": "Haiku 5.5",
|
|
563
|
+
"claude-opus-4-1": "Opus 4.1",
|
|
564
|
+
"claude-opus-4-5": "Opus 4.5",
|
|
565
|
+
"claude-opus-4-6": "Opus 4.6",
|
|
566
|
+
"claude-opus-4-7": "Opus 4.7",
|
|
567
|
+
"claude-opus-4-8": "Opus 4.8",
|
|
568
|
+
"claude-opus-5": "Opus 5",
|
|
569
|
+
"claude-opus-5-5": "Opus 5.5",
|
|
570
|
+
"claude-sonnet-4-5": "Sonnet 4.5",
|
|
571
|
+
"claude-sonnet-4-6": "Sonnet 4.6",
|
|
572
|
+
"claude-sonnet-5": "Sonnet 5",
|
|
573
|
+
"claude-sonnet-5-5": "Sonnet 5.5",
|
|
574
|
+
"gpt-3.5-turbo-0613": "GPT-3.5 Turbo (older v0613)",
|
|
575
|
+
"gpt-3.5-turbo-16k": "GPT-3.5 Turbo 16k",
|
|
576
|
+
"gpt-4": "GPT-4",
|
|
577
|
+
"gpt-4.1": "GPT-4.1",
|
|
578
|
+
"gpt-4.1-mini": "GPT-4.1 Mini",
|
|
579
|
+
"gpt-4.1-nano": "GPT-4.1 Nano",
|
|
580
|
+
"gpt-4o": "GPT-4o",
|
|
581
|
+
"gpt-4o-2024-05-13": "GPT-4o (2024-05-13)",
|
|
582
|
+
"gpt-4o-2024-08-06": "GPT-4o (2024-08-06)",
|
|
583
|
+
"gpt-4o-2024-11-20": "GPT-4o (2024-11-20)",
|
|
584
|
+
"gpt-4o-mini": "GPT-4o-mini",
|
|
585
|
+
"gpt-4o-mini-2024-07-18": "GPT-4o-mini (2024-07-18)",
|
|
586
|
+
"gpt-5": "GPT-5",
|
|
587
|
+
"gpt-5-image": "GPT-5 Image",
|
|
588
|
+
"gpt-5-image-mini": "GPT-5 Image Mini",
|
|
589
|
+
"gpt-5-mini": "GPT-5 Mini",
|
|
590
|
+
"gpt-5-nano": "GPT-5 Nano",
|
|
591
|
+
"gpt-5-pro": "GPT-5 Pro",
|
|
592
|
+
"gpt-5.1": "GPT-5.1",
|
|
593
|
+
"gpt-5.1-codex": "GPT-5.1-Codex",
|
|
594
|
+
"gpt-5.1-codex-max": "GPT-5.1-Codex-Max",
|
|
595
|
+
"gpt-5.1-codex-mini": "GPT-5.1-Codex-Mini",
|
|
596
|
+
"gpt-5.2": "GPT-5.2",
|
|
597
|
+
"gpt-5.2-chat": "GPT-5.2 Chat",
|
|
598
|
+
"gpt-5.2-codex": "GPT-5.2-Codex",
|
|
599
|
+
"gpt-5.2-pro": "GPT-5.2 Pro",
|
|
600
|
+
"gpt-5.3-codex": "GPT-5.3-Codex",
|
|
601
|
+
"gpt-5.4": "GPT-5.4",
|
|
602
|
+
"gpt-5.4-image-2": "GPT-5.4 Image 2",
|
|
603
|
+
"gpt-5.4-mini": "GPT-5.4 Mini",
|
|
604
|
+
"gpt-5.4-nano": "GPT-5.4 Nano",
|
|
605
|
+
"gpt-5.4-pro": "GPT-5.4 Pro",
|
|
606
|
+
"gpt-5.5": "GPT-5.5",
|
|
607
|
+
"gpt-5.5-pro": "GPT-5.5 Pro",
|
|
608
|
+
"gpt-5.6-luna": "GPT-5.6 Luna",
|
|
609
|
+
"gpt-5.6-luna-pro": "GPT-5.6 Luna Pro",
|
|
610
|
+
"gpt-5.6-sol": "GPT-5.6 Sol",
|
|
611
|
+
"gpt-5.6-sol-pro": "GPT-5.6 Sol Pro",
|
|
612
|
+
"gpt-5.6-terra": "GPT-5.6 Terra",
|
|
613
|
+
"gpt-5.6-terra-pro": "GPT-5.6 Terra Pro",
|
|
614
|
+
"gpt-6-astra": "GPT-6 Astra",
|
|
615
|
+
"gpt-6-astra-pro": "GPT-6 Astra Pro",
|
|
616
|
+
"gpt-6-luna": "GPT-6 Luna",
|
|
617
|
+
"gpt-6-luna-pro": "GPT-6 Luna Pro",
|
|
618
|
+
"gpt-6-sol": "GPT-6 Sol",
|
|
619
|
+
"gpt-6-sol-pro": "GPT-6 Sol Pro",
|
|
620
|
+
"gpt-6.1-sol": "GPT-6.1 Sol",
|
|
621
|
+
"gpt-6.1-sol-pro": "GPT-6.1 Sol Pro",
|
|
622
|
+
"gpt-6.1-terra": "GPT-6.1 Terra",
|
|
623
|
+
"gpt-6.1-terra-pro": "GPT-6.1 Terra Pro",
|
|
624
|
+
"gpt-6.2-astra": "GPT-6.2 Astra",
|
|
625
|
+
"gpt-6.2-astra-pro": "GPT-6.2 Astra Pro",
|
|
626
|
+
"gpt-6.2-sol": "GPT-6.2 Sol",
|
|
627
|
+
"gpt-6.2-sol-pro": "GPT-6.2 Sol Pro",
|
|
628
|
+
"gpt-audio": "GPT Audio",
|
|
629
|
+
"gpt-audio-mini": "GPT Audio Mini",
|
|
630
|
+
"gpt-chat-latest": "GPT Chat Latest",
|
|
631
|
+
"gpt-oss-120b": "gpt-oss-120b",
|
|
632
|
+
"gpt-oss-20b": "gpt-oss-20b",
|
|
633
|
+
"gpt-oss-safeguard-20b": "gpt-oss-safeguard-20b",
|
|
634
|
+
"grok-4.20": "Grok 4.20",
|
|
635
|
+
"grok-4.20-multi-agent": "Grok 4.20 Multi-Agent",
|
|
636
|
+
"grok-4.3": "Grok 4.3",
|
|
637
|
+
"grok-4.5": "Grok 4.5",
|
|
638
|
+
"grok-4.6": "Grok 4.6",
|
|
639
|
+
"grok-4.7": "Grok 4.7",
|
|
640
|
+
"o3": "o3",
|
|
641
|
+
"o3-pro": "o3 Pro"
|
|
642
|
+
}
|
|
643
|
+
}
|
package/prices.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// What a model costs at its vendor's list price, and what a person sees it
|
|
2
|
+
// called, by the name a request gives it, so a graph that meets a model for
|
|
3
|
+
// the first time can weigh what it spent and name it. The table is data,
|
|
4
|
+
// regenerated by bin/prices.ts from OpenRouter's public listing; a `price` or
|
|
5
|
+
// `label` on the model's own row is what a graph uses.
|
|
6
|
+
|
|
7
|
+
import table from './prices.json' with { type: 'json' }
|
|
8
|
+
import type { Price } from './vocab.ts'
|
|
9
|
+
|
|
10
|
+
let PRICES: Record<string, Price> = table.prices
|
|
11
|
+
let LABELS: Record<string, string> = table.labels
|
|
12
|
+
|
|
13
|
+
// What a name may carry beyond the model's own: a context window in brackets
|
|
14
|
+
// (`claude-opus-4-8[1m]`), then a release date (`claude-haiku-4-5-20251001`,
|
|
15
|
+
// `gpt-4o-2024-08-06`).
|
|
16
|
+
let EXTRA = [/\[[^\]]*\]$/, /-\d{8}$/, /-\d{4}-\d{2}-\d{2}$/]
|
|
17
|
+
|
|
18
|
+
// The entry `list` holds for the model `name` names, shed of what it carries
|
|
19
|
+
// beyond the model's own.
|
|
20
|
+
let listed = <T>(list: Record<string, T>, name: string): T | undefined => {
|
|
21
|
+
let at = name
|
|
22
|
+
for (let extra of [/^/, ...EXTRA]) {
|
|
23
|
+
at = at.replace(extra, '')
|
|
24
|
+
if (Object.hasOwn(list, at)) return list[at]
|
|
25
|
+
}
|
|
26
|
+
return undefined
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The list price of the model a request names, if the table holds it.
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { listPrice } from '@yaks/model'
|
|
34
|
+
* import { assertEquals } from '@std/assert'
|
|
35
|
+
*
|
|
36
|
+
* assertEquals(listPrice('claude-haiku-4-5-20251001'), listPrice('claude-haiku-4-5'))
|
|
37
|
+
* assertEquals(listPrice('no-such-model'), undefined)
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export let listPrice = (name: string): Price | undefined => listed(PRICES, name)
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* What the table calls the model a request names, its window said after it,
|
|
44
|
+
* if the table holds it.
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { listLabel } from '@yaks/model'
|
|
48
|
+
* import { assertEquals } from '@std/assert'
|
|
49
|
+
*
|
|
50
|
+
* assertEquals(listLabel('claude-sonnet-5-5'), 'Sonnet 5.5')
|
|
51
|
+
* assertEquals(listLabel('claude-opus-4-8[1m]'), 'Opus 4.8 1M')
|
|
52
|
+
* assertEquals(listLabel('gpt-6.2-sol'), 'GPT-6.2 Sol')
|
|
53
|
+
* assertEquals(listLabel('no-such-model'), undefined)
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export let listLabel = (name: string): string | undefined => {
|
|
57
|
+
let label = listed(LABELS, name)
|
|
58
|
+
let window = name.match(/\[([^\]]*)\]$/)?.[1]
|
|
59
|
+
return label && (window ? `${label} ${window.toUpperCase()}` : label)
|
|
60
|
+
}
|
package/provider.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// A provider as a plugin. A package that serves models exports `./provider`,
|
|
2
|
+
// and a host running conversations asks each plugin its config names for the
|
|
3
|
+
// models it serves, lending them what only the host has: its connections, the
|
|
4
|
+
// person's sign-ins, where generated media is kept and its settings. A plugin
|
|
5
|
+
// never says where it runs, and the host never names a provider.
|
|
6
|
+
//# sourceMappingURL=provider.js.map
|
package/provider.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sources":["./provider.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,iEAAiE"}
|