Skip to content

Commit cef9af1

Browse files
Remove stream options from XAIHandler and add new Grok-3 model variants to API configuration (RooCodeInc#2776)
Co-authored-by: arafatkatze <[email protected]>
1 parent 49d3bcf commit cef9af1

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

src/api/providers/xai.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export class XAIHandler implements ApiHandler {
2424
temperature: 0,
2525
messages: [{ role: "system", content: systemPrompt }, ...convertToOpenAiMessages(messages)],
2626
stream: true,
27-
stream_options: { include_usage: true },
2827
})
2928

3029
for await (const chunk of stream) {

src/shared/api.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,42 @@ export const xaiModels = {
13481348
outputPrice: 10.0,
13491349
description: "X AI's Grok-2 model (version 1212) with 131K context window",
13501350
},
1351+
"grok-3-beta": {
1352+
maxTokens: 8192,
1353+
contextWindow: 131072,
1354+
supportsImages: false,
1355+
supportsPromptCache: false,
1356+
inputPrice: 3.0,
1357+
outputPrice: 15.0,
1358+
description: "X AI's Grok-3 beta model with 131K context window",
1359+
},
1360+
"grok-3-fast-beta": {
1361+
maxTokens: 8192,
1362+
contextWindow: 131072,
1363+
supportsImages: false,
1364+
supportsPromptCache: false,
1365+
inputPrice: 5.0,
1366+
outputPrice: 25.0,
1367+
description: "X AI's Grok-3 fast beta model with 131K context window",
1368+
},
1369+
"grok-3-mini-beta": {
1370+
maxTokens: 8192,
1371+
contextWindow: 131072,
1372+
supportsImages: false,
1373+
supportsPromptCache: false,
1374+
inputPrice: 0.3,
1375+
outputPrice: 0.5,
1376+
description: "X AI's Grok-3 mini beta model with 131K context window",
1377+
},
1378+
"grok-3-mini-fast-beta": {
1379+
maxTokens: 8192,
1380+
contextWindow: 131072,
1381+
supportsImages: false,
1382+
supportsPromptCache: false,
1383+
inputPrice: 0.6,
1384+
outputPrice: 4.0,
1385+
description: "X AI's Grok-3 mini fast beta model with 131K context window",
1386+
},
13511387
"grok-2-vision-latest": {
13521388
maxTokens: 8192,
13531389
contextWindow: 32768,

0 commit comments

Comments
 (0)