Compare commits

...

2 Commits

Author SHA1 Message Date
Dennis Bartlett 1671a4ae91 Move Grok 3 to the top 2025-04-09 17:11:35 -07:00
arafatkatze fab8fe0c2c Remove stream options from XAIHandler and add new Grok-3 model variants to API configuration 2025-04-09 16:25:53 -07:00
2 changed files with 36 additions and 1 deletions
-1
View File
@@ -24,7 +24,6 @@ export class XAIHandler implements ApiHandler {
temperature: 0,
messages: [{ role: "system", content: systemPrompt }, ...convertToOpenAiMessages(messages)],
stream: true,
stream_options: { include_usage: true },
})
for await (const chunk of stream) {
+36
View File
@@ -1321,6 +1321,42 @@ export const askSageModels = {
export type XAIModelId = keyof typeof xaiModels
export const xaiDefaultModelId: XAIModelId = "grok-2-latest"
export const xaiModels = {
"grok-3-beta": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 3.0,
outputPrice: 15.0,
description: "X AI's Grok-3 beta model with 131K context window",
},
"grok-3-fast-beta": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 5.0,
outputPrice: 25.0,
description: "X AI's Grok-3 fast beta model with 131K context window",
},
"grok-3-mini-beta": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.3,
outputPrice: 0.5,
description: "X AI's Grok-3 mini beta model with 131K context window",
},
"grok-3-mini-fast-beta": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.6,
outputPrice: 4.0,
description: "X AI's Grok-3 mini fast beta model with 131K context window",
},
"grok-2-latest": {
maxTokens: 8192,
contextWindow: 131072,