feat: add Grok, OpenAI, Claude, Gemini, Kimi AI providers

- Add new MCP clients for Grok (xAI), OpenAI, Claude, Gemini, Kimi
- Update auto_trader, backtest, and strategy to support all providers
- Add provider icons and fix SVG gradient conflicts
- Add API application links and hints in model config modal
- Show model version in AI model list cards
- Add Chinese/English translations for provider hints
- Remove deprecated traders component files
This commit is contained in:
tinkle-community
2025-12-11 15:16:59 +08:00
parent 78b5e73966
commit e5703ffab6
24 changed files with 695 additions and 837 deletions

View File

@@ -4,6 +4,17 @@ interface IconProps {
className?: string
}
// AI model colors for fallback display
const MODEL_COLORS: Record<string, string> = {
deepseek: '#4A90E2',
qwen: '#9B59B6',
claude: '#D97757',
kimi: '#6366F1',
gemini: '#4285F4',
grok: '#000000',
openai: '#10A37F',
}
// 获取AI模型图标的函数
export const getModelIcon = (modelType: string, props: IconProps = {}) => {
// 支持完整ID或类型名
@@ -18,6 +29,21 @@ export const getModelIcon = (modelType: string, props: IconProps = {}) => {
case 'qwen':
iconPath = '/icons/qwen.svg'
break
case 'claude':
iconPath = '/icons/claude.svg'
break
case 'kimi':
iconPath = '/icons/kimi.svg'
break
case 'gemini':
iconPath = '/icons/gemini.svg'
break
case 'grok':
iconPath = '/icons/grok.svg'
break
case 'openai':
iconPath = '/icons/openai.svg'
break
default:
return null
}
@@ -29,7 +55,12 @@ export const getModelIcon = (modelType: string, props: IconProps = {}) => {
width={props.width || 24}
height={props.height || 24}
className={props.className}
style={{ borderRadius: '50%' }}
/>
)
}
// 获取模型颜色用于没有图标时的fallback
export const getModelColor = (modelType: string): string => {
const type = modelType.includes('_') ? modelType.split('_').pop() : modelType
return MODEL_COLORS[type || ''] || '#60a5fa'
}