mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-16 20:46:08 +00:00
💄 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:
@@ -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));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user