@lobehub/lobehub 2.0.0-next.15 → 2.0.0-next.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +2 -45
  3. package/README.zh-CN.md +2 -45
  4. package/changelog/v1.json +18 -0
  5. package/docs/self-hosting/advanced/feature-flags.mdx +0 -1
  6. package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +0 -1
  7. package/e2e/src/features/discover/smoke.feature +34 -1
  8. package/e2e/src/steps/discover/smoke.steps.ts +116 -4
  9. package/package.json +1 -1
  10. package/packages/model-runtime/src/utils/googleErrorParser.test.ts +125 -0
  11. package/packages/model-runtime/src/utils/googleErrorParser.ts +103 -77
  12. package/packages/types/src/serverConfig.ts +2 -6
  13. package/src/app/[variants]/(auth)/signup/[[...signup]]/page.tsx +1 -8
  14. package/src/app/[variants]/(main)/(mobile)/me/(home)/features/UserBanner.tsx +3 -6
  15. package/src/app/[variants]/(main)/discover/(list)/features/Pagination.tsx +1 -0
  16. package/src/app/[variants]/(main)/discover/(list)/features/SortButton/index.tsx +1 -1
  17. package/src/app/[variants]/(main)/discover/(list)/mcp/features/List/Item.tsx +1 -0
  18. package/src/app/[variants]/(main)/discover/(list)/model/features/List/Item.tsx +1 -0
  19. package/src/app/[variants]/(main)/discover/(list)/provider/features/List/Item.tsx +1 -0
  20. package/src/app/[variants]/(main)/discover/components/CategoryMenu.tsx +9 -1
  21. package/src/app/[variants]/(main)/labs/components/LabCard.tsx +3 -1
  22. package/src/app/[variants]/(main)/settings/provider/detail/azure/index.tsx +5 -7
  23. package/src/components/InvalidAPIKey/APIKeyForm/Bedrock.tsx +8 -13
  24. package/src/config/featureFlags/schema.test.ts +0 -2
  25. package/src/config/featureFlags/schema.ts +0 -6
  26. package/src/config/modelProviders/ai21.ts +1 -16
  27. package/src/config/modelProviders/ai302.ts +1 -128
  28. package/src/config/modelProviders/ai360.ts +1 -32
  29. package/src/config/modelProviders/anthropic.ts +1 -71
  30. package/src/config/modelProviders/azure.ts +1 -51
  31. package/src/config/modelProviders/baichuan.ts +1 -57
  32. package/src/config/modelProviders/bedrock.ts +1 -276
  33. package/src/config/modelProviders/cloudflare.ts +1 -64
  34. package/src/config/modelProviders/deepseek.ts +1 -19
  35. package/src/config/modelProviders/fireworksai.ts +1 -174
  36. package/src/config/modelProviders/giteeai.ts +1 -135
  37. package/src/config/modelProviders/github.ts +1 -254
  38. package/src/config/modelProviders/google.ts +1 -130
  39. package/src/config/modelProviders/groq.ts +1 -119
  40. package/src/config/modelProviders/higress.ts +1 -1713
  41. package/src/config/modelProviders/huggingface.ts +1 -54
  42. package/src/config/modelProviders/hunyuan.ts +1 -83
  43. package/src/config/modelProviders/infiniai.ts +1 -74
  44. package/src/config/modelProviders/internlm.ts +1 -20
  45. package/src/config/modelProviders/mistral.ts +1 -95
  46. package/src/config/modelProviders/modelscope.ts +1 -27
  47. package/src/config/modelProviders/moonshot.ts +1 -29
  48. package/src/config/modelProviders/novita.ts +1 -105
  49. package/src/config/modelProviders/ollama.ts +1 -325
  50. package/src/config/modelProviders/openai.ts +1 -242
  51. package/src/config/modelProviders/openrouter.ts +1 -240
  52. package/src/config/modelProviders/perplexity.ts +1 -45
  53. package/src/config/modelProviders/ppio.ts +1 -152
  54. package/src/config/modelProviders/qiniu.ts +1 -18
  55. package/src/config/modelProviders/qwen.ts +1 -245
  56. package/src/config/modelProviders/search1api.ts +1 -34
  57. package/src/config/modelProviders/sensenova.ts +1 -69
  58. package/src/config/modelProviders/siliconcloud.ts +1 -417
  59. package/src/config/modelProviders/spark.ts +1 -59
  60. package/src/config/modelProviders/stepfun.ts +1 -98
  61. package/src/config/modelProviders/taichu.ts +1 -18
  62. package/src/config/modelProviders/togetherai.ts +1 -274
  63. package/src/config/modelProviders/upstage.ts +1 -28
  64. package/src/config/modelProviders/wenxin.ts +1 -140
  65. package/src/config/modelProviders/xai.ts +1 -38
  66. package/src/config/modelProviders/zeroone.ts +1 -81
  67. package/src/config/modelProviders/zhipu.ts +1 -108
  68. package/src/helpers/isCanUseFC.ts +0 -8
  69. package/src/hooks/useEnabledChatModels.ts +0 -8
  70. package/src/hooks/useModelContextWindowTokens.ts +0 -8
  71. package/src/hooks/useModelHasContextWindowToken.ts +1 -10
  72. package/src/hooks/useModelSupportFiles.ts +1 -11
  73. package/src/hooks/useModelSupportReasoning.ts +1 -11
  74. package/src/hooks/useModelSupportToolUse.ts +1 -11
  75. package/src/hooks/useModelSupportVision.ts +1 -11
  76. package/src/layout/AuthProvider/Clerk/index.tsx +2 -16
  77. package/src/server/globalConfig/index.ts +0 -23
  78. package/src/server/routers/lambda/config/__snapshots__/index.test.ts.snap +175 -12
  79. package/src/server/routers/lambda/config/index.test.ts +36 -28
  80. package/src/services/chat/chat.test.ts +12 -0
  81. package/src/services/chat/helper.ts +7 -31
  82. package/src/services/models.ts +2 -11
  83. package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +41 -14
  84. package/src/store/global/store.ts +1 -7
  85. package/src/store/user/initialState.ts +1 -7
  86. package/src/store/user/selectors.ts +1 -5
  87. package/src/store/user/slices/common/action.ts +5 -4
  88. package/src/store/user/slices/settings/selectors/index.ts +1 -0
  89. package/src/store/user/slices/settings/selectors/keyVaults.ts +21 -0
  90. package/src/store/user/store.ts +0 -3
  91. package/src/tools/web-browsing/Render/Search/ConfigForm/Form.tsx +1 -1
  92. package/packages/utils/src/_deprecated/__snapshots__/parseModels.test.ts.snap +0 -104
  93. package/packages/utils/src/_deprecated/parseModels.test.ts +0 -287
  94. package/packages/utils/src/_deprecated/parseModels.ts +0 -165
  95. package/src/hooks/_header.ts +0 -23
  96. package/src/server/globalConfig/_deprecated.test.ts +0 -92
  97. package/src/server/globalConfig/_deprecated.ts +0 -41
  98. package/src/store/global/actions/clientDb.ts +0 -67
  99. package/src/store/user/slices/modelList/__snapshots__/action.test.ts.snap +0 -12
  100. package/src/store/user/slices/modelList/action.test.ts +0 -359
  101. package/src/store/user/slices/modelList/action.ts +0 -223
  102. package/src/store/user/slices/modelList/initialState.ts +0 -15
  103. package/src/store/user/slices/modelList/reducers/customModelCard.test.ts +0 -204
  104. package/src/store/user/slices/modelList/reducers/customModelCard.ts +0 -64
  105. package/src/store/user/slices/modelList/selectors/index.ts +0 -3
  106. package/src/store/user/slices/modelList/selectors/keyVaults.test.ts +0 -201
  107. package/src/store/user/slices/modelList/selectors/keyVaults.ts +0 -50
  108. package/src/store/user/slices/modelList/selectors/modelConfig.test.ts +0 -219
  109. package/src/store/user/slices/modelList/selectors/modelConfig.ts +0 -95
  110. package/src/store/user/slices/modelList/selectors/modelProvider.test.ts +0 -138
  111. package/src/store/user/slices/modelList/selectors/modelProvider.ts +0 -170
@@ -3,134 +3,7 @@ import { ModelProviderCard } from '@/types/llm';
3
3
  // ref: https://302.ai/pricing/
4
4
  const Ai302: ModelProviderCard = {
5
5
  apiKeyUrl: 'https://lobe.li/Oizw5sN',
6
- chatModels: [
7
- {
8
- contextWindowTokens: 32_000,
9
- displayName: 'deepseek-chat',
10
- enabled: true,
11
- id: 'deepseek-chat',
12
- },
13
- {
14
- contextWindowTokens: 128_000,
15
- displayName: 'gpt-4o',
16
- enabled: true,
17
- id: 'gpt-4o',
18
- },
19
- {
20
- contextWindowTokens: 128_000,
21
- displayName: 'chatgpt-4o-latest',
22
- enabled: true,
23
- id: 'chatgpt-4o-latest',
24
- },
25
- {
26
- contextWindowTokens: 128_000,
27
- displayName: 'llama3.3-70b',
28
- enabled: true,
29
- id: 'llama3.3-70b',
30
- },
31
- {
32
- contextWindowTokens: 64_000,
33
- displayName: 'deepseek-reasoner',
34
- enabled: true,
35
- id: 'deepseek-reasoner',
36
- },
37
- {
38
- contextWindowTokens: 1_000_000,
39
- displayName: 'gemini-2.0-flash',
40
- enabled: true,
41
- id: 'gemini-2.0-flash',
42
- },
43
- {
44
- contextWindowTokens: 200_000,
45
- displayName: 'claude-3-7-sonnet-20250219',
46
- enabled: true,
47
- id: 'claude-3-7-sonnet-20250219',
48
- },
49
- {
50
- contextWindowTokens: 200_000,
51
- displayName: 'claude-3-7-sonnet-latest',
52
- enabled: true,
53
- id: 'claude-3-7-sonnet-latest',
54
- },
55
- {
56
- contextWindowTokens: 131_072,
57
- displayName: 'grok-3-beta',
58
- enabled: true,
59
- id: 'grok-3-beta',
60
- },
61
- {
62
- contextWindowTokens: 131_072,
63
- displayName: 'grok-3-mini-beta',
64
- enabled: true,
65
- id: 'grok-3-mini-beta',
66
- },
67
- {
68
- contextWindowTokens: 1_000_000,
69
- displayName: 'gpt-4.1',
70
- enabled: true,
71
- id: 'gpt-4.1',
72
- },
73
- {
74
- contextWindowTokens: 200_000,
75
- displayName: 'o3',
76
- enabled: true,
77
- id: 'o3',
78
- },
79
- {
80
- contextWindowTokens: 200_000,
81
- displayName: 'o4-mini',
82
- enabled: true,
83
- id: 'o4-mini',
84
- },
85
- {
86
- contextWindowTokens: 128_000,
87
- displayName: 'qwen3-235b-a22b',
88
- enabled: true,
89
- id: 'qwen3-235b-a22b',
90
- },
91
- {
92
- contextWindowTokens: 128_000,
93
- displayName: 'qwen3-32b',
94
- enabled: true,
95
- id: 'qwen3-32b',
96
- },
97
- {
98
- contextWindowTokens: 1_000_000,
99
- displayName: 'gemini-2.5-pro-preview-05-06',
100
- enabled: true,
101
- id: 'gemini-2.5-pro-preview-05-06',
102
- },
103
- {
104
- contextWindowTokens: 128_000,
105
- displayName: 'llama-4-maverick',
106
- enabled: true,
107
- id: 'llama-4-maverick',
108
- },
109
- {
110
- contextWindowTokens: 1_000_000,
111
- displayName: 'gemini-2.5-flash',
112
- enabled: true,
113
- id: 'gemini-2.5-flash',
114
- },
115
- {
116
- contextWindowTokens: 200_000,
117
- displayName: 'claude-sonnet-4-20250514',
118
- enabled: true,
119
- id: 'claude-sonnet-4-20250514',
120
- },
121
- {
122
- contextWindowTokens: 200_000,
123
- displayName: 'claude-opus-4-20250514',
124
- enabled: true,
125
- id: 'claude-opus-4-20250514',
126
- },
127
- {
128
- contextWindowTokens: 1_000_000,
129
- displayName: 'gemini-2.5-pro',
130
- enabled: true,
131
- id: 'gemini-2.5-pro',
132
- },
133
- ],
6
+ chatModels: [],
134
7
  checkModel: 'gpt-4o',
135
8
  description: '302.AI 是一个按需付费的 AI 应用平台,提供市面上最全的 AI API 和 AI 在线应用',
136
9
  id: 'ai302',
@@ -2,38 +2,7 @@ import { ModelProviderCard } from '@/types/llm';
2
2
 
3
3
  // ref: https://ai.360.cn/platform/docs/overview
4
4
  const Ai360: ModelProviderCard = {
5
- chatModels: [
6
- {
7
- contextWindowTokens: 8000,
8
- description:
9
- '360gpt2-o1 使用树搜索构建思维链,并引入了反思机制,使用强化学习训练,模型具备自我反思与纠错的能力。',
10
- displayName: '360GPT2 o1',
11
- enabled: true,
12
- id: '360gpt2-o1',
13
- },
14
- {
15
- contextWindowTokens: 8000,
16
- description: '360智脑系列效果最好的主力千亿级大模型,广泛适用于各领域复杂任务场景。',
17
- displayName: '360GPT2 Pro',
18
- enabled: true,
19
- id: '360gpt2-pro',
20
- },
21
- {
22
- contextWindowTokens: 8000,
23
- description: '360智脑系列效果最好的主力千亿级大模型,广泛适用于各领域复杂任务场景。',
24
- displayName: '360GPT Pro',
25
- enabled: true,
26
- functionCall: true,
27
- id: '360gpt-pro',
28
- },
29
- {
30
- contextWindowTokens: 7000,
31
- description: '兼顾性能和效果的百亿级大模型,适合对性能/成本要求较高 的场景。',
32
- displayName: '360GPT Turbo',
33
- enabled: true,
34
- id: '360gpt-turbo',
35
- },
36
- ],
5
+ chatModels: [],
37
6
  checkModel: '360gpt-turbo',
38
7
  description:
39
8
  '360 AI 是 360 公司推出的 AI 模型和服务平台,提供多种先进的自然语言处理模型,包括 360GPT2 Pro、360GPT Pro、360GPT Turbo 和 360GPT Turbo Responsibility 8K。这些模型结合了大规模参数和多模态能力,广泛应用于文本生成、语义理解、对话系统与代码生成等领域。通过灵活的定价策略,360 AI 满足多样化用户需求,支持开发者集成,推动智能化应用的革新和发展。',
@@ -1,77 +1,7 @@
1
1
  import { ModelProviderCard } from '@/types/llm';
2
2
 
3
3
  const Anthropic: ModelProviderCard = {
4
- chatModels: [
5
- {
6
- contextWindowTokens: 200_000,
7
- description:
8
- 'Claude 4 Opus 是 Anthropic 最强大的下一代模型,具有卓越的推理能力和创造力,适用于最复杂的任务和高级分析。',
9
- displayName: 'Claude 4 Opus',
10
- enabled: true,
11
- functionCall: true,
12
- id: 'claude-opus-4-20250514',
13
- maxOutput: 32_000,
14
- releasedAt: '2025-05-14',
15
- vision: true,
16
- },
17
- {
18
- contextWindowTokens: 200_000,
19
- description:
20
- 'Claude 4 Sonnet 提供了优异的性能和速度平衡,是新一代模型中的理想选择,适用于广泛的企业和创意任务。',
21
- displayName: 'Claude 4 Sonnet',
22
- enabled: true,
23
- functionCall: true,
24
- id: 'claude-sonnet-4-20250514',
25
- maxOutput: 64_000,
26
- releasedAt: '2025-05-14',
27
- vision: true,
28
- },
29
- {
30
- contextWindowTokens: 200_000,
31
- description:
32
- 'Claude 3.7 sonnet 是 Anthropic 最快的下一代模型。与 Claude 3 Haiku 相比,Claude 3.7 Sonnet 在各项技能上都有所提升,并在许多智力基准测试中超越了上一代最大的模型 Claude 3 Opus。',
33
- displayName: 'Claude 3.7 Sonnet',
34
- enabled: true,
35
- functionCall: true,
36
- id: 'claude-3-7-sonnet-20250219',
37
- maxOutput: 64_000,
38
- releasedAt: '2025-02-24',
39
- },
40
- {
41
- contextWindowTokens: 200_000,
42
- description:
43
- 'Claude 3.5 Haiku 是 Anthropic 最快的下一代模型。与 Claude 3 Haiku 相比,Claude 3.5 Haiku 在各项技能上都有所提升,并在许多智力基准测试中超越了上一代最大的模型 Claude 3 Opus。',
44
- displayName: 'Claude 3.5 Haiku',
45
- enabled: true,
46
- functionCall: true,
47
- id: 'claude-3-5-haiku-20241022',
48
- maxOutput: 8192,
49
- releasedAt: '2024-11-05',
50
- },
51
- {
52
- contextWindowTokens: 200_000,
53
- description:
54
- 'Claude 3 Haiku 是 Anthropic 的最快且最紧凑的模型,旨在实现近乎即时的响应。它具有快速且准确的定向性能。',
55
- displayName: 'Claude 3 Haiku',
56
- functionCall: true,
57
- id: 'claude-3-haiku-20240307',
58
- maxOutput: 4096,
59
- releasedAt: '2024-03-07',
60
- vision: true,
61
- },
62
- {
63
- contextWindowTokens: 200_000,
64
- description:
65
- 'Claude 3 Opus 是 Anthropic 用于处理高度复杂任务的最强大模型。它在性能、智能、流畅性和理解力方面表现卓越。',
66
- displayName: 'Claude 3 Opus',
67
- enabled: true,
68
- functionCall: true,
69
- id: 'claude-3-opus-20240229',
70
- maxOutput: 4096,
71
- releasedAt: '2024-02-29',
72
- vision: true,
73
- },
74
- ],
4
+ chatModels: [],
75
5
  checkModel: 'claude-3-haiku-20240307',
76
6
  description:
77
7
  'Anthropic 是一家专注于人工智能研究和开发的公司,提供了一系列先进的语言模型,如 Claude 3.5 Sonnet、Claude 3 Sonnet、Claude 3 Opus 和 Claude 3 Haiku。这些模型在智能、速度和成本之间取得了理想的平衡,适用于从企业级工作负载到快速响应的各种应用场景。Claude 3.5 Sonnet 作为其最新模型,在多项评估中表现优异,同时保持了较高的性价比。',
@@ -2,57 +2,7 @@ import { ModelProviderCard } from '@/types/llm';
2
2
 
3
3
  // ref: https://learn.microsoft.com/azure/ai-services/openai/concepts/models
4
4
  const Azure: ModelProviderCard = {
5
- chatModels: [
6
- {
7
- contextWindowTokens: 16_385,
8
- deploymentName: 'gpt-35-turbo',
9
- description:
10
- 'GPT 3.5 Turbo,OpenAI提供的高效模型,适用于聊天和文本生成任务,支持并行函数调用。',
11
- displayName: 'GPT 3.5 Turbo',
12
- enabled: true,
13
- functionCall: true,
14
- id: 'gpt-35-turbo',
15
- maxOutput: 4096,
16
- },
17
- {
18
- contextWindowTokens: 16_384,
19
- deploymentName: 'gpt-35-turbo-16k',
20
- description: 'GPT 3.5 Turbo 16k,高容量文本生成模型,适合复杂任务。',
21
- displayName: 'GPT 3.5 Turbo',
22
- functionCall: true,
23
- id: 'gpt-35-turbo-16k',
24
- },
25
- {
26
- contextWindowTokens: 128_000,
27
- deploymentName: 'gpt-4-turbo',
28
- description: 'GPT 4 Turbo,多模态模型,提供杰出的语言理解和生成能力,同时支持图像输入。',
29
- displayName: 'GPT 4 Turbo',
30
- enabled: true,
31
- functionCall: true,
32
- id: 'gpt-4',
33
- vision: true,
34
- },
35
- {
36
- contextWindowTokens: 128_000,
37
- deploymentName: 'gpt-4o-mini',
38
- description: 'GPT-4o Mini,小型高效模型,具备与GPT-4o相似的卓越性能。',
39
- displayName: 'GPT 4o Mini',
40
- enabled: true,
41
- functionCall: true,
42
- id: 'gpt-4o-mini',
43
- vision: true,
44
- },
45
- {
46
- contextWindowTokens: 128_000,
47
- deploymentName: 'gpt-4o',
48
- description: 'GPT-4o 是最新的多模态模型,结合高级文本和图像处理能力。',
49
- displayName: 'GPT 4o',
50
- enabled: true,
51
- functionCall: true,
52
- id: 'gpt-4o',
53
- vision: true,
54
- },
55
- ],
5
+ chatModels: [],
56
6
  defaultShowBrowserRequest: true,
57
7
  description:
58
8
  'Azure 提供多种先进的AI模型,包括GPT-3.5和最新的GPT-4系列,支持多种数据类型和复杂任务,致力于安全、可靠和可持续的AI解决方案。',
@@ -2,63 +2,7 @@ import { ModelProviderCard } from '@/types/llm';
2
2
 
3
3
  // ref: https://platform.baichuan-ai.com/price
4
4
  const Baichuan: ModelProviderCard = {
5
- chatModels: [
6
- {
7
- contextWindowTokens: 32_768,
8
- description:
9
- '模型能力国内第一,在知识百科、长文本、生成创作等中文任务上超越国外主流模型。还具备行业领先的多模态能力,多项权威评测基准表现优异。',
10
- displayName: 'Baichuan 4',
11
- enabled: true,
12
- functionCall: true,
13
- id: 'Baichuan4',
14
- maxOutput: 4096,
15
- },
16
- {
17
- contextWindowTokens: 32_768,
18
- description:
19
- '模型能力国内第一,在知识百科、长文本、生成创作等中文任务上超越国外主流模型。还具备行业领先的多模态能力,多项权威评测基准表现优异。',
20
- displayName: 'Baichuan 4 Turbo',
21
- enabled: true,
22
- functionCall: true,
23
- id: 'Baichuan4-Turbo',
24
- maxOutput: 4096,
25
- },
26
- {
27
- contextWindowTokens: 32_768,
28
- description:
29
- '模型能力国内第一,在知识百科、长文本、生成创作等中文任务上超越国外主流模型。还具备行业领先的多模态能力,多项权威评测基准表现优异。',
30
- displayName: 'Baichuan 4 Air',
31
- enabled: true,
32
- functionCall: true,
33
- id: 'Baichuan4-Air',
34
- maxOutput: 4096,
35
- },
36
- {
37
- contextWindowTokens: 32_768,
38
- description:
39
- '针对企业高频场景优化,效果大幅提升,高性价比。相对于Baichuan2模型,内容创作提升20%,知识问答提升17%, 角色扮演能力提升40%。整体效果比GPT3.5更优。',
40
- displayName: 'Baichuan 3 Turbo',
41
- functionCall: true,
42
- id: 'Baichuan3-Turbo',
43
- maxOutput: 8192,
44
- },
45
- {
46
- contextWindowTokens: 128_000,
47
- description:
48
- '具备 128K 超长上下文窗口,针对企业高频场景优化,效果大幅提升,高性价比。相对于Baichuan2模型,内容创作提升20%,知识问答提升17%, 角色扮演能力提升40%。整体效果比GPT3.5更优。',
49
- displayName: 'Baichuan 3 Turbo 128k',
50
- id: 'Baichuan3-Turbo-128k',
51
- maxOutput: 4096,
52
- },
53
- {
54
- contextWindowTokens: 32_768,
55
- description:
56
- '采用搜索增强技术实现大模型与领域知识、全网知识的全面链接。支持PDF、Word等多种文档上传及网址输入,信息获取及时、全面,输出结果准确、专业。',
57
- displayName: 'Baichuan 2 Turbo',
58
- id: 'Baichuan2-Turbo',
59
- maxOutput: 8192,
60
- },
61
- ],
5
+ chatModels: [],
62
6
  checkModel: 'Baichuan3-Turbo',
63
7
  description:
64
8
  '百川智能是一家专注于人工智能大模型研发的公司,其模型在国内知识百科、长文本处理和生成创作等中文任务上表现卓越,超越了国外主流模型。百川智能还具备行业领先的多模态能力,在多项权威评测中表现优异。其模型包括 Baichuan 4、Baichuan 3 Turbo 和 Baichuan 3 Turbo 128k 等,分别针对不同应用场景进行优化,提供高性价比的解决方案。',
@@ -4,282 +4,7 @@ import { ModelProviderCard } from '@/types/llm';
4
4
  // ref :https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/models
5
5
  // ref :https://us-west-2.console.aws.amazon.com/bedrock/home?region=us-west-2#/models
6
6
  const Bedrock: ModelProviderCard = {
7
- chatModels: [
8
- /*
9
- // TODO: Not support for now
10
- {
11
- description: '亚马逊 Titan Text Lite 是一款轻量级高效模型,非常适合对英语任务进行微调,包括总结和文案编写等,客户希望有一个更小、更经济的模型,同时也非常可定制。',
12
- displayName: 'Titan Text G1 - Lite',
13
- id: 'amazon.titan-text-lite-v1',
14
- tokens: 4000,
15
- },
16
- {
17
- description: '亚马逊 Titan Text Express 的上下文长度可达 8,000 个标记,非常适合广泛的高级通用语言任务,如开放式文本生成和对话聊天,以及在检索增强生成 (RAG) 中的支持。在推出时,该模型针对英语进行了优化,预览版还支持其他 100 多种语言。',
18
- displayName: 'Titan Text G1 - Express',
19
- id: 'amazon.titan-text-express-v1',
20
- tokens: 8000,
21
- },
22
- {
23
- description: 'Titan Text Premier 是 Titan Text 系列中一款强大的先进模型,旨在为广泛的企业应用提供卓越的性能。凭借其尖端能力,它提供了更高的准确性和卓越的结果,是寻求一流文本处理解决方案的组织的绝佳选择。',
24
- displayName: 'Titan Text G1 - Premier',
25
- id: 'amazon.titan-text-premier-v1:0',
26
- tokens: 32_000,
27
- },
28
- */
29
- {
30
- contextWindowTokens: 200_000,
31
- description:
32
- 'Claude 3.7 sonnet 是 Anthropic 最快的下一代模型。与 Claude 3 Haiku 相比,Claude 3.7 Sonnet 在各项技能上都有所提升,并在许多智力基准测试中超越了上一代最大的模型 Claude 3 Opus。',
33
- displayName: 'Claude 3.7 Sonnet',
34
- enabled: true,
35
- functionCall: true,
36
- id: 'us.anthropic.claude-3-7-sonnet-20250219-v1:0',
37
- maxOutput: 8192,
38
- releasedAt: '2025-02-24',
39
- },
40
- {
41
- contextWindowTokens: 200_000,
42
- description:
43
- 'Claude 3.7 sonnet Extended thinking 是 Anthropic 最快的下一代模型。与 Claude 3 Haiku 相比,Claude 3.7 Sonnet 在各项技能上都有所提升,并在许多智力基准测试中超越了上一代最大的模型 Claude 3 Opus。',
44
- displayName: 'Claude 3.7 Sonnet Extended thinking',
45
- enabled: true,
46
- functionCall: true,
47
- id: 'us.anthropic.claude-3-7-sonnet-20250219-v1:0',
48
- maxOutput: 64_000,
49
- releasedAt: '2025-02-24',
50
- },
51
- {
52
- contextWindowTokens: 200_000,
53
- description:
54
- 'Claude 3.5 Haiku 是 Anthropic 最快的下一代模型。与 Claude 3 Haiku 相比,Claude 3.5 Haiku 在各项技能上都有所提升,并在许多智力基准测试中超越了上一代最大的模型 Claude 3 Opus。',
55
- displayName: 'Claude 3.5 Haiku',
56
- enabled: true,
57
- functionCall: true,
58
- id: 'anthropic.claude-3-5-haiku-20241022-v1:0',
59
- maxOutput: 8192,
60
- releasedAt: '2024-11-05',
61
- },
62
- {
63
- contextWindowTokens: 200_000,
64
- description:
65
- 'Claude 3.5 Sonnet 提升了行业标准,性能超过竞争对手模型和 Claude 3 Opus,在广泛的评估中表现出色,同时具有我们中等层级模型的速度和成本。',
66
- displayName: 'Claude 3.5 Sonnet',
67
- enabled: true,
68
- functionCall: true,
69
- id: 'anthropic.claude-3-5-sonnet-20241022-v2:0',
70
- vision: true,
71
- },
72
- {
73
- contextWindowTokens: 200_000,
74
- description:
75
- 'Claude 3.5 Sonnet 提升了行业标准,性能超过竞争对手模型和 Claude 3 Opus,在广泛的评估中表现出色,同时具有我们中等层级模型的速度和成本。',
76
- displayName: 'Claude 3.5 Sonnet v2 (Inference profile)',
77
- enabled: true,
78
- functionCall: true,
79
- id: 'us.anthropic.claude-3-5-sonnet-20241022-v2:0',
80
- vision: true,
81
- },
82
- {
83
- contextWindowTokens: 200_000,
84
- description:
85
- 'Claude 3.5 Sonnet 提升了行业标准,性能超过竞争对手模型和 Claude 3 Opus,在广泛的评估中表现出色,同时具有我们中等层级模型的速度和成本。',
86
- displayName: 'Claude 3.5 Sonnet 0620',
87
- enabled: true,
88
- functionCall: true,
89
- id: 'anthropic.claude-3-5-sonnet-20240620-v1:0',
90
- vision: true,
91
- },
92
- {
93
- contextWindowTokens: 200_000,
94
- description:
95
- 'Claude 3 Haiku 是 Anthropic 最快、最紧凑的模型,提供近乎即时的响应速度。它可以快速回答简单的查询和请求。客户将能够构建模仿人类互动的无缝 AI 体验。Claude 3 Haiku 可以处理图像并返回文本输出,具有 200K 的上下文窗口。',
96
- displayName: 'Claude 3 Haiku',
97
- enabled: true,
98
- functionCall: true,
99
- id: 'anthropic.claude-3-haiku-20240307-v1:0',
100
- vision: true,
101
- },
102
- {
103
- contextWindowTokens: 200_000,
104
- description:
105
- 'Anthropic 的 Claude 3 Sonnet 在智能和速度之间达到了理想的平衡——特别适合企业工作负载。它以低于竞争对手的价格提供最大的效用,并被设计成为可靠的、高耐用的主力机,适用于规模化的 AI 部署。Claude 3 Sonnet 可以处理图像并返回文本输出,具有 200K 的上下文窗口。',
106
- displayName: 'Claude 3 Sonnet',
107
- enabled: true,
108
- functionCall: true,
109
- id: 'anthropic.claude-3-sonnet-20240229-v1:0',
110
- vision: true,
111
- },
112
- {
113
- contextWindowTokens: 200_000,
114
- description:
115
- 'Claude 3 Opus 是 Anthropic 最强大的 AI 模型,具有在高度复杂任务上的最先进性能。它可以处理开放式提示和未见过的场景,具有出色的流畅性和类人的理解能力。Claude 3 Opus 展示了生成 AI 可能性的前沿。Claude 3 Opus 可以处理图像并返回文本输出,具有 200K 的上下文窗口。',
116
- displayName: 'Claude 3 Opus',
117
- enabled: true,
118
- functionCall: true,
119
- id: 'anthropic.claude-3-opus-20240229-v1:0',
120
- vision: true,
121
- },
122
- {
123
- contextWindowTokens: 200_000,
124
- description:
125
- 'Claude 2 的更新版,具有双倍的上下文窗口,以及在长文档和 RAG 上下文中的可靠性、幻觉率和基于证据的准确性的改进。',
126
- displayName: 'Claude 2.1',
127
- id: 'anthropic.claude-v2:1',
128
- },
129
- {
130
- contextWindowTokens: 100_000,
131
- description:
132
- 'Anthropic 在从复杂对话和创意内容生成到详细指令跟随的广泛任务中都表现出高度能力的模型。',
133
- displayName: 'Claude 2.0',
134
- id: 'anthropic.claude-v2',
135
- },
136
- {
137
- contextWindowTokens: 100_000,
138
- description:
139
- '一款快速、经济且仍然非常有能力的模型,可以处理包括日常对话、文本分析、总结和文档问答在内的一系列任务。',
140
- displayName: 'Claude Instant',
141
- id: 'anthropic.claude-instant-v1',
142
- },
143
- {
144
- contextWindowTokens: 128_000,
145
- description:
146
- 'Meta Llama 3.1 8B Instruct 的更新版,包括扩展的 128K 上下文长度、多语言性和改进的推理能力。Llama 3.1 提供的多语言大型语言模型 (LLMs) 是一组预训练的、指令调整的生成模型,包括 8B、70B 和 405B 大小 (文本输入/输出)。Llama 3.1 指令调整的文本模型 (8B、70B、405B) 专为多语言对话用例进行了优化,并在常见的行业基准测试中超过了许多可用的开源聊天模型。Llama 3.1 旨在用于多种语言的商业和研究用途。指令调整的文本模型适用于类似助手的聊天,而预训练模型可以适应各种自然语言生成任务。Llama 3.1 模型还支持利用其模型的输出来改进其他模型,包括合成数据生成和精炼。Llama 3.1 是使用优化的变压器架构的自回归语言模型。调整版本使用监督微调 (SFT) 和带有人类反馈的强化学习 (RLHF) 来符合人类对帮助性和安全性的偏好。',
147
- displayName: 'Llama 3.1 8B Instruct',
148
- enabled: true,
149
- functionCall: true,
150
- id: 'meta.llama3-1-8b-instruct-v1:0',
151
- },
152
- {
153
- contextWindowTokens: 128_000,
154
- description:
155
- 'Meta Llama 3.1 70B Instruct 的更新版,包括扩展的 128K 上下文长度、多语言性和改进的推理能力。Llama 3.1 提供的多语言大型语言模型 (LLMs) 是一组预训练的、指令调整的生成模型,包括 8B、70B 和 405B 大小 (文本输入/输出)。Llama 3.1 指令调整的文本模型 (8B、70B、405B) 专为多语言对话用例进行了优化,并在常见的行业基准测试中超过了许多可用的开源聊天模型。Llama 3.1 旨在用于多种语言的商业和研究用途。指令调整的文本模型适用于类似助手的聊天,而预训练模型可以适应各种自然语言生成任务。Llama 3.1 模型还支持利用其模型的输出来改进其他模型,包括合成数据生成和精炼。Llama 3.1 是使用优化的变压器架构的自回归语言模型。调整版本使用监督微调 (SFT) 和带有人类反馈的强化学习 (RLHF) 来符合人类对帮助性和安全性的偏好。',
156
- displayName: 'Llama 3.1 70B Instruct',
157
- enabled: true,
158
- functionCall: true,
159
- id: 'meta.llama3-1-70b-instruct-v1:0',
160
- },
161
- {
162
- contextWindowTokens: 128_000,
163
- description:
164
- 'Meta Llama 3.1 405B Instruct 是 Llama 3.1 Instruct 模型中最大、最强大的模型,是一款高度先进的对话推理和合成数据生成模型,也可以用作在特定领域进行专业持续预训练或微调的基础。Llama 3.1 提供的多语言大型语言模型 (LLMs) 是一组预训练的、指令调整的生成模型,包括 8B、70B 和 405B 大小 (文本输入/输出)。Llama 3.1 指令调整的文本模型 (8B、70B、405B) 专为多语言对话用例进行了优化,并在常见的行业基准测试中超过了许多可用的开源聊天模型。Llama 3.1 旨在用于多种语言的商业和研究用途。指令调整的文本模型适用于类似助手的聊天,而预训练模型可以适应各种自然语言生成任务。Llama 3.1 模型还支持利用其模型的输出来改进其他模型,包括合成数据生成和精炼。Llama 3.1 是使用优化的变压器架构的自回归语言模型。调整版本使用监督微调 (SFT) 和带有人类反馈的强化学习 (RLHF) 来符合人类对帮助性和安全性的偏好。',
165
- displayName: 'Llama 3.1 405B Instruct',
166
- enabled: true,
167
- functionCall: true,
168
- id: 'meta.llama3-1-405b-instruct-v1:0',
169
- },
170
- {
171
- contextWindowTokens: 8000,
172
- description:
173
- 'Meta Llama 3 是一款面向开发者、研究人员和企业的开放大型语言模型 (LLM),旨在帮助他们构建、实验并负责任地扩展他们的生成 AI 想法。作为全球社区创新的基础系统的一部分,它非常适合计算能力和资源有限、边缘设备和更快的训练时间。',
174
- displayName: 'Llama 3 8B Instruct',
175
- id: 'meta.llama3-8b-instruct-v1:0',
176
- },
177
- {
178
- contextWindowTokens: 8000,
179
- description:
180
- 'Meta Llama 3 是一款面向开发者、研究人员和企业的开放大型语言模型 (LLM),旨在帮助他们构建、实验并负责任地扩展他们的生成 AI 想法。作为全球社区创新的基础系统的一部分,它非常适合内容创建、对话 AI、语言理解、研发和企业应用。',
181
- displayName: 'Llama 3 70B Instruct',
182
- id: 'meta.llama3-70b-instruct-v1:0',
183
- },
184
- /*
185
- // TODO: Not support for now
186
- {
187
- description: 'A 7B dense Transformer, fast-deployed and easily customisable. Small, yet powerful for a variety of use cases. Supports English and code, and a 32k context window.',
188
- displayName: 'Mistral 7B Instruct',
189
- enabled: true,
190
- id: 'mistral.mistral-7b-instruct-v0:2',
191
- tokens: 32_000,
192
- },
193
- {
194
- description: 'A 7B sparse Mixture-of-Experts model with stronger capabilities than Mistral 7B. Uses 12B active parameters out of 45B total. Supports multiple languages, code and 32k context window.',
195
- displayName: 'Mixtral 8X7B Instruct',
196
- enabled: true,
197
- id: 'mistral.mixtral-8x7b-instruct-v0:1',
198
- tokens: 32_000,
199
- },
200
- {
201
- description: 'Mistral Small is perfectly suited for straightforward tasks that can be performed in bulk, such as classification, customer support, or text generation. It provides outstanding performance at a cost-effective price point.',
202
- displayName: 'Mistral Small',
203
- functionCall: true,
204
- id: 'mistral.mistral-small-2402-v1:0',
205
- tokens: 32_000,
206
- },
207
- {
208
- description: 'Mistral Large 2407 is an advanced Large Language Model (LLM) that supports dozens of languages and is trained on 80+ coding languages. It has best-in-class agentic capabilities with native function calling JSON outputting and reasoning capabilities.',
209
- displayName: 'Mistral Large 2 (24.07)',
210
- enabled: true,
211
- functionCall: true,
212
- id: 'mistral.mistral-large-2407-v1:0',
213
- tokens: 128_000,
214
- },
215
- {
216
- description: 'The most advanced Mistral AI Large Language model capable of handling any language task including complex multilingual reasoning, text understanding, transformation, and code generation.',
217
- displayName: 'Mistral Large',
218
- enabled: true,
219
- functionCall: true,
220
- id: 'mistral.mistral-large-2402-v1:0',
221
- tokens: 32_000,
222
- },
223
- */
224
- /*
225
- // TODO: Not support for now
226
- {
227
- description: 'Command R+ is a highly performant generative language model optimized for large scale production workloads.',
228
- displayName: 'Command R+',
229
- enabled: true,
230
- functionCall: true,
231
- id: 'cohere.command-r-plus-v1:0',
232
- tokens: 128_000,
233
- },
234
- {
235
- description: 'Command R is a generative language model optimized for long-context tasks and large scale production workloads.',
236
- displayName: 'Command R',
237
- enabled: true,
238
- functionCall: true,
239
- id: 'cohere.command-r-v1:0',
240
- tokens: 128_000,
241
- },
242
- */
243
- /*
244
- // Cohere Command (Text) and AI21 Labs Jurassic-2 (Text) don't support chat with the Converse API
245
- {
246
- description: 'Command is Cohere flagship text generation model. It is trained to follow user commands and to be instantly useful in practical business applications.',
247
- displayName: 'Command',
248
- id: 'cohere.command-text-v14',
249
- tokens: 4000,
250
- },
251
- {
252
- description: 'Cohere Command-Light is a generative model that responds well with instruction-like prompts. This model provides customers with an unbeatable balance of quality, cost-effectiveness, and low-latency inference.',
253
- displayName: 'Command Light',
254
- id: 'cohere.command-light-text-v14',
255
- tokens: 4000,
256
- },
257
- */
258
- /*
259
- // TODO: Not support for now
260
- {
261
- description: 'The latest Foundation Model from AI21 Labs, Jamba-Instruct offers an impressive 256K context window and delivers the best value per price on core text generation, summarization, and question answering tasks for the enterprise.',
262
- displayName: 'Jamba-Instruct',
263
- id: 'ai21.jamba-instruct-v1:0',
264
- tokens: 256_000,
265
- },
266
- */
267
- /*
268
- // Cohere Command (Text) and AI21 Labs Jurassic-2 (Text) don't support chat with the Converse API
269
- {
270
- description: 'Jurassic-2 Mid is less powerful than Ultra, yet carefully designed to strike the right balance between exceptional quality and affordability. Jurassic-2 Mid can be applied to any language comprehension or generation task including question answering, summarization, long-form copy generation, advanced information extraction and many others.',
271
- displayName: 'Jurassic-2 Mid',
272
- id: 'ai21.j2-mid-v1',
273
- tokens: 8191,
274
- },
275
- {
276
- description: 'Jurassic-2 Ultra is AI21’s most powerful model for complex tasks that require advanced text generation and comprehension. Popular use cases include question answering, summarization, long-form copy generation, advanced information extraction, and more.',
277
- displayName: 'Jurassic-2 Ultra',
278
- id: 'ai21.j2-ultra-v1',
279
- tokens: 8191,
280
- },
281
- */
282
- ],
7
+ chatModels: [],
283
8
  checkModel: 'anthropic.claude-instant-v1',
284
9
  description:
285
10
  'Bedrock 是亚马逊 AWS 提供的一项服务,专注于为企业提供先进的 AI 语言模型和视觉模型。其模型家族包括 Anthropic 的 Claude 系列、Meta 的 Llama 3.1 系列等,涵盖从轻量级到高性能的多种选择,支持文本生成、对话、图像处理等多种任务,适用于不同规模和需求的企业应用。',