@lobehub/chat 1.43.5 → 1.44.0

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 (299) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/changelog/v1.json +18 -0
  3. package/docs/self-hosting/server-database/docker-compose.mdx +2 -2
  4. package/locales/ar/common.json +1 -0
  5. package/locales/ar/modelProvider.json +176 -0
  6. package/locales/ar/setting.json +1 -0
  7. package/locales/bg-BG/common.json +1 -0
  8. package/locales/bg-BG/modelProvider.json +176 -0
  9. package/locales/bg-BG/setting.json +1 -0
  10. package/locales/de-DE/common.json +1 -0
  11. package/locales/de-DE/modelProvider.json +176 -0
  12. package/locales/de-DE/setting.json +1 -0
  13. package/locales/en-US/common.json +1 -0
  14. package/locales/en-US/modelProvider.json +176 -0
  15. package/locales/en-US/setting.json +1 -0
  16. package/locales/es-ES/common.json +1 -0
  17. package/locales/es-ES/modelProvider.json +176 -0
  18. package/locales/es-ES/setting.json +1 -0
  19. package/locales/fa-IR/common.json +1 -0
  20. package/locales/fa-IR/modelProvider.json +176 -0
  21. package/locales/fa-IR/setting.json +1 -0
  22. package/locales/fr-FR/common.json +1 -0
  23. package/locales/fr-FR/modelProvider.json +176 -0
  24. package/locales/fr-FR/setting.json +1 -0
  25. package/locales/it-IT/common.json +1 -0
  26. package/locales/it-IT/modelProvider.json +176 -0
  27. package/locales/it-IT/setting.json +1 -0
  28. package/locales/ja-JP/common.json +1 -0
  29. package/locales/ja-JP/modelProvider.json +176 -0
  30. package/locales/ja-JP/setting.json +1 -0
  31. package/locales/ko-KR/common.json +1 -0
  32. package/locales/ko-KR/modelProvider.json +176 -0
  33. package/locales/ko-KR/setting.json +1 -0
  34. package/locales/nl-NL/common.json +1 -0
  35. package/locales/nl-NL/modelProvider.json +176 -0
  36. package/locales/nl-NL/setting.json +1 -0
  37. package/locales/pl-PL/common.json +1 -0
  38. package/locales/pl-PL/modelProvider.json +176 -0
  39. package/locales/pl-PL/setting.json +1 -0
  40. package/locales/pt-BR/common.json +1 -0
  41. package/locales/pt-BR/modelProvider.json +176 -0
  42. package/locales/pt-BR/setting.json +1 -0
  43. package/locales/ru-RU/common.json +1 -0
  44. package/locales/ru-RU/modelProvider.json +176 -0
  45. package/locales/ru-RU/setting.json +1 -0
  46. package/locales/tr-TR/common.json +1 -0
  47. package/locales/tr-TR/modelProvider.json +176 -0
  48. package/locales/tr-TR/setting.json +1 -0
  49. package/locales/vi-VN/common.json +1 -0
  50. package/locales/vi-VN/modelProvider.json +176 -0
  51. package/locales/vi-VN/setting.json +1 -0
  52. package/locales/zh-CN/common.json +1 -0
  53. package/locales/zh-CN/modelProvider.json +176 -0
  54. package/locales/zh-CN/setting.json +1 -0
  55. package/locales/zh-TW/common.json +1 -0
  56. package/locales/zh-TW/modelProvider.json +176 -0
  57. package/locales/zh-TW/setting.json +1 -0
  58. package/package.json +4 -4
  59. package/src/app/(main)/(mobile)/me/settings/features/Category.tsx +1 -1
  60. package/src/app/(main)/(mobile)/me/settings/features/useCategory.tsx +12 -5
  61. package/src/app/(main)/changelog/features/VersionTag.tsx +1 -2
  62. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/Thread.tsx +1 -1
  63. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/ThreadItem.tsx +1 -2
  64. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/index.tsx +0 -1
  65. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx +1 -1
  66. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/QuestionSuggest.tsx +1 -1
  67. package/src/app/(main)/chat/(workspace)/@conversation/features/ZenModeToast/Toast.tsx +1 -1
  68. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/index.tsx +0 -2
  69. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/index.tsx +0 -1
  70. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Tags.tsx +2 -3
  71. package/src/app/(main)/chat/(workspace)/_layout/Desktop/index.tsx +6 -1
  72. package/src/app/(main)/chat/@session/features/SessionListContent/CollapseGroup/index.tsx +1 -1
  73. package/src/app/(main)/chat/features/Migration/Start.tsx +1 -1
  74. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/ConversationExample/TopicList.tsx +4 -3
  75. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Header.tsx +1 -1
  76. package/src/app/(main)/discover/(detail)/features/ShareButton.tsx +2 -1
  77. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +1 -1
  78. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Header.tsx +1 -1
  79. package/src/app/(main)/discover/(detail)/provider/[slug]/features/Header.tsx +1 -1
  80. package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +0 -1
  81. package/src/app/(main)/discover/(list)/assistants/features/Card.tsx +1 -1
  82. package/src/app/(main)/discover/(list)/models/features/Card.tsx +1 -1
  83. package/src/app/(main)/discover/(list)/plugins/features/Card.tsx +1 -1
  84. package/src/app/(main)/discover/(list)/providers/features/Card.tsx +1 -1
  85. package/src/app/(main)/discover/components/GridLoadingCard.tsx +2 -1
  86. package/src/app/(main)/discover/components/Title.tsx +1 -1
  87. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +1 -1
  88. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/Item/index.tsx +0 -1
  89. package/src/app/(main)/files/(content)/@modal/(.)[id]/FullscreenModal.tsx +2 -2
  90. package/src/app/(main)/files/(content)/NotSupportClient.tsx +2 -2
  91. package/src/app/(main)/profile/_layout/Desktop/SideBar.tsx +1 -1
  92. package/src/app/(main)/profile/stats/features/ShareButton/Preview.tsx +5 -5
  93. package/src/app/(main)/repos/[id]/evals/components/Container.tsx +1 -1
  94. package/src/app/(main)/repos/[id]/evals/dataset/DatasetList/Item.tsx +0 -1
  95. package/src/app/(main)/settings/_layout/Desktop/SideBar.tsx +1 -1
  96. package/src/app/(main)/settings/about/features/ItemCard.tsx +3 -3
  97. package/src/app/(main)/settings/about/features/Version.tsx +1 -1
  98. package/src/app/(main)/settings/hooks/useCategory.tsx +22 -9
  99. package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +2 -1
  100. package/src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +0 -1
  101. package/src/app/(main)/settings/provider/(detail)/[id]/index.tsx +19 -0
  102. package/src/app/(main)/settings/provider/(detail)/[id]/page.tsx +95 -0
  103. package/src/app/(main)/settings/provider/(detail)/azure/page.tsx +119 -0
  104. package/src/app/(main)/settings/provider/(detail)/bedrock/page.tsx +91 -0
  105. package/src/app/(main)/settings/provider/(detail)/cloudflare/page.tsx +58 -0
  106. package/src/app/(main)/settings/provider/(detail)/github/page.tsx +67 -0
  107. package/src/app/(main)/settings/provider/(detail)/huggingface/page.tsx +67 -0
  108. package/src/app/(main)/settings/provider/(detail)/ollama/Checker.tsx +73 -0
  109. package/src/app/(main)/settings/provider/(detail)/ollama/page.tsx +34 -0
  110. package/src/app/(main)/settings/provider/(detail)/openai/page.tsx +23 -0
  111. package/src/app/(main)/settings/provider/(detail)/wenxin/page.tsx +61 -0
  112. package/src/app/(main)/settings/provider/(list)/Footer.tsx +36 -0
  113. package/src/app/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +134 -0
  114. package/src/app/(main)/settings/provider/(list)/ProviderGrid/index.tsx +91 -0
  115. package/src/app/(main)/settings/provider/(list)/index.tsx +19 -0
  116. package/src/app/(main)/settings/provider/ProviderMenu/AddNew.tsx +28 -0
  117. package/src/app/(main)/settings/provider/ProviderMenu/All.tsx +29 -0
  118. package/src/app/(main)/settings/provider/ProviderMenu/Item.tsx +69 -0
  119. package/src/app/(main)/settings/provider/ProviderMenu/List.tsx +76 -0
  120. package/src/app/(main)/settings/provider/ProviderMenu/SearchResult.tsx +43 -0
  121. package/src/app/(main)/settings/provider/ProviderMenu/SkeletonList.tsx +60 -0
  122. package/src/app/(main)/settings/provider/ProviderMenu/SortProviderModal/GroupItem.tsx +30 -0
  123. package/src/app/(main)/settings/provider/ProviderMenu/SortProviderModal/index.tsx +91 -0
  124. package/src/app/(main)/settings/provider/ProviderMenu/index.tsx +80 -0
  125. package/src/app/(main)/settings/provider/_layout/Desktop.tsx +37 -0
  126. package/src/app/(main)/settings/provider/_layout/Mobile.tsx +14 -0
  127. package/src/app/(main)/settings/provider/const.ts +20 -0
  128. package/src/app/(main)/settings/provider/features/CreateNewProvider/index.tsx +146 -0
  129. package/src/app/(main)/settings/provider/features/ModelList/CreateNewModelModal/Form.tsx +105 -0
  130. package/src/app/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx +69 -0
  131. package/src/app/(main)/settings/provider/features/ModelList/DisabledModels.tsx +29 -0
  132. package/src/app/(main)/settings/provider/features/ModelList/EmptyModels.tsx +101 -0
  133. package/src/app/(main)/settings/provider/features/ModelList/EnabledModelList/index.tsx +85 -0
  134. package/src/app/(main)/settings/provider/features/ModelList/ModelConfigModal/Form.tsx +109 -0
  135. package/src/app/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx +76 -0
  136. package/src/app/(main)/settings/provider/features/ModelList/ModelItem.tsx +346 -0
  137. package/src/app/(main)/settings/provider/features/ModelList/ModelTitle/Search.tsx +37 -0
  138. package/src/app/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +145 -0
  139. package/src/app/(main)/settings/provider/features/ModelList/SearchResult.tsx +67 -0
  140. package/src/app/(main)/settings/provider/features/ModelList/SkeletonList.tsx +63 -0
  141. package/src/app/(main)/settings/provider/features/ModelList/SortModelModal/ListItem.tsx +20 -0
  142. package/src/app/(main)/settings/provider/features/ModelList/SortModelModal/index.tsx +96 -0
  143. package/src/app/(main)/settings/provider/features/ModelList/index.tsx +59 -0
  144. package/src/app/(main)/settings/provider/features/ProviderConfig/Checker.tsx +120 -0
  145. package/src/app/(main)/settings/provider/features/ProviderConfig/SkeletonInput.tsx +5 -0
  146. package/src/app/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/SettingModal.tsx +137 -0
  147. package/src/app/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/index.tsx +49 -0
  148. package/src/app/(main)/settings/provider/features/ProviderConfig/index.tsx +343 -0
  149. package/src/app/(main)/settings/provider/layout.tsx +21 -0
  150. package/src/app/(main)/settings/provider/page.tsx +17 -0
  151. package/src/app/(main)/settings/provider/type.ts +5 -0
  152. package/src/app/(main)/settings/sync/features/DeviceInfo/Card.tsx +1 -1
  153. package/src/app/(main)/settings/sync/features/DeviceInfo/index.tsx +1 -1
  154. package/src/app/@modal/(.)changelog/modal/features/ReadDetail.tsx +1 -1
  155. package/src/app/@modal/(.)changelog/modal/features/VersionTag.tsx +1 -2
  156. package/src/app/@modal/(.)changelog/modal/layout.tsx +1 -1
  157. package/src/components/Cell/index.tsx +1 -1
  158. package/src/components/DragUpload/index.tsx +2 -3
  159. package/src/components/FeatureList/index.tsx +1 -1
  160. package/src/components/FileParsingStatus/EmbeddingStatus.tsx +1 -1
  161. package/src/components/FileParsingStatus/index.tsx +1 -1
  162. package/src/components/FunctionModal/style.tsx +2 -2
  163. package/src/components/GoBack/index.tsx +1 -2
  164. package/src/components/HotKeys/index.tsx +1 -1
  165. package/src/components/InstantSwitch/index.tsx +28 -0
  166. package/src/components/Menu/index.tsx +1 -1
  167. package/src/components/ModelSelect/index.tsx +2 -3
  168. package/src/components/Notification/index.tsx +2 -1
  169. package/src/components/StatisticCard/index.tsx +5 -6
  170. package/src/config/aiModels/ai21.ts +38 -0
  171. package/src/config/aiModels/ai360.ts +71 -0
  172. package/src/config/aiModels/anthropic.ts +152 -0
  173. package/src/config/aiModels/azure.ts +86 -0
  174. package/src/config/aiModels/baichuan.ts +107 -0
  175. package/src/config/aiModels/bedrock.ts +315 -0
  176. package/src/config/aiModels/cloudflare.ts +88 -0
  177. package/src/config/aiModels/deepseek.ts +27 -0
  178. package/src/config/aiModels/fireworksai.ts +232 -0
  179. package/src/config/aiModels/giteeai.ts +137 -0
  180. package/src/config/aiModels/github.ts +273 -0
  181. package/src/config/aiModels/google.ts +317 -0
  182. package/src/config/aiModels/groq.ts +202 -0
  183. package/src/config/aiModels/higress.ts +2828 -0
  184. package/src/config/aiModels/huggingface.ts +56 -0
  185. package/src/config/aiModels/hunyuan.ts +151 -0
  186. package/src/config/aiModels/index.ts +98 -0
  187. package/src/config/aiModels/internlm.ts +40 -0
  188. package/src/config/aiModels/minimax.ts +55 -0
  189. package/src/config/aiModels/mistral.ts +172 -0
  190. package/src/config/aiModels/moonshot.ts +44 -0
  191. package/src/config/aiModels/novita.ts +124 -0
  192. package/src/config/aiModels/ollama.ts +412 -0
  193. package/src/config/aiModels/openai.ts +537 -0
  194. package/src/config/aiModels/openrouter.ts +252 -0
  195. package/src/config/aiModels/perplexity.ts +67 -0
  196. package/src/config/aiModels/qwen.ts +302 -0
  197. package/src/config/aiModels/sensenova.ts +114 -0
  198. package/src/config/aiModels/siliconcloud.ts +679 -0
  199. package/src/config/aiModels/spark.ts +68 -0
  200. package/src/config/aiModels/stepfun.ts +153 -0
  201. package/src/config/aiModels/taichu.ts +19 -0
  202. package/src/config/aiModels/togetherai.ts +334 -0
  203. package/src/config/aiModels/upstage.ts +37 -0
  204. package/src/config/aiModels/wenxin.ts +171 -0
  205. package/src/config/aiModels/xai.ts +72 -0
  206. package/src/config/aiModels/zeroone.ts +156 -0
  207. package/src/config/aiModels/zhipu.ts +235 -0
  208. package/src/config/featureFlags/schema.ts +3 -0
  209. package/src/config/modelProviders/anthropic.ts +1 -0
  210. package/src/config/modelProviders/github.ts +0 -1
  211. package/src/config/modelProviders/google.ts +1 -0
  212. package/src/config/modelProviders/stepfun.ts +2 -0
  213. package/src/database/migrations/0013_add_ai_infra.sql +44 -0
  214. package/src/database/migrations/meta/0013_snapshot.json +3598 -0
  215. package/src/database/migrations/meta/_journal.json +7 -0
  216. package/src/database/repositories/aiInfra/index.ts +115 -0
  217. package/src/database/schemas/aiInfra.ts +69 -0
  218. package/src/database/schemas/index.ts +1 -0
  219. package/src/database/server/models/__tests__/aiModel.test.ts +318 -0
  220. package/src/database/server/models/__tests__/aiProvider.test.ts +373 -0
  221. package/src/database/server/models/aiModel.ts +250 -0
  222. package/src/database/server/models/aiProvider.ts +234 -0
  223. package/src/features/AgentSetting/AgentPrompt/index.tsx +2 -2
  224. package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +2 -1
  225. package/src/features/ChatInput/ActionBar/Tools/index.tsx +2 -3
  226. package/src/features/ChatInput/ActionBar/Upload/ServerMode.tsx +2 -3
  227. package/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx +3 -2
  228. package/src/features/ChatInput/Desktop/FilePreview/FileList.tsx +2 -2
  229. package/src/features/ChatInput/Mobile/Files/FileItem/File.tsx +2 -2
  230. package/src/features/ChatInput/Mobile/InputArea/index.tsx +1 -1
  231. package/src/features/ChatInput/STT/common.tsx +1 -1
  232. package/src/features/Conversation/Error/style.tsx +2 -2
  233. package/src/features/Conversation/Messages/Assistant/FileChunks/Item/style.ts +2 -2
  234. package/src/features/Conversation/Messages/Assistant/FileChunks/index.tsx +1 -1
  235. package/src/features/Conversation/Messages/Assistant/ToolCallItem/Inspector/style.ts +2 -3
  236. package/src/features/Conversation/Messages/Assistant/ToolCallItem/style.ts +2 -3
  237. package/src/features/Conversation/Messages/User/FileListViewer/Item.tsx +0 -1
  238. package/src/features/Conversation/components/BackBottom/style.ts +2 -2
  239. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/Icon.tsx +2 -3
  240. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/index.tsx +3 -3
  241. package/src/features/Conversation/components/MarkdownElements/LobeThinking/Render.tsx +1 -1
  242. package/src/features/Conversation/components/OTPInput.tsx +2 -2
  243. package/src/features/DataImporter/Loading.tsx +1 -1
  244. package/src/features/FileManager/FileList/EmptyStatus.tsx +1 -1
  245. package/src/features/FileManager/FileList/index.tsx +1 -1
  246. package/src/features/FileManager/UploadDock/Item.tsx +1 -1
  247. package/src/features/FileManager/UploadDock/index.tsx +4 -4
  248. package/src/features/FileViewer/NotSupport/index.tsx +1 -1
  249. package/src/features/FileViewer/Renderer/MSDoc/index.tsx +0 -1
  250. package/src/features/FileViewer/Renderer/TXT/index.tsx +1 -1
  251. package/src/features/InitClientDB/EnableModal.tsx +1 -1
  252. package/src/features/InitClientDB/ErrorResult.tsx +1 -1
  253. package/src/features/InitClientDB/InitIndicator.tsx +1 -1
  254. package/src/features/KnowledgeBaseModal/AddFilesToKnowledgeBase/SelectForm.tsx +0 -1
  255. package/src/features/ModelSwitchPanel/index.tsx +2 -2
  256. package/src/features/PluginsUI/Render/Loading.tsx +0 -1
  257. package/src/features/Portal/Home/Body/Files/FileList/Item.tsx +1 -1
  258. package/src/features/Portal/Home/Body/Plugins/ArtifactList/Item/style.ts +1 -2
  259. package/src/features/Setting/SettingContainer.tsx +8 -1
  260. package/src/features/ShareModal/ShareImage/style.ts +2 -2
  261. package/src/features/ShareModal/style.ts +2 -2
  262. package/src/features/User/DataStatistics.tsx +1 -1
  263. package/src/hooks/useEnabledChatModels.ts +10 -1
  264. package/src/hooks/useModelSupportToolUse.ts +15 -0
  265. package/src/hooks/useModelSupportVision.ts +15 -0
  266. package/src/layout/AuthProvider/Clerk/useAppearance.ts +3 -3
  267. package/src/layout/GlobalProvider/AppTheme.tsx +1 -1
  268. package/src/layout/GlobalProvider/StoreInitialization.tsx +5 -0
  269. package/src/locales/default/common.ts +1 -0
  270. package/src/locales/default/modelProvider.ts +178 -0
  271. package/src/locales/default/setting.ts +1 -0
  272. package/src/server/modules/KeyVaultsEncrypt/index.ts +1 -1
  273. package/src/server/routers/lambda/aiModel.ts +128 -0
  274. package/src/server/routers/lambda/aiProvider.ts +127 -0
  275. package/src/server/routers/lambda/index.ts +4 -0
  276. package/src/services/__tests__/_auth.test.ts +16 -49
  277. package/src/services/__tests__/chat.test.ts +2 -0
  278. package/src/services/_auth.ts +42 -25
  279. package/src/services/aiModel.ts +52 -0
  280. package/src/services/aiProvider.ts +47 -0
  281. package/src/services/chat.ts +62 -18
  282. package/src/store/aiInfra/index.ts +2 -0
  283. package/src/store/aiInfra/initialState.ts +11 -0
  284. package/src/store/aiInfra/selectors.ts +2 -0
  285. package/src/store/aiInfra/slices/aiModel/action.ts +146 -0
  286. package/src/store/aiInfra/slices/aiModel/index.ts +3 -0
  287. package/src/store/aiInfra/slices/aiModel/initialState.ts +14 -0
  288. package/src/store/aiInfra/slices/aiModel/selectors.ts +63 -0
  289. package/src/store/aiInfra/slices/aiProvider/action.ts +208 -0
  290. package/src/store/aiInfra/slices/aiProvider/index.ts +3 -0
  291. package/src/store/aiInfra/slices/aiProvider/initialState.ts +32 -0
  292. package/src/store/aiInfra/slices/aiProvider/selectors.ts +99 -0
  293. package/src/store/aiInfra/store.ts +25 -0
  294. package/src/store/global/initialState.ts +1 -0
  295. package/src/store/serverConfig/selectors.test.ts +1 -0
  296. package/src/styles/global.ts +1 -1
  297. package/src/types/aiModel.ts +32 -6
  298. package/src/types/aiProvider.ts +11 -4
  299. package/src/utils/fetch/fetchSSE.ts +3 -1
@@ -0,0 +1,252 @@
1
+ import { AIChatModelCard } from '@/types/aiModel';
2
+
3
+ const openrouterChatModels: AIChatModelCard[] = [
4
+ {
5
+ contextWindowTokens: 128_000,
6
+ description:
7
+ '根据上下文长度、主题和复杂性,你的请求将发送到 Llama 3 70B Instruct、Claude 3.5 Sonnet(自我调节)或 GPT-4o。',
8
+ displayName: 'Auto (best for prompt)',
9
+ enabled: true,
10
+ id: 'openrouter/auto',
11
+ type: 'chat',
12
+ },
13
+ {
14
+ contextWindowTokens: 128_000,
15
+ description:
16
+ 'o1-mini是一款针对编程、数学和科学应用场景而设计的快速、经济高效的推理模型。该模型具有128K上下文和2023年10月的知识截止日期。',
17
+ displayName: 'OpenAI o1-mini',
18
+ enabled: true,
19
+ id: 'openai/o1-mini',
20
+ maxOutput: 65_536,
21
+ pricing: {
22
+ input: 3,
23
+ output: 12,
24
+ },
25
+ releasedAt: '2024-09-12',
26
+ type: 'chat',
27
+ },
28
+ {
29
+ contextWindowTokens: 128_000,
30
+ description:
31
+ 'o1是OpenAI新的推理模型,适用于需要广泛通用知识的复杂任务。该模型具有128K上下文和2023年10月的知识截止日期。',
32
+ displayName: 'OpenAI o1-preview',
33
+ enabled: true,
34
+ id: 'openai/o1-preview',
35
+ maxOutput: 32_768,
36
+ pricing: {
37
+ input: 15,
38
+ output: 60,
39
+ },
40
+ releasedAt: '2024-09-12',
41
+ type: 'chat',
42
+ },
43
+ {
44
+ abilities: {
45
+ functionCall: true,
46
+ vision: true,
47
+ },
48
+ contextWindowTokens: 128_000,
49
+ description:
50
+ 'GPT-4o mini是OpenAI在GPT-4 Omni之后推出的最新模型,支持图文输入并输出文本。作为他们最先进的小型模型,它比其他近期的前沿模型便宜很多,并且比GPT-3.5 Turbo便宜超过60%。它保持了最先进的智能,同时具有显著的性价比。GPT-4o mini在MMLU测试中获得了 82% 的得分,目前在聊天偏好上排名高于 GPT-4。',
51
+ displayName: 'GPT-4o mini',
52
+ enabled: true,
53
+ id: 'openai/gpt-4o-mini',
54
+ maxOutput: 16_385,
55
+ pricing: {
56
+ input: 0.15,
57
+ output: 0.6,
58
+ },
59
+ type: 'chat',
60
+ },
61
+ {
62
+ abilities: {
63
+ functionCall: true,
64
+ vision: true,
65
+ },
66
+ contextWindowTokens: 128_000,
67
+ description:
68
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
69
+ displayName: 'GPT-4o',
70
+ enabled: true,
71
+ id: 'openai/gpt-4o',
72
+ pricing: {
73
+ input: 2.5,
74
+ output: 10,
75
+ },
76
+ type: 'chat',
77
+ },
78
+ {
79
+ abilities: {
80
+ functionCall: true,
81
+ vision: true,
82
+ },
83
+ contextWindowTokens: 200_000,
84
+ description:
85
+ 'Claude 3 Haiku 是 Anthropic 的最快且最紧凑的模型,旨在实现近乎即时的响应。它具有快速且准确的定向性能。',
86
+ displayName: 'Claude 3 Haiku',
87
+ enabled: true,
88
+ id: 'anthropic/claude-3-haiku',
89
+ maxOutput: 4096,
90
+ pricing: {
91
+ cachedInput: 0.025,
92
+ input: 0.25,
93
+ output: 1.25,
94
+ writeCacheInput: 0.3125,
95
+ },
96
+ releasedAt: '2024-03-07',
97
+ type: 'chat',
98
+ },
99
+ {
100
+ abilities: {
101
+ functionCall: true,
102
+ vision: true,
103
+ },
104
+ contextWindowTokens: 200_000,
105
+ description:
106
+ 'Claude 3.5 Sonnet 提供了超越 Opus 的能力和比 Sonnet 更快的速度,同时保持与 Sonnet 相同的价格。Sonnet 特别擅长编程、数据科学、视觉处理、代理任务。',
107
+ displayName: 'Claude 3.5 Sonnet',
108
+ enabled: true,
109
+ id: 'anthropic/claude-3.5-sonnet',
110
+ maxOutput: 8192,
111
+ pricing: {
112
+ cachedInput: 0.3,
113
+ input: 3,
114
+ output: 15,
115
+ writeCacheInput: 3.75,
116
+ },
117
+ releasedAt: '2024-06-20',
118
+ type: 'chat',
119
+ },
120
+ {
121
+ abilities: {
122
+ functionCall: true,
123
+ vision: true,
124
+ },
125
+ contextWindowTokens: 200_000,
126
+ description:
127
+ 'Claude 3 Opus 是 Anthropic 用于处理高度复杂任务的最强大模型。它在性能、智能、流畅性和理解力方面表现卓越。',
128
+ displayName: 'Claude 3 Opus',
129
+ enabled: true,
130
+ id: 'anthropic/claude-3-opus',
131
+ maxOutput: 4096,
132
+ pricing: {
133
+ cachedInput: 1.5,
134
+ input: 15,
135
+ output: 75,
136
+ writeCacheInput: 18.75,
137
+ },
138
+ releasedAt: '2024-02-29',
139
+ type: 'chat',
140
+ },
141
+ {
142
+ abilities: {
143
+ functionCall: true,
144
+ vision: true,
145
+ },
146
+ contextWindowTokens: 1_008_192,
147
+ description: 'Gemini 1.5 Flash 提供了优化后的多模态处理能力,适用多种复杂任务场景。',
148
+ displayName: 'Gemini 1.5 Flash',
149
+ enabled: true,
150
+ id: 'google/gemini-flash-1.5',
151
+ maxOutput: 8192,
152
+ pricing: {
153
+ input: 0.075,
154
+ output: 0.3,
155
+ },
156
+ type: 'chat',
157
+ },
158
+ {
159
+ abilities: {
160
+ functionCall: true,
161
+ vision: true,
162
+ },
163
+ contextWindowTokens: 2_008_192,
164
+ description: 'Gemini 1.5 Pro 结合最新优化技术,带来更高效的多模态数据处理能力。',
165
+ displayName: 'Gemini 1.5 Pro',
166
+ enabled: true,
167
+ id: 'google/gemini-pro-1.5',
168
+ maxOutput: 8192,
169
+ pricing: {
170
+ input: 3.5,
171
+ output: 10.5,
172
+ },
173
+ type: 'chat',
174
+ },
175
+ {
176
+ abilities: {
177
+ functionCall: true,
178
+ },
179
+ contextWindowTokens: 128_000,
180
+ description:
181
+ '融合通用与代码能力的全新开源模型, 不仅保留了原有 Chat 模型的通用对话能力和 Coder 模型的强大代码处理能力,还更好地对齐了人类偏好。此外,DeepSeek-V2.5 在写作任务、指令跟随等多个方面也实现了大幅提升。',
182
+ displayName: 'DeepSeek V2.5',
183
+ enabled: true,
184
+ id: 'deepseek/deepseek-chat',
185
+ pricing: {
186
+ input: 0.14,
187
+ output: 0.28,
188
+ },
189
+ releasedAt: '2024-09-05',
190
+ type: 'chat',
191
+ },
192
+ {
193
+ abilities: {
194
+ vision: true,
195
+ },
196
+ contextWindowTokens: 131_072,
197
+ description:
198
+ 'LLaMA 3.2 旨在处理结合视觉和文本数据的任务。它在图像描述和视觉问答等任务中表现出色,跨越了语言生成和视觉推理之间的鸿沟。',
199
+ displayName: 'Llama 3.2 11B Vision',
200
+ enabled: true,
201
+ id: 'meta-llama/llama-3.2-11b-vision-instruct',
202
+ pricing: {
203
+ input: 0.162,
204
+ output: 0.162,
205
+ },
206
+ type: 'chat',
207
+ },
208
+ {
209
+ abilities: {
210
+ vision: true,
211
+ },
212
+ contextWindowTokens: 131_072,
213
+ description:
214
+ 'LLaMA 3.2 旨在处理结合视觉和文本数据的任务。它在图像描述和视觉问答等任务中表现出色,跨越了语言生成和视觉推理之间的鸿沟。',
215
+ displayName: 'Llama 3.2 90B Vision',
216
+ enabled: true,
217
+ id: 'meta-llama/llama-3.2-90b-vision-instruct',
218
+ pricing: {
219
+ input: 0.4,
220
+ output: 0.4,
221
+ },
222
+ type: 'chat',
223
+ },
224
+ {
225
+ contextWindowTokens: 32_768,
226
+ description: 'Qwen2 是全新的大型语言模型系列,具有更强的理解和生成能力。',
227
+ displayName: 'Qwen2 7B (Free)',
228
+ enabled: true,
229
+ id: 'qwen/qwen-2-7b-instruct:free',
230
+ type: 'chat',
231
+ },
232
+ {
233
+ contextWindowTokens: 32_768,
234
+ description: 'LLaMA 3.1 提供多语言支持,是业界领先的生成模型之一。',
235
+ displayName: 'Llama 3.1 8B (Free)',
236
+ enabled: true,
237
+ id: 'meta-llama/llama-3.1-8b-instruct:free',
238
+ type: 'chat',
239
+ },
240
+ {
241
+ contextWindowTokens: 8192,
242
+ description: 'Gemma 2 是Google轻量化的开源文本模型系列。',
243
+ displayName: 'Gemma 2 9B (Free)',
244
+ enabled: true,
245
+ id: 'google/gemma-2-9b-it:free',
246
+ type: 'chat',
247
+ },
248
+ ];
249
+
250
+ export const allModels = [...openrouterChatModels];
251
+
252
+ export default allModels;
@@ -0,0 +1,67 @@
1
+ import { AIChatModelCard } from '@/types/aiModel';
2
+
3
+ const perplexityChatModels: AIChatModelCard[] = [
4
+ {
5
+ contextWindowTokens: 128_000,
6
+ description:
7
+ 'Llama 3.1 Sonar Small Online 模型,具备8B参数,支持约127,000个标记的上下文长度,专为在线聊天设计,能高效处理各种文本交互。',
8
+ displayName: 'Llama 3.1 Sonar Small Online',
9
+ enabled: true,
10
+ id: 'llama-3.1-sonar-small-128k-online',
11
+ type: 'chat',
12
+ },
13
+ {
14
+ contextWindowTokens: 128_000,
15
+ description:
16
+ 'Llama 3.1 Sonar Large Online 模型,具备70B参数,支持约127,000个标记的上下文长度,适用于高容量和多样化聊天任务。',
17
+ displayName: 'Llama 3.1 Sonar Large Online',
18
+ enabled: true,
19
+ id: 'llama-3.1-sonar-large-128k-online',
20
+ type: 'chat',
21
+ },
22
+ {
23
+ contextWindowTokens: 128_000,
24
+ description:
25
+ 'Llama 3.1 Sonar Huge Online 模型,具备405B参数,支持约127,000个标记的上下文长度,设计用于复杂的在线聊天应用。',
26
+ displayName: 'Llama 3.1 Sonar Huge Online',
27
+ enabled: true,
28
+ id: 'llama-3.1-sonar-huge-128k-online',
29
+ type: 'chat',
30
+ },
31
+ {
32
+ contextWindowTokens: 128_000,
33
+ description:
34
+ 'Llama 3.1 Sonar Small Chat 模型,具备8B参数,专为离线聊天设计,支持约127,000个标记的上下文长度。',
35
+ displayName: 'Llama 3.1 Sonar Small Chat',
36
+ enabled: true,
37
+ id: 'llama-3.1-sonar-small-128k-chat',
38
+ type: 'chat',
39
+ },
40
+ {
41
+ contextWindowTokens: 128_000,
42
+ description:
43
+ 'Llama 3.1 Sonar Large Chat 模型,具备70B参数,支持约127,000个标记的上下文长度,适合于复杂的离线聊天任务。',
44
+ displayName: 'Llama 3.1 Sonar Large Chat',
45
+ enabled: true,
46
+ id: 'llama-3.1-sonar-large-128k-chat',
47
+ type: 'chat',
48
+ },
49
+ {
50
+ contextWindowTokens: 128_000,
51
+ description:
52
+ 'Llama 3.1 8B Instruct 模型,具备8B参数,支持画面指示任务的高效执行,提供优质的文本生成能力。',
53
+ id: 'llama-3.1-8b-instruct',
54
+ type: 'chat',
55
+ },
56
+ {
57
+ contextWindowTokens: 128_000,
58
+ description:
59
+ 'Llama 3.1 70B Instruct 模型,具备70B参数,能在大型文本生成和指示任务中提供卓越性能。',
60
+ id: 'llama-3.1-70b-instruct',
61
+ type: 'chat',
62
+ },
63
+ ];
64
+
65
+ export const allModels = [...perplexityChatModels];
66
+
67
+ export default allModels;
@@ -0,0 +1,302 @@
1
+ import { AIChatModelCard } from '@/types/aiModel';
2
+
3
+ const qwenChatModels: AIChatModelCard[] = [
4
+ {
5
+ abilities: {
6
+ functionCall: true,
7
+ },
8
+ contextWindowTokens: 131_072,
9
+ description: '通义千问超大规模语言模型,支持中文、英文等不同语言输入。',
10
+ displayName: 'Qwen Turbo',
11
+ enabled: true,
12
+ id: 'qwen-turbo-latest',
13
+ pricing: {
14
+ currency: 'CNY',
15
+ input: 0.3,
16
+ output: 0.6,
17
+ },
18
+ type: 'chat',
19
+ },
20
+ {
21
+ abilities: {
22
+ functionCall: true,
23
+ },
24
+ contextWindowTokens: 131_072,
25
+ description: '通义千问超大规模语言模型增强版,支持中文、英文等不同语言输入。',
26
+ displayName: 'Qwen Plus',
27
+ enabled: true,
28
+ id: 'qwen-plus-latest',
29
+ pricing: {
30
+ currency: 'CNY',
31
+ input: 0.8,
32
+ output: 2,
33
+ },
34
+ type: 'chat',
35
+ },
36
+ {
37
+ abilities: {
38
+ functionCall: true,
39
+ },
40
+ contextWindowTokens: 32_768,
41
+ description:
42
+ '通义千问千亿级别超大规模语言模型,支持中文、英文等不同语言输入,当前通义千问2.5产品版本背后的API模型。',
43
+ displayName: 'Qwen Max',
44
+ enabled: true,
45
+ id: 'qwen-max-latest',
46
+ pricing: {
47
+ currency: 'CNY',
48
+ input: 20,
49
+ output: 60,
50
+ },
51
+ type: 'chat',
52
+ },
53
+ {
54
+ contextWindowTokens: 1_000_000,
55
+ description:
56
+ '通义千问超大规模语言模型,支持长文本上下文,以及基于长文档、多文档等多个场景的对话功能。',
57
+ displayName: 'Qwen Long',
58
+ id: 'qwen-long',
59
+ pricing: {
60
+ currency: 'CNY',
61
+ input: 0.5,
62
+ output: 2,
63
+ },
64
+ type: 'chat',
65
+ },
66
+ {
67
+ abilities: {
68
+ vision: true,
69
+ },
70
+ contextWindowTokens: 32_000,
71
+ description:
72
+ '通义千问大规模视觉语言模型增强版。大幅提升细节识别能力和文字识别能力,支持超百万像素分辨率和任意长宽比规格的图像。',
73
+ displayName: 'Qwen VL Plus',
74
+ enabled: true,
75
+ id: 'qwen-vl-plus-latest',
76
+ pricing: {
77
+ currency: 'CNY',
78
+ input: 8,
79
+ output: 8,
80
+ },
81
+ type: 'chat',
82
+ },
83
+ {
84
+ abilities: {
85
+ vision: true,
86
+ },
87
+ contextWindowTokens: 32_000,
88
+ description:
89
+ '通义千问超大规模视觉语言模型。相比增强版,再次提升视觉推理能力和指令遵循能力,提供更高的视觉感知和认知水平。',
90
+ displayName: 'Qwen VL Max',
91
+ enabled: true,
92
+ id: 'qwen-vl-max-latest',
93
+ pricing: {
94
+ currency: 'CNY',
95
+ input: 20,
96
+ output: 20,
97
+ },
98
+ type: 'chat',
99
+ },
100
+ {
101
+ contextWindowTokens: 4096,
102
+ description: '通义千问数学模型是专门用于数学解题的语言模型。',
103
+ displayName: 'Qwen Math Turbo',
104
+ id: 'qwen-math-turbo-latest',
105
+ pricing: {
106
+ currency: 'CNY',
107
+ input: 2,
108
+ output: 6,
109
+ },
110
+ type: 'chat',
111
+ },
112
+ {
113
+ contextWindowTokens: 4096,
114
+ description: '通义千问数学模型是专门用于数学解题的语言模型。',
115
+ displayName: 'Qwen Math Plus',
116
+ id: 'qwen-math-plus-latest',
117
+ pricing: {
118
+ currency: 'CNY',
119
+ input: 4,
120
+ output: 12,
121
+ },
122
+ type: 'chat',
123
+ },
124
+ {
125
+ contextWindowTokens: 131_072,
126
+ description: '通义千问代码模型。',
127
+ displayName: 'Qwen Coder Turbo',
128
+ id: 'qwen-coder-turbo-latest',
129
+ pricing: {
130
+ currency: 'CNY',
131
+ input: 2,
132
+ output: 6,
133
+ },
134
+ type: 'chat',
135
+ },
136
+ {
137
+ contextWindowTokens: 131_072,
138
+ description: '通义千问代码模型。',
139
+ displayName: 'Qwen Coder Plus',
140
+ id: 'qwen-coder-plus-latest',
141
+ pricing: {
142
+ currency: 'CNY',
143
+ input: 3.5,
144
+ output: 7,
145
+ },
146
+ type: 'chat',
147
+ },
148
+ {
149
+ contextWindowTokens: 32_768,
150
+ description: 'QwQ模型是由 Qwen 团队开发的实验性研究模型,专注于增强 AI 推理能力。',
151
+ displayName: 'QwQ 32B Preview',
152
+ id: 'qwq-32b-preview',
153
+ pricing: {
154
+ currency: 'CNY',
155
+ input: 0,
156
+ output: 0,
157
+ },
158
+ type: 'chat',
159
+ },
160
+ {
161
+ abilities: {
162
+ functionCall: true,
163
+ },
164
+ contextWindowTokens: 131_072,
165
+ description: '通义千问2.5对外开源的7B规模的模型。',
166
+ displayName: 'Qwen2.5 7B',
167
+ id: 'qwen2.5-7b-instruct',
168
+ pricing: {
169
+ currency: 'CNY',
170
+ input: 1,
171
+ output: 2,
172
+ },
173
+ type: 'chat',
174
+ },
175
+ {
176
+ abilities: {
177
+ functionCall: true,
178
+ },
179
+ contextWindowTokens: 131_072,
180
+ description: '通义千问2.5对外开源的14B规模的模型。',
181
+ displayName: 'Qwen2.5 14B',
182
+ id: 'qwen2.5-14b-instruct',
183
+ pricing: {
184
+ currency: 'CNY',
185
+ input: 2,
186
+ output: 6,
187
+ },
188
+ type: 'chat',
189
+ },
190
+ {
191
+ abilities: {
192
+ functionCall: true,
193
+ },
194
+ contextWindowTokens: 131_072,
195
+ description: '通义千问2.5对外开源的32B规模的模型。',
196
+ displayName: 'Qwen2.5 32B',
197
+ id: 'qwen2.5-32b-instruct',
198
+ pricing: {
199
+ currency: 'CNY',
200
+ input: 3.5,
201
+ output: 7,
202
+ },
203
+ type: 'chat',
204
+ },
205
+ {
206
+ abilities: {
207
+ functionCall: true,
208
+ },
209
+ contextWindowTokens: 131_072,
210
+ description: '通义千问2.5对外开源的72B规模的模型。',
211
+ displayName: 'Qwen2.5 72B',
212
+ id: 'qwen2.5-72b-instruct',
213
+ pricing: {
214
+ currency: 'CNY',
215
+ input: 4,
216
+ output: 12,
217
+ },
218
+ type: 'chat',
219
+ },
220
+ {
221
+ contextWindowTokens: 4096,
222
+ description: 'Qwen-Math 模型具有强大的数学解题能力。',
223
+ displayName: 'Qwen2.5 Math 7B',
224
+ id: 'qwen2.5-math-7b-instruct',
225
+ pricing: {
226
+ currency: 'CNY',
227
+ input: 1,
228
+ output: 2,
229
+ },
230
+ type: 'chat',
231
+ },
232
+ {
233
+ contextWindowTokens: 4096,
234
+ description: 'Qwen-Math 模型具有强大的数学解题能力。',
235
+ displayName: 'Qwen2.5 Math 72B',
236
+ id: 'qwen2.5-math-72b-instruct',
237
+ pricing: {
238
+ currency: 'CNY',
239
+ input: 4,
240
+ output: 12,
241
+ },
242
+ type: 'chat',
243
+ },
244
+ {
245
+ contextWindowTokens: 131_072,
246
+ description: '通义千问代码模型开源版。',
247
+ displayName: 'Qwen2.5 Coder 7B',
248
+ id: 'qwen2.5-coder-7b-instruct',
249
+ pricing: {
250
+ currency: 'CNY',
251
+ input: 1,
252
+ output: 2,
253
+ },
254
+ type: 'chat',
255
+ },
256
+ {
257
+ contextWindowTokens: 131_072,
258
+ description: '通义千问代码模型开源版。',
259
+ displayName: 'Qwen2.5 Coder 32B',
260
+ id: 'qwen2.5-coder-32b-instruct',
261
+ pricing: {
262
+ currency: 'CNY',
263
+ input: 3.5,
264
+ output: 7,
265
+ },
266
+ type: 'chat',
267
+ },
268
+ {
269
+ abilities: {
270
+ vision: true,
271
+ },
272
+ contextWindowTokens: 8000,
273
+ description: '以 Qwen-7B 语言模型初始化,添加图像模型,图像输入分辨率为448的预训练模型。',
274
+ displayName: 'Qwen VL',
275
+ id: 'qwen-vl-v1',
276
+ pricing: {
277
+ currency: 'CNY',
278
+ input: 0,
279
+ output: 0,
280
+ },
281
+ type: 'chat',
282
+ },
283
+ {
284
+ abilities: {
285
+ vision: true,
286
+ },
287
+ contextWindowTokens: 8000,
288
+ description: '通义千问VL支持灵活的交互方式,包括多图、多轮问答、创作等能力的模型。',
289
+ displayName: 'Qwen VL Chat',
290
+ id: 'qwen-vl-chat-v1',
291
+ pricing: {
292
+ currency: 'CNY',
293
+ input: 0,
294
+ output: 0,
295
+ },
296
+ type: 'chat',
297
+ },
298
+ ];
299
+
300
+ export const allModels = [...qwenChatModels];
301
+
302
+ export default allModels;