@llmgateway/models 0.0.1

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 (112) hide show
  1. package/dist/get-cheapest-from-available-providers.d.ts +30 -0
  2. package/dist/get-cheapest-from-available-providers.js +183 -0
  3. package/dist/get-cheapest-from-available-providers.js.map +1 -0
  4. package/dist/get-cheapest-model-for-provider.d.ts +2 -0
  5. package/dist/get-cheapest-model-for-provider.js +49 -0
  6. package/dist/get-cheapest-model-for-provider.js.map +1 -0
  7. package/dist/get-provider-endpoint.d.ts +3 -0
  8. package/dist/get-provider-endpoint.js +243 -0
  9. package/dist/get-provider-endpoint.js.map +1 -0
  10. package/dist/get-provider-headers.d.ts +5 -0
  11. package/dist/get-provider-headers.js +45 -0
  12. package/dist/get-provider-headers.js.map +1 -0
  13. package/dist/helpers.d.ts +1 -0
  14. package/dist/helpers.js +27 -0
  15. package/dist/helpers.js.map +1 -0
  16. package/dist/index.d.ts +16 -0
  17. package/dist/index.js +17 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/models/alibaba.d.ts +686 -0
  20. package/dist/models/alibaba.js +789 -0
  21. package/dist/models/alibaba.js.map +1 -0
  22. package/dist/models/anthropic.d.ts +572 -0
  23. package/dist/models/anthropic.js +638 -0
  24. package/dist/models/anthropic.js.map +1 -0
  25. package/dist/models/aws-bedrock.d.ts +1 -0
  26. package/dist/models/aws-bedrock.js +2 -0
  27. package/dist/models/aws-bedrock.js.map +1 -0
  28. package/dist/models/bytedance.d.ts +131 -0
  29. package/dist/models/bytedance.js +151 -0
  30. package/dist/models/bytedance.js.map +1 -0
  31. package/dist/models/deepseek.d.ts +175 -0
  32. package/dist/models/deepseek.js +197 -0
  33. package/dist/models/deepseek.js.map +1 -0
  34. package/dist/models/google.d.ts +1065 -0
  35. package/dist/models/google.js +1201 -0
  36. package/dist/models/google.js.map +1 -0
  37. package/dist/models/llmgateway.d.ts +39 -0
  38. package/dist/models/llmgateway.js +59 -0
  39. package/dist/models/llmgateway.js.map +1 -0
  40. package/dist/models/meta.d.ts +263 -0
  41. package/dist/models/meta.js +300 -0
  42. package/dist/models/meta.js.map +1 -0
  43. package/dist/models/microsoft.d.ts +1 -0
  44. package/dist/models/microsoft.js +2 -0
  45. package/dist/models/microsoft.js.map +1 -0
  46. package/dist/models/minimax.d.ts +59 -0
  47. package/dist/models/minimax.js +68 -0
  48. package/dist/models/minimax.js.map +1 -0
  49. package/dist/models/mistral.d.ts +78 -0
  50. package/dist/models/mistral.js +92 -0
  51. package/dist/models/mistral.js.map +1 -0
  52. package/dist/models/moonshot.d.ts +165 -0
  53. package/dist/models/moonshot.js +184 -0
  54. package/dist/models/moonshot.js.map +1 -0
  55. package/dist/models/nousresearch.d.ts +21 -0
  56. package/dist/models/nousresearch.js +26 -0
  57. package/dist/models/nousresearch.js.map +1 -0
  58. package/dist/models/openai.d.ts +1018 -0
  59. package/dist/models/openai.js +1213 -0
  60. package/dist/models/openai.js.map +1 -0
  61. package/dist/models/perplexity.d.ts +67 -0
  62. package/dist/models/perplexity.js +78 -0
  63. package/dist/models/perplexity.js.map +1 -0
  64. package/dist/models/routeway.d.ts +161 -0
  65. package/dist/models/routeway.js +187 -0
  66. package/dist/models/routeway.js.map +1 -0
  67. package/dist/models/xai.d.ts +270 -0
  68. package/dist/models/xai.js +311 -0
  69. package/dist/models/xai.js.map +1 -0
  70. package/dist/models/zai.d.ts +492 -0
  71. package/dist/models/zai.js +551 -0
  72. package/dist/models/zai.js.map +1 -0
  73. package/dist/models.d.ts +5304 -0
  74. package/dist/models.js +37 -0
  75. package/dist/models.js.map +1 -0
  76. package/dist/models.spec.d.ts +1 -0
  77. package/dist/models.spec.js +263 -0
  78. package/dist/models.spec.js.map +1 -0
  79. package/dist/prepare-request-body.d.ts +10 -0
  80. package/dist/prepare-request-body.js +1081 -0
  81. package/dist/prepare-request-body.js.map +1 -0
  82. package/dist/prepare-request-body.spec.d.ts +1 -0
  83. package/dist/prepare-request-body.spec.js +231 -0
  84. package/dist/prepare-request-body.spec.js.map +1 -0
  85. package/dist/process-image-url.d.ts +4 -0
  86. package/dist/process-image-url.js +121 -0
  87. package/dist/process-image-url.js.map +1 -0
  88. package/dist/provider.d.ts +9 -0
  89. package/dist/provider.js +64 -0
  90. package/dist/provider.js.map +1 -0
  91. package/dist/providers.d.ts +405 -0
  92. package/dist/providers.js +413 -0
  93. package/dist/providers.js.map +1 -0
  94. package/dist/testing.d.ts +7 -0
  95. package/dist/testing.js +19 -0
  96. package/dist/testing.js.map +1 -0
  97. package/dist/transform-anthropic-messages.d.ts +2 -0
  98. package/dist/transform-anthropic-messages.js +185 -0
  99. package/dist/transform-anthropic-messages.js.map +1 -0
  100. package/dist/transform-google-messages.d.ts +25 -0
  101. package/dist/transform-google-messages.js +122 -0
  102. package/dist/transform-google-messages.js.map +1 -0
  103. package/dist/type-guards.d.ts +20 -0
  104. package/dist/type-guards.js +35 -0
  105. package/dist/type-guards.js.map +1 -0
  106. package/dist/types.d.ts +291 -0
  107. package/dist/types.js +28 -0
  108. package/dist/types.js.map +1 -0
  109. package/dist/validate-provider-key.d.ts +4 -0
  110. package/dist/validate-provider-key.js +113 -0
  111. package/dist/validate-provider-key.js.map +1 -0
  112. package/package.json +29 -0
@@ -0,0 +1,270 @@
1
+ export declare const xaiModels: [{
2
+ readonly id: "grok-3";
3
+ readonly name: "Grok-3";
4
+ readonly description: "xAI's advanced model with strong reasoning capabilities.";
5
+ readonly family: "xai";
6
+ readonly releasedAt: Date;
7
+ readonly providers: [{
8
+ readonly test: "skip";
9
+ readonly providerId: "xai";
10
+ readonly modelName: "grok-3";
11
+ readonly inputPrice: number;
12
+ readonly outputPrice: number;
13
+ readonly requestPrice: 0;
14
+ readonly contextSize: 131072;
15
+ readonly maxOutput: undefined;
16
+ readonly streaming: true;
17
+ readonly vision: false;
18
+ readonly tools: true;
19
+ readonly jsonOutput: true;
20
+ }];
21
+ }, {
22
+ readonly id: "grok-3-mini";
23
+ readonly name: "Grok-3 Mini";
24
+ readonly description: "Compact Grok-3 for fast, cost-effective inference.";
25
+ readonly family: "xai";
26
+ readonly releasedAt: Date;
27
+ readonly providers: [{
28
+ readonly providerId: "xai";
29
+ readonly modelName: "grok-3-mini";
30
+ readonly inputPrice: number;
31
+ readonly outputPrice: number;
32
+ readonly requestPrice: 0;
33
+ readonly contextSize: 131072;
34
+ readonly maxOutput: undefined;
35
+ readonly streaming: true;
36
+ readonly vision: false;
37
+ readonly tools: true;
38
+ readonly jsonOutput: true;
39
+ }];
40
+ }, {
41
+ readonly id: "grok-3-fast";
42
+ readonly name: "Grok-3 Fast";
43
+ readonly description: "Optimized Grok-3 variant for lower latency.";
44
+ readonly family: "xai";
45
+ readonly releasedAt: Date;
46
+ readonly providers: [{
47
+ readonly test: "skip";
48
+ readonly providerId: "xai";
49
+ readonly modelName: "grok-3-fast";
50
+ readonly inputPrice: number;
51
+ readonly outputPrice: number;
52
+ readonly requestPrice: 0;
53
+ readonly contextSize: 131072;
54
+ readonly maxOutput: undefined;
55
+ readonly streaming: true;
56
+ readonly vision: false;
57
+ readonly tools: true;
58
+ readonly jsonOutput: true;
59
+ readonly deprecatedAt: Date;
60
+ readonly deactivatedAt: Date;
61
+ }];
62
+ }, {
63
+ readonly id: "grok-3-mini-fast";
64
+ readonly name: "Grok-3 Mini Fast";
65
+ readonly description: "Fastest Grok-3 Mini variant.";
66
+ readonly family: "xai";
67
+ readonly releasedAt: Date;
68
+ readonly providers: [{
69
+ readonly providerId: "xai";
70
+ readonly modelName: "grok-3-mini-fast";
71
+ readonly inputPrice: number;
72
+ readonly outputPrice: number;
73
+ readonly requestPrice: 0;
74
+ readonly contextSize: 131072;
75
+ readonly maxOutput: undefined;
76
+ readonly streaming: true;
77
+ readonly vision: false;
78
+ readonly tools: true;
79
+ readonly jsonOutput: true;
80
+ readonly deprecatedAt: Date;
81
+ readonly deactivatedAt: Date;
82
+ }];
83
+ }, {
84
+ readonly id: "grok-2-1212";
85
+ readonly name: "Grok-2 (1212)";
86
+ readonly description: "December 2024 version of Grok-2.";
87
+ readonly family: "xai";
88
+ readonly releasedAt: Date;
89
+ readonly providers: [{
90
+ readonly test: "skip";
91
+ readonly providerId: "xai";
92
+ readonly modelName: "grok-2-1212";
93
+ readonly inputPrice: number;
94
+ readonly outputPrice: number;
95
+ readonly requestPrice: 0;
96
+ readonly contextSize: 131072;
97
+ readonly maxOutput: undefined;
98
+ readonly streaming: true;
99
+ readonly vision: false;
100
+ readonly tools: true;
101
+ readonly jsonOutput: true;
102
+ readonly deprecatedAt: Date;
103
+ readonly deactivatedAt: Date;
104
+ }];
105
+ }, {
106
+ readonly id: "grok-2-vision-1212";
107
+ readonly name: "Grok-2 Vision (1212)";
108
+ readonly description: "Grok-2 with vision capabilities.";
109
+ readonly family: "xai";
110
+ readonly releasedAt: Date;
111
+ readonly providers: [{
112
+ readonly providerId: "xai";
113
+ readonly modelName: "grok-2-vision-1212";
114
+ readonly inputPrice: number;
115
+ readonly outputPrice: number;
116
+ readonly requestPrice: 0;
117
+ readonly imageInputPrice: number;
118
+ readonly contextSize: 32768;
119
+ readonly maxOutput: undefined;
120
+ readonly streaming: true;
121
+ readonly vision: true;
122
+ readonly tools: true;
123
+ readonly jsonOutput: true;
124
+ readonly deprecatedAt: Date;
125
+ readonly deactivatedAt: Date;
126
+ }];
127
+ }, {
128
+ readonly id: "grok-4-0709";
129
+ readonly name: "Grok 4 (0709)";
130
+ readonly description: "July 2025 version of Grok 4.";
131
+ readonly family: "xai";
132
+ readonly releasedAt: Date;
133
+ readonly providers: [{
134
+ readonly test: "skip";
135
+ readonly providerId: "xai";
136
+ readonly modelName: "grok-4-0709";
137
+ readonly inputPrice: number;
138
+ readonly outputPrice: number;
139
+ readonly requestPrice: 0;
140
+ readonly imageInputPrice: undefined;
141
+ readonly contextSize: 256000;
142
+ readonly maxOutput: 256000;
143
+ readonly streaming: true;
144
+ readonly vision: false;
145
+ readonly tools: true;
146
+ readonly jsonOutput: true;
147
+ }];
148
+ }, {
149
+ readonly id: "grok-4";
150
+ readonly name: "Grok 4";
151
+ readonly description: "Latest Grok 4 with vision and tool support.";
152
+ readonly family: "xai";
153
+ readonly releasedAt: Date;
154
+ readonly providers: [{
155
+ readonly providerId: "xai";
156
+ readonly modelName: "grok-4";
157
+ readonly inputPrice: number;
158
+ readonly outputPrice: number;
159
+ readonly requestPrice: 0;
160
+ readonly imageInputPrice: undefined;
161
+ readonly contextSize: 256000;
162
+ readonly maxOutput: 256000;
163
+ readonly streaming: true;
164
+ readonly vision: true;
165
+ readonly tools: true;
166
+ readonly jsonOutput: true;
167
+ }];
168
+ }, {
169
+ readonly id: "grok-4-fast-reasoning";
170
+ readonly name: "Grok 4 Fast Reasoning";
171
+ readonly description: "Grok 4 optimized for fast reasoning.";
172
+ readonly family: "xai";
173
+ readonly releasedAt: Date;
174
+ readonly providers: [{
175
+ readonly providerId: "xai";
176
+ readonly modelName: "grok-4-fast-reasoning";
177
+ readonly inputPrice: number;
178
+ readonly outputPrice: number;
179
+ readonly cachedInputPrice: number;
180
+ readonly requestPrice: 0;
181
+ readonly imageInputPrice: undefined;
182
+ readonly contextSize: 2000000;
183
+ readonly maxOutput: undefined;
184
+ readonly streaming: true;
185
+ readonly vision: true;
186
+ readonly tools: true;
187
+ readonly jsonOutput: true;
188
+ }];
189
+ }, {
190
+ readonly id: "grok-4-fast-non-reasoning";
191
+ readonly name: "Grok 4 Fast Non-Reasoning";
192
+ readonly description: "Grok 4 without reasoning for faster responses.";
193
+ readonly family: "xai";
194
+ readonly releasedAt: Date;
195
+ readonly providers: [{
196
+ readonly providerId: "xai";
197
+ readonly modelName: "grok-4-fast-non-reasoning";
198
+ readonly inputPrice: number;
199
+ readonly outputPrice: number;
200
+ readonly cachedInputPrice: number;
201
+ readonly requestPrice: 0;
202
+ readonly imageInputPrice: undefined;
203
+ readonly contextSize: 2000000;
204
+ readonly maxOutput: undefined;
205
+ readonly streaming: true;
206
+ readonly vision: true;
207
+ readonly tools: true;
208
+ readonly jsonOutput: true;
209
+ }];
210
+ }, {
211
+ readonly id: "grok-code-fast-1";
212
+ readonly name: "Grok Code Fast 1";
213
+ readonly description: "Grok optimized for code generation tasks.";
214
+ readonly family: "xai";
215
+ readonly releasedAt: Date;
216
+ readonly providers: [{
217
+ readonly test: "skip";
218
+ readonly providerId: "xai";
219
+ readonly modelName: "grok-code-fast-1";
220
+ readonly inputPrice: number;
221
+ readonly outputPrice: number;
222
+ readonly requestPrice: 0;
223
+ readonly contextSize: 256000;
224
+ readonly maxOutput: 10000;
225
+ readonly streaming: true;
226
+ readonly vision: false;
227
+ readonly tools: true;
228
+ readonly jsonOutput: true;
229
+ }];
230
+ }, {
231
+ readonly id: "grok-4-1-fast-reasoning";
232
+ readonly name: "Grok 4.1 Fast Reasoning";
233
+ readonly description: "Grok 4.1 with fast reasoning and vision support.";
234
+ readonly family: "xai";
235
+ readonly releasedAt: Date;
236
+ readonly providers: [{
237
+ readonly providerId: "xai";
238
+ readonly modelName: "grok-4-1-fast-reasoning";
239
+ readonly inputPrice: number;
240
+ readonly outputPrice: number;
241
+ readonly requestPrice: 0;
242
+ readonly imageInputPrice: undefined;
243
+ readonly contextSize: 2000000;
244
+ readonly maxOutput: undefined;
245
+ readonly streaming: true;
246
+ readonly vision: true;
247
+ readonly tools: true;
248
+ readonly jsonOutput: true;
249
+ }];
250
+ }, {
251
+ readonly id: "grok-4-1-fast-non-reasoning";
252
+ readonly name: "Grok 4.1 Fast Non-Reasoning";
253
+ readonly description: "Grok 4.1 without reasoning mode.";
254
+ readonly family: "xai";
255
+ readonly releasedAt: Date;
256
+ readonly providers: [{
257
+ readonly providerId: "xai";
258
+ readonly modelName: "grok-4-1-fast-non-reasoning";
259
+ readonly inputPrice: number;
260
+ readonly outputPrice: number;
261
+ readonly requestPrice: 0;
262
+ readonly imageInputPrice: undefined;
263
+ readonly contextSize: 2000000;
264
+ readonly maxOutput: undefined;
265
+ readonly streaming: true;
266
+ readonly vision: true;
267
+ readonly tools: true;
268
+ readonly jsonOutput: true;
269
+ }];
270
+ }];
@@ -0,0 +1,311 @@
1
+ export const xaiModels = [
2
+ {
3
+ id: "grok-3",
4
+ name: "Grok-3",
5
+ description: "xAI's advanced model with strong reasoning capabilities.",
6
+ family: "xai",
7
+ releasedAt: new Date("2025-02-17"),
8
+ providers: [
9
+ {
10
+ test: "skip",
11
+ providerId: "xai",
12
+ modelName: "grok-3",
13
+ inputPrice: 3.0 / 1e6,
14
+ outputPrice: 15.0 / 1e6,
15
+ requestPrice: 0,
16
+ contextSize: 131072,
17
+ maxOutput: undefined,
18
+ streaming: true,
19
+ vision: false,
20
+ tools: true,
21
+ jsonOutput: true,
22
+ },
23
+ ],
24
+ },
25
+ {
26
+ id: "grok-3-mini",
27
+ name: "Grok-3 Mini",
28
+ description: "Compact Grok-3 for fast, cost-effective inference.",
29
+ family: "xai",
30
+ releasedAt: new Date("2025-04-09"),
31
+ providers: [
32
+ {
33
+ providerId: "xai",
34
+ modelName: "grok-3-mini",
35
+ inputPrice: 0.3 / 1e6,
36
+ outputPrice: 0.5 / 1e6,
37
+ requestPrice: 0,
38
+ contextSize: 131072,
39
+ maxOutput: undefined,
40
+ streaming: true,
41
+ vision: false,
42
+ tools: true,
43
+ jsonOutput: true,
44
+ },
45
+ ],
46
+ },
47
+ {
48
+ id: "grok-3-fast",
49
+ name: "Grok-3 Fast",
50
+ description: "Optimized Grok-3 variant for lower latency.",
51
+ family: "xai",
52
+ releasedAt: new Date("2025-05-22"),
53
+ providers: [
54
+ {
55
+ test: "skip",
56
+ providerId: "xai",
57
+ modelName: "grok-3-fast",
58
+ inputPrice: 5.0 / 1e6,
59
+ outputPrice: 25.0 / 1e6,
60
+ requestPrice: 0,
61
+ contextSize: 131072,
62
+ maxOutput: undefined,
63
+ streaming: true,
64
+ vision: false,
65
+ tools: true,
66
+ jsonOutput: true,
67
+ deprecatedAt: new Date("2025-08-08"),
68
+ deactivatedAt: new Date("2025-09-15"),
69
+ },
70
+ ],
71
+ },
72
+ {
73
+ id: "grok-3-mini-fast",
74
+ name: "Grok-3 Mini Fast",
75
+ description: "Fastest Grok-3 Mini variant.",
76
+ family: "xai",
77
+ releasedAt: new Date("2025-02-17"),
78
+ providers: [
79
+ {
80
+ providerId: "xai",
81
+ modelName: "grok-3-mini-fast",
82
+ inputPrice: 0.6 / 1e6,
83
+ outputPrice: 4.0 / 1e6,
84
+ requestPrice: 0,
85
+ contextSize: 131072,
86
+ maxOutput: undefined,
87
+ streaming: true,
88
+ vision: false,
89
+ tools: true,
90
+ jsonOutput: true,
91
+ deprecatedAt: new Date("2025-08-08"),
92
+ deactivatedAt: new Date("2025-09-15"),
93
+ },
94
+ ],
95
+ },
96
+ {
97
+ id: "grok-2-1212",
98
+ name: "Grok-2 (1212)",
99
+ description: "December 2024 version of Grok-2.",
100
+ family: "xai",
101
+ releasedAt: new Date("2024-12-12"),
102
+ providers: [
103
+ {
104
+ test: "skip",
105
+ providerId: "xai",
106
+ modelName: "grok-2-1212",
107
+ inputPrice: 2.0 / 1e6,
108
+ outputPrice: 10.0 / 1e6,
109
+ requestPrice: 0,
110
+ contextSize: 131072,
111
+ maxOutput: undefined,
112
+ streaming: true,
113
+ vision: false,
114
+ tools: true,
115
+ jsonOutput: true,
116
+ deprecatedAt: new Date("2025-08-08"),
117
+ deactivatedAt: new Date("2025-09-15"),
118
+ },
119
+ ],
120
+ },
121
+ {
122
+ id: "grok-2-vision-1212",
123
+ name: "Grok-2 Vision (1212)",
124
+ description: "Grok-2 with vision capabilities.",
125
+ family: "xai",
126
+ releasedAt: new Date("2024-12-14"),
127
+ providers: [
128
+ {
129
+ providerId: "xai",
130
+ modelName: "grok-2-vision-1212",
131
+ inputPrice: 2.0 / 1e6,
132
+ outputPrice: 10.0 / 1e6,
133
+ requestPrice: 0,
134
+ imageInputPrice: 2.0 / 1e6,
135
+ contextSize: 32768,
136
+ maxOutput: undefined,
137
+ streaming: true,
138
+ vision: true,
139
+ tools: true,
140
+ jsonOutput: true,
141
+ deprecatedAt: new Date("2025-08-08"),
142
+ deactivatedAt: new Date("2025-09-15"),
143
+ },
144
+ ],
145
+ },
146
+ {
147
+ id: "grok-4-0709",
148
+ name: "Grok 4 (0709)",
149
+ description: "July 2025 version of Grok 4.",
150
+ family: "xai",
151
+ releasedAt: new Date("2025-07-09"),
152
+ providers: [
153
+ {
154
+ test: "skip",
155
+ providerId: "xai",
156
+ modelName: "grok-4-0709",
157
+ inputPrice: 3.0 / 1e6,
158
+ outputPrice: 15.0 / 1e6,
159
+ requestPrice: 0,
160
+ imageInputPrice: undefined,
161
+ contextSize: 256000,
162
+ maxOutput: 256000,
163
+ streaming: true,
164
+ vision: false,
165
+ tools: true,
166
+ jsonOutput: true,
167
+ },
168
+ ],
169
+ },
170
+ {
171
+ id: "grok-4",
172
+ name: "Grok 4",
173
+ description: "Latest Grok 4 with vision and tool support.",
174
+ family: "xai",
175
+ releasedAt: new Date("2025-07-09"),
176
+ providers: [
177
+ {
178
+ providerId: "xai",
179
+ modelName: "grok-4",
180
+ inputPrice: 3.0 / 1e6,
181
+ outputPrice: 15.0 / 1e6,
182
+ requestPrice: 0,
183
+ imageInputPrice: undefined,
184
+ contextSize: 256000,
185
+ maxOutput: 256000,
186
+ streaming: true,
187
+ vision: true,
188
+ tools: true,
189
+ jsonOutput: true,
190
+ },
191
+ ],
192
+ },
193
+ {
194
+ id: "grok-4-fast-reasoning",
195
+ name: "Grok 4 Fast Reasoning",
196
+ description: "Grok 4 optimized for fast reasoning.",
197
+ family: "xai",
198
+ releasedAt: new Date("2025-07-09"),
199
+ providers: [
200
+ {
201
+ providerId: "xai",
202
+ modelName: "grok-4-fast-reasoning",
203
+ inputPrice: 0.4 / 1e6,
204
+ outputPrice: 1.0 / 1e6,
205
+ cachedInputPrice: 0.05 / 1e6,
206
+ requestPrice: 0,
207
+ imageInputPrice: undefined,
208
+ contextSize: 2_000_000,
209
+ maxOutput: undefined,
210
+ streaming: true,
211
+ vision: true,
212
+ tools: true,
213
+ jsonOutput: true,
214
+ },
215
+ ],
216
+ },
217
+ {
218
+ id: "grok-4-fast-non-reasoning",
219
+ name: "Grok 4 Fast Non-Reasoning",
220
+ description: "Grok 4 without reasoning for faster responses.",
221
+ family: "xai",
222
+ releasedAt: new Date("2025-10-10"),
223
+ providers: [
224
+ {
225
+ providerId: "xai",
226
+ modelName: "grok-4-fast-non-reasoning",
227
+ inputPrice: 0.4 / 1e6,
228
+ outputPrice: 1.0 / 1e6,
229
+ cachedInputPrice: 0.05 / 1e6,
230
+ requestPrice: 0,
231
+ imageInputPrice: undefined,
232
+ contextSize: 2_000_000,
233
+ maxOutput: undefined,
234
+ streaming: true,
235
+ vision: true,
236
+ tools: true,
237
+ jsonOutput: true,
238
+ },
239
+ ],
240
+ },
241
+ {
242
+ id: "grok-code-fast-1",
243
+ name: "Grok Code Fast 1",
244
+ description: "Grok optimized for code generation tasks.",
245
+ family: "xai",
246
+ releasedAt: new Date("2025-08-28"),
247
+ providers: [
248
+ {
249
+ test: "skip",
250
+ providerId: "xai",
251
+ modelName: "grok-code-fast-1",
252
+ inputPrice: 0.2 / 1e6,
253
+ outputPrice: 1.5 / 1e6,
254
+ requestPrice: 0,
255
+ contextSize: 256000,
256
+ maxOutput: 10000,
257
+ streaming: true,
258
+ vision: false,
259
+ tools: true,
260
+ jsonOutput: true,
261
+ },
262
+ ],
263
+ },
264
+ {
265
+ id: "grok-4-1-fast-reasoning",
266
+ name: "Grok 4.1 Fast Reasoning",
267
+ description: "Grok 4.1 with fast reasoning and vision support.",
268
+ family: "xai",
269
+ releasedAt: new Date("2025-11-19"),
270
+ providers: [
271
+ {
272
+ providerId: "xai",
273
+ modelName: "grok-4-1-fast-reasoning",
274
+ inputPrice: 3.0 / 1e6,
275
+ outputPrice: 15.0 / 1e6,
276
+ requestPrice: 0,
277
+ imageInputPrice: undefined,
278
+ contextSize: 2_000_000,
279
+ maxOutput: undefined,
280
+ streaming: true,
281
+ vision: true,
282
+ tools: true,
283
+ jsonOutput: true,
284
+ },
285
+ ],
286
+ },
287
+ {
288
+ id: "grok-4-1-fast-non-reasoning",
289
+ name: "Grok 4.1 Fast Non-Reasoning",
290
+ description: "Grok 4.1 without reasoning mode.",
291
+ family: "xai",
292
+ releasedAt: new Date("2025-11-19"),
293
+ providers: [
294
+ {
295
+ providerId: "xai",
296
+ modelName: "grok-4-1-fast-non-reasoning",
297
+ inputPrice: 3.0 / 1e6,
298
+ outputPrice: 15.0 / 1e6,
299
+ requestPrice: 0,
300
+ imageInputPrice: undefined,
301
+ contextSize: 2_000_000,
302
+ maxOutput: undefined,
303
+ streaming: true,
304
+ vision: true,
305
+ tools: true,
306
+ jsonOutput: true,
307
+ },
308
+ ],
309
+ },
310
+ ];
311
+ //# sourceMappingURL=xai.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xai.js","sourceRoot":"","sources":["../../src/models/xai.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB;QACC,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,0DAA0D;QACvE,MAAM,EAAE,KAAK;QACb,UAAU,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;QAClC,SAAS,EAAE;YACV;gBACC,IAAI,EAAE,MAAM;gBACZ,UAAU,EAAE,KAAK;gBACjB,SAAS,EAAE,QAAQ;gBACnB,UAAU,EAAE,GAAG,GAAG,GAAG;gBACrB,WAAW,EAAE,IAAI,GAAG,GAAG;gBACvB,YAAY,EAAE,CAAC;gBACf,WAAW,EAAE,MAAM;gBACnB,SAAS,EAAE,SAAS;gBACpB,SAAS,EAAE,IAAI;gBACf,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,IAAI;gBACX,UAAU,EAAE,IAAI;aAChB;SACD;KACD;IACD;QACC,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,oDAAoD;QACjE,MAAM,EAAE,KAAK;QACb,UAAU,EAAE,IAAI,IAAI,CAAC,YA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