feat: configure tool preferences for xAI models (#9923)

This commit is contained in:
Hannes Rudolph 2025-12-08 12:33:55 -07:00 committed by GitHub
parent 6f602fc88e
commit 754b701cc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,6 +17,8 @@ export const xaiModels = {
cacheWritesPrice: 0.02,
cacheReadsPrice: 0.02,
description: "xAI's Grok Code Fast model with 256K context window",
includedTools: ["search_replace"],
excludedTools: ["apply_diff"],
},
"grok-4-1-fast-reasoning": {
maxTokens: 65_536,
@ -30,6 +32,8 @@ export const xaiModels = {
cacheReadsPrice: 0.05,
description:
"xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning",
includedTools: ["search_replace"],
excludedTools: ["apply_diff"],
},
"grok-4-1-fast-non-reasoning": {
maxTokens: 65_536,
@ -43,6 +47,8 @@ export const xaiModels = {
cacheReadsPrice: 0.05,
description:
"xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling",
includedTools: ["search_replace"],
excludedTools: ["apply_diff"],
},
"grok-4-fast-reasoning": {
maxTokens: 65_536,
@ -56,6 +62,8 @@ export const xaiModels = {
cacheReadsPrice: 0.05,
description:
"xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning",
includedTools: ["search_replace"],
excludedTools: ["apply_diff"],
},
"grok-4-fast-non-reasoning": {
maxTokens: 65_536,
@ -69,6 +77,8 @@ export const xaiModels = {
cacheReadsPrice: 0.05,
description:
"xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling",
includedTools: ["search_replace"],
excludedTools: ["apply_diff"],
},
"grok-4-0709": {
maxTokens: 8192,
@ -81,6 +91,8 @@ export const xaiModels = {
cacheWritesPrice: 0.75,
cacheReadsPrice: 0.75,
description: "xAI's Grok-4 model with 256K context window",
includedTools: ["search_replace"],
excludedTools: ["apply_diff"],
},
"grok-3-mini": {
maxTokens: 8192,
@ -95,6 +107,8 @@ export const xaiModels = {
description: "xAI's Grok-3 mini model with 128K context window",
supportsReasoningEffort: ["low", "high"],
reasoningEffort: "low",
includedTools: ["search_replace"],
excludedTools: ["apply_diff"],
},
"grok-3": {
maxTokens: 8192,
@ -107,5 +121,7 @@ export const xaiModels = {
cacheWritesPrice: 0.75,
cacheReadsPrice: 0.75,
description: "xAI's Grok-3 model with 128K context window",
includedTools: ["search_replace"],
excludedTools: ["apply_diff"],
},
} as const satisfies Record<string, ModelInfo>