💄 style: add Grok Code Fast 1 model (#8982)

*  feat: add Grok Code Fast 1 model

* 🐛 fix(xai): comment out unsupported settings for reasoningEffort parameter
This commit is contained in:
bbbugg
2025-08-29 20:21:58 +08:00
committed by GitHub
parent 85f9ca5c40
commit dbcec3d07e
2 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ export interface XAIModelCard {
id: string;
}
export const GrokReasoningModels = new Set(['grok-3-mini', 'grok-4']);
export const GrokReasoningModels = new Set(['grok-3-mini', 'grok-4', 'grok-code']);
export const isGrokReasoningModel = (model: string) =>
Array.from(GrokReasoningModels).some((id) => model.includes(id));
+25
View File
@@ -2,6 +2,31 @@ import { AIChatModelCard, AIImageModelCard } from '@/types/aiModel';
// https://docs.x.ai/docs/models
const xaiChatModels: AIChatModelCard[] = [
{
abilities: {
functionCall: true,
reasoning: true,
},
contextWindowTokens: 256_000,
description:
'我们很高兴推出 grok-code-fast-1,这是一款快速且经济高效的推理模型,在代理编码方面表现出色。',
displayName: 'Grok Code Fast 1',
enabled: true,
id: 'grok-code-fast-1',
pricing: {
units: [
{ name: 'textInput_cacheRead', rate: 0.02, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textInput', rate: 0.2, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
],
},
releasedAt: '2025-08-28',
// settings: {
// reasoning_effort is not supported by grok-code. Specifying reasoning_effort parameter will get an error response.
// extendParams: ['reasoningEffort'],
// },
type: 'chat',
},
{
abilities: {
functionCall: true,