Skip to content

Commit 08f3a2b

Browse files
authored
feat: add xAI grok-4.20 models and update default (Fixes #11955) (#11956)
1 parent 44fd975 commit 08f3a2b

File tree

1 file changed

+28
-1
lines changed
  • packages/types/src/providers

1 file changed

+28
-1
lines changed

packages/types/src/providers/xai.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,36 @@ import type { ModelInfo } from "../model.js"
33
// https://docs.x.ai/docs/api-reference
44
export type XAIModelId = keyof typeof xaiModels
55

6-
export const xaiDefaultModelId: XAIModelId = "grok-code-fast-1"
6+
export const xaiDefaultModelId: XAIModelId = "grok-4.20-beta-0309-reasoning"
77

88
export const xaiModels = {
9+
"grok-4.20-beta-0309-reasoning": {
10+
maxTokens: 65_536,
11+
contextWindow: 2_000_000,
12+
supportsImages: true,
13+
supportsPromptCache: true,
14+
inputPrice: 2.0,
15+
outputPrice: 6.0,
16+
cacheWritesPrice: 0.5,
17+
cacheReadsPrice: 0.5,
18+
description:
19+
"xAI's Grok 4.20 reasoning model with 2M context. Reasoning is internal (not exposed via Chat Completions API).",
20+
includedTools: ["search_replace"],
21+
excludedTools: ["apply_diff"],
22+
},
23+
"grok-4.20-beta-0309-non-reasoning": {
24+
maxTokens: 65_536,
25+
contextWindow: 2_000_000,
26+
supportsImages: true,
27+
supportsPromptCache: true,
28+
inputPrice: 2.0,
29+
outputPrice: 6.0,
30+
cacheWritesPrice: 0.5,
31+
cacheReadsPrice: 0.5,
32+
description: "xAI's Grok 4.20 non-reasoning model - faster inference with 2M context.",
33+
includedTools: ["search_replace"],
34+
excludedTools: ["apply_diff"],
35+
},
936
"grok-code-fast-1": {
1037
maxTokens: 16_384,
1138
contextWindow: 256_000,

0 commit comments

Comments
 (0)