@@ -3,26 +3,19 @@ import type { ModelInfo } from "../model.js"
33// https://docs.x.ai/docs/api-reference
44export type XAIModelId = keyof typeof xaiModels
55
6- export const xaiDefaultModelId : XAIModelId = "grok-3 "
6+ export const xaiDefaultModelId : XAIModelId = "grok-4 "
77
88export const xaiModels = {
9- "grok-2-1212" : {
10- maxTokens : 8192 ,
11- contextWindow : 131072 ,
12- supportsImages : false ,
13- supportsPromptCache : false ,
14- inputPrice : 2.0 ,
15- outputPrice : 10.0 ,
16- description : "xAI's Grok-2 model (version 1212) with 128K context window" ,
17- } ,
18- "grok-2-vision-1212" : {
9+ "grok-4" : {
1910 maxTokens : 8192 ,
20- contextWindow : 32768 ,
11+ contextWindow : 256000 ,
2112 supportsImages : true ,
22- supportsPromptCache : false ,
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" ,
13+ supportsPromptCache : true ,
14+ inputPrice : 3.0 ,
15+ outputPrice : 15.0 ,
16+ cacheWritesPrice : 0.75 ,
17+ cacheReadsPrice : 0.75 ,
18+ description : "xAI's Grok-4 model with 256K context window" ,
2619 } ,
2720 "grok-3" : {
2821 maxTokens : 8192 ,
@@ -70,4 +63,22 @@ export const xaiModels = {
7063 description : "xAI's Grok-3 mini fast model with 128K context window" ,
7164 supportsReasoningEffort : true ,
7265 } ,
66+ "grok-2-1212" : {
67+ maxTokens : 8192 ,
68+ contextWindow : 131072 ,
69+ supportsImages : false ,
70+ supportsPromptCache : false ,
71+ inputPrice : 2.0 ,
72+ outputPrice : 10.0 ,
73+ description : "xAI's Grok-2 model (version 1212) with 128K context window" ,
74+ } ,
75+ "grok-2-vision-1212" : {
76+ maxTokens : 8192 ,
77+ contextWindow : 32768 ,
78+ supportsImages : true ,
79+ supportsPromptCache : false ,
80+ inputPrice : 2.0 ,
81+ outputPrice : 10.0 ,
82+ description : "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window" ,
83+ } ,
7384} as const satisfies Record < string , ModelInfo >
0 commit comments