@@ -6,152 +6,68 @@ export type XAIModelId = keyof typeof xaiModels
66export const xaiDefaultModelId : XAIModelId = "grok-3"
77
88export const xaiModels = {
9- "grok-3-beta" : {
10- maxTokens : 8192 ,
11- contextWindow : 131072 ,
12- supportsImages : false ,
13- supportsPromptCache : false ,
14- inputPrice : 3.0 ,
15- outputPrice : 15.0 ,
16- description : "xAI's Grok-3 beta model with 131K context window" ,
17- } ,
18- "grok-3-fast-beta" : {
19- maxTokens : 8192 ,
20- contextWindow : 131072 ,
21- supportsImages : false ,
22- supportsPromptCache : false ,
23- inputPrice : 5.0 ,
24- outputPrice : 25.0 ,
25- description : "xAI's Grok-3 fast beta model with 131K context window" ,
26- } ,
27- "grok-3-mini-beta" : {
9+ "grok-2-1212" : {
2810 maxTokens : 8192 ,
2911 contextWindow : 131072 ,
3012 supportsImages : false ,
3113 supportsPromptCache : false ,
32- inputPrice : 0.3 ,
33- outputPrice : 0.5 ,
34- description : "xAI's Grok-3 mini beta model with 131K context window" ,
35- supportsReasoningEffort : true ,
14+ inputPrice : 2.0 ,
15+ outputPrice : 10.0 ,
16+ description : "xAI's Grok-2 model (version 1212) with 128K context window" ,
3617 } ,
37- "grok-3-mini-fast-beta " : {
18+ "grok-2-vision-1212 " : {
3819 maxTokens : 8192 ,
39- contextWindow : 131072 ,
40- supportsImages : false ,
20+ contextWindow : 32768 ,
21+ supportsImages : true ,
4122 supportsPromptCache : false ,
42- inputPrice : 0.6 ,
43- outputPrice : 4.0 ,
44- description : "xAI's Grok-3 mini fast beta model with 131K context window" ,
45- supportsReasoningEffort : true ,
23+ inputPrice : 2.0 ,
24+ outputPrice : 10.0 ,
25+ description : "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window" ,
4626 } ,
4727 "grok-3" : {
4828 maxTokens : 8192 ,
4929 contextWindow : 131072 ,
5030 supportsImages : false ,
51- supportsPromptCache : false ,
31+ supportsPromptCache : true ,
5232 inputPrice : 3.0 ,
5333 outputPrice : 15.0 ,
54- description : "xAI's Grok-3 model with 131K context window" ,
34+ cacheWritesPrice : 0.75 ,
35+ cacheReadsPrice : 0.75 ,
36+ description : "xAI's Grok-3 model with 128K context window" ,
5537 } ,
5638 "grok-3-fast" : {
5739 maxTokens : 8192 ,
5840 contextWindow : 131072 ,
5941 supportsImages : false ,
60- supportsPromptCache : false ,
42+ supportsPromptCache : true ,
6143 inputPrice : 5.0 ,
6244 outputPrice : 25.0 ,
63- description : "xAI's Grok-3 fast model with 131K context window" ,
45+ cacheWritesPrice : 1.25 ,
46+ cacheReadsPrice : 1.25 ,
47+ description : "xAI's Grok-3 fast model with 128K context window" ,
6448 } ,
6549 "grok-3-mini" : {
6650 maxTokens : 8192 ,
6751 contextWindow : 131072 ,
6852 supportsImages : false ,
69- supportsPromptCache : false ,
53+ supportsPromptCache : true ,
7054 inputPrice : 0.3 ,
7155 outputPrice : 0.5 ,
72- description : "xAI's Grok-3 mini model with 131K context window" ,
56+ cacheWritesPrice : 0.07 ,
57+ cacheReadsPrice : 0.07 ,
58+ description : "xAI's Grok-3 mini model with 128K context window" ,
7359 supportsReasoningEffort : true ,
7460 } ,
7561 "grok-3-mini-fast" : {
7662 maxTokens : 8192 ,
7763 contextWindow : 131072 ,
7864 supportsImages : false ,
79- supportsPromptCache : false ,
65+ supportsPromptCache : true ,
8066 inputPrice : 0.6 ,
8167 outputPrice : 4.0 ,
82- description : "xAI's Grok-3 mini fast model with 131K context window" ,
68+ cacheWritesPrice : 0.15 ,
69+ cacheReadsPrice : 0.15 ,
70+ description : "xAI's Grok-3 mini fast model with 128K context window" ,
8371 supportsReasoningEffort : true ,
8472 } ,
85- "grok-2-latest" : {
86- maxTokens : 8192 ,
87- contextWindow : 131072 ,
88- supportsImages : false ,
89- supportsPromptCache : false ,
90- inputPrice : 2.0 ,
91- outputPrice : 10.0 ,
92- description : "xAI's Grok-2 model - latest version with 131K context window" ,
93- } ,
94- "grok-2" : {
95- maxTokens : 8192 ,
96- contextWindow : 131072 ,
97- supportsImages : false ,
98- supportsPromptCache : false ,
99- inputPrice : 2.0 ,
100- outputPrice : 10.0 ,
101- description : "xAI's Grok-2 model with 131K context window" ,
102- } ,
103- "grok-2-1212" : {
104- maxTokens : 8192 ,
105- contextWindow : 131072 ,
106- supportsImages : false ,
107- supportsPromptCache : false ,
108- inputPrice : 2.0 ,
109- outputPrice : 10.0 ,
110- description : "xAI's Grok-2 model (version 1212) with 131K context window" ,
111- } ,
112- "grok-2-vision-latest" : {
113- maxTokens : 8192 ,
114- contextWindow : 32768 ,
115- supportsImages : true ,
116- supportsPromptCache : false ,
117- inputPrice : 2.0 ,
118- outputPrice : 10.0 ,
119- description : "xAI's Grok-2 Vision model - latest version with image support and 32K context window" ,
120- } ,
121- "grok-2-vision" : {
122- maxTokens : 8192 ,
123- contextWindow : 32768 ,
124- supportsImages : true ,
125- supportsPromptCache : false ,
126- inputPrice : 2.0 ,
127- outputPrice : 10.0 ,
128- description : "xAI's Grok-2 Vision model with image support and 32K context window" ,
129- } ,
130- "grok-2-vision-1212" : {
131- maxTokens : 8192 ,
132- contextWindow : 32768 ,
133- supportsImages : true ,
134- supportsPromptCache : false ,
135- inputPrice : 2.0 ,
136- outputPrice : 10.0 ,
137- description : "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window" ,
138- } ,
139- "grok-vision-beta" : {
140- maxTokens : 8192 ,
141- contextWindow : 8192 ,
142- supportsImages : true ,
143- supportsPromptCache : false ,
144- inputPrice : 5.0 ,
145- outputPrice : 15.0 ,
146- description : "xAI's Grok Vision Beta model with image support and 8K context window" ,
147- } ,
148- "grok-beta" : {
149- maxTokens : 8192 ,
150- contextWindow : 131072 ,
151- supportsImages : false ,
152- supportsPromptCache : false ,
153- inputPrice : 5.0 ,
154- outputPrice : 15.0 ,
155- description : "xAI's Grok Beta model (legacy) with 131K context window" ,
156- } ,
15773} as const satisfies Record < string , ModelInfo >
0 commit comments