@lobehub/chat 1.111.1 → 1.111.3

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 (131) hide show
  1. package/.cursor/rules/code-review.mdc +2 -19
  2. package/.cursor/rules/cursor-ux.mdc +0 -72
  3. package/.cursor/rules/project-introduce.mdc +5 -5
  4. package/.cursor/rules/react-component.mdc +92 -73
  5. package/.cursor/rules/rules-attach.mdc +28 -61
  6. package/.cursor/rules/system-role.mdc +8 -20
  7. package/.cursor/rules/typescript.mdc +55 -14
  8. package/CHANGELOG.md +52 -0
  9. package/changelog/v1.json +14 -0
  10. package/locales/ar/models.json +21 -3
  11. package/locales/bg-BG/models.json +21 -3
  12. package/locales/de-DE/models.json +21 -3
  13. package/locales/en-US/models.json +21 -3
  14. package/locales/es-ES/models.json +21 -3
  15. package/locales/fa-IR/models.json +21 -3
  16. package/locales/fr-FR/models.json +21 -3
  17. package/locales/it-IT/models.json +21 -3
  18. package/locales/ja-JP/models.json +21 -3
  19. package/locales/ko-KR/models.json +21 -3
  20. package/locales/nl-NL/models.json +21 -3
  21. package/locales/pl-PL/models.json +21 -3
  22. package/locales/pt-BR/models.json +21 -3
  23. package/locales/ru-RU/models.json +21 -3
  24. package/locales/tr-TR/models.json +21 -3
  25. package/locales/vi-VN/models.json +21 -3
  26. package/locales/zh-CN/models.json +21 -3
  27. package/locales/zh-TW/models.json +21 -3
  28. package/package.json +1 -1
  29. package/packages/types/src/aiModel.ts +67 -46
  30. package/packages/types/src/hotkey.ts +2 -0
  31. package/packages/types/src/llm.ts +3 -3
  32. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/PinList/index.tsx +3 -3
  33. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.test.tsx +1 -0
  34. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.tsx +11 -2
  35. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/index.tsx +2 -2
  36. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -2
  37. package/src/app/[variants]/(main)/chat/_layout/Desktop/SessionPanel.tsx +2 -2
  38. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/Details/Overview/ProviderList/index.tsx +23 -12
  39. package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/features/Details/Overview/ModelList/index.tsx +23 -10
  40. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx +21 -12
  41. package/src/components/Thinking/index.tsx +53 -13
  42. package/src/config/aiModels/ai21.ts +8 -4
  43. package/src/config/aiModels/ai360.ts +28 -14
  44. package/src/config/aiModels/aihubmix.ts +174 -86
  45. package/src/config/aiModels/anthropic.ts +97 -38
  46. package/src/config/aiModels/azure.ts +54 -32
  47. package/src/config/aiModels/azureai.ts +63 -37
  48. package/src/config/aiModels/baichuan.ts +24 -12
  49. package/src/config/aiModels/bedrock.ts +60 -30
  50. package/src/config/aiModels/cohere.ts +60 -30
  51. package/src/config/aiModels/deepseek.ts +10 -6
  52. package/src/config/aiModels/fireworksai.ts +88 -44
  53. package/src/config/aiModels/giteeai.ts +1 -1
  54. package/src/config/aiModels/github.ts +44 -26
  55. package/src/config/aiModels/google.ts +119 -68
  56. package/src/config/aiModels/groq.ts +48 -24
  57. package/src/config/aiModels/higress.ts +617 -310
  58. package/src/config/aiModels/hunyuan.ts +105 -54
  59. package/src/config/aiModels/infiniai.ts +104 -52
  60. package/src/config/aiModels/internlm.ts +16 -8
  61. package/src/config/aiModels/jina.ts +4 -2
  62. package/src/config/aiModels/minimax.ts +11 -10
  63. package/src/config/aiModels/mistral.ts +40 -20
  64. package/src/config/aiModels/moonshot.ts +42 -22
  65. package/src/config/aiModels/novita.ts +196 -98
  66. package/src/config/aiModels/openai.ts +270 -137
  67. package/src/config/aiModels/openrouter.ts +205 -100
  68. package/src/config/aiModels/perplexity.ts +36 -6
  69. package/src/config/aiModels/ppio.ts +76 -38
  70. package/src/config/aiModels/qwen.ts +257 -133
  71. package/src/config/aiModels/sambanova.ts +56 -28
  72. package/src/config/aiModels/sensenova.ts +100 -50
  73. package/src/config/aiModels/siliconcloud.ts +224 -112
  74. package/src/config/aiModels/stepfun.ts +44 -22
  75. package/src/config/aiModels/taichu.ts +8 -4
  76. package/src/config/aiModels/tencentcloud.ts +12 -6
  77. package/src/config/aiModels/upstage.ts +8 -4
  78. package/src/config/aiModels/v0.ts +15 -12
  79. package/src/config/aiModels/vertexai.ts +49 -27
  80. package/src/config/aiModels/volcengine.ts +110 -51
  81. package/src/config/aiModels/wenxin.ts +179 -73
  82. package/src/config/aiModels/xai.ts +33 -19
  83. package/src/config/aiModels/zeroone.ts +48 -24
  84. package/src/config/aiModels/zhipu.ts +118 -69
  85. package/src/config/modelProviders/ai21.ts +0 -8
  86. package/src/config/modelProviders/ai360.ts +0 -20
  87. package/src/config/modelProviders/anthropic.ts +0 -56
  88. package/src/config/modelProviders/baichuan.ts +0 -30
  89. package/src/config/modelProviders/bedrock.ts +0 -74
  90. package/src/config/modelProviders/deepseek.ts +0 -13
  91. package/src/config/modelProviders/fireworksai.ts +0 -88
  92. package/src/config/modelProviders/google.ts +0 -59
  93. package/src/config/modelProviders/groq.ts +0 -48
  94. package/src/config/modelProviders/higress.ts +0 -727
  95. package/src/config/modelProviders/hunyuan.ts +0 -45
  96. package/src/config/modelProviders/infiniai.ts +0 -60
  97. package/src/config/modelProviders/internlm.ts +0 -8
  98. package/src/config/modelProviders/mistral.ts +0 -48
  99. package/src/config/modelProviders/modelscope.ts +2 -1
  100. package/src/config/modelProviders/openai.ts +5 -100
  101. package/src/config/modelProviders/openrouter.ts +0 -77
  102. package/src/config/modelProviders/ppio.ts +0 -95
  103. package/src/config/modelProviders/qwen.ts +0 -165
  104. package/src/config/modelProviders/sensenova.ts +0 -45
  105. package/src/config/modelProviders/siliconcloud.ts +0 -266
  106. package/src/config/modelProviders/stepfun.ts +0 -60
  107. package/src/config/modelProviders/taichu.ts +0 -10
  108. package/src/config/modelProviders/wenxin.ts +0 -90
  109. package/src/config/modelProviders/xai.ts +0 -16
  110. package/src/config/modelProviders/zeroone.ts +0 -60
  111. package/src/config/modelProviders/zhipu.ts +0 -80
  112. package/src/const/hotkeys.ts +6 -0
  113. package/src/features/Conversation/Extras/Usage/UsageDetail/ModelCard.tsx +4 -3
  114. package/src/features/Conversation/Extras/Usage/UsageDetail/pricing.ts +25 -15
  115. package/src/features/Conversation/Extras/Usage/UsageDetail/tokens.test.ts +7 -5
  116. package/src/features/Conversation/Extras/Usage/UsageDetail/tokens.ts +6 -5
  117. package/src/hooks/useHotkeys/chatScope.ts +2 -2
  118. package/src/hooks/useHotkeys/globalScope.ts +16 -4
  119. package/src/hooks/usePinnedAgentState.ts +21 -0
  120. package/src/hooks/useSwitchSession.ts +1 -1
  121. package/src/libs/model-runtime/utils/openaiCompatibleFactory/index.test.ts +54 -8
  122. package/src/locales/default/hotkey.ts +4 -0
  123. package/src/server/routers/lambda/agent.ts +2 -2
  124. package/src/server/routers/lambda/config/__snapshots__/index.test.ts.snap +0 -28
  125. package/src/server/services/discover/index.ts +7 -6
  126. package/src/server/services/user/index.ts +1 -2
  127. package/src/utils/__snapshots__/parseModels.test.ts.snap +28 -4
  128. package/src/utils/_deprecated/__snapshots__/parseModels.test.ts.snap +0 -8
  129. package/src/utils/parseModels.test.ts +60 -9
  130. package/src/utils/pricing.test.ts +183 -0
  131. package/src/utils/pricing.ts +90 -0
@@ -12,10 +12,6 @@ const Google: ModelProviderCard = {
12
12
  functionCall: true,
13
13
  id: 'gemini-2.5-pro-exp-03-25',
14
14
  maxOutput: 65_536,
15
- pricing: {
16
- input: 0,
17
- output: 0,
18
- },
19
15
  releasedAt: '2025-03-25',
20
16
  vision: true,
21
17
  },
@@ -28,11 +24,6 @@ const Google: ModelProviderCard = {
28
24
  functionCall: true,
29
25
  id: 'gemini-2.0-pro-exp-02-05',
30
26
  maxOutput: 8192,
31
- pricing: {
32
- cachedInput: 0,
33
- input: 0,
34
- output: 0,
35
- },
36
27
  releasedAt: '2025-02-05',
37
28
  vision: true,
38
29
  },
@@ -45,11 +36,6 @@ const Google: ModelProviderCard = {
45
36
  functionCall: true,
46
37
  id: 'gemini-2.0-flash',
47
38
  maxOutput: 8192,
48
- pricing: {
49
- cachedInput: 0.025,
50
- input: 0.1,
51
- output: 0.4,
52
- },
53
39
  releasedAt: '2025-02-05',
54
40
  vision: true,
55
41
  },
@@ -61,11 +47,6 @@ const Google: ModelProviderCard = {
61
47
  functionCall: true,
62
48
  id: 'gemini-2.0-flash-001',
63
49
  maxOutput: 8192,
64
- pricing: {
65
- cachedInput: 0.025,
66
- input: 0.1,
67
- output: 0.4,
68
- },
69
50
  releasedAt: '2025-02-05',
70
51
  vision: true,
71
52
  },
@@ -75,11 +56,6 @@ const Google: ModelProviderCard = {
75
56
  displayName: 'Gemini 2.0 Flash-Lite Preview 02-05',
76
57
  id: 'gemini-2.0-flash-lite-preview-02-05',
77
58
  maxOutput: 8192,
78
- pricing: {
79
- cachedInput: 0.018_75,
80
- input: 0.075,
81
- output: 0.3,
82
- },
83
59
  releasedAt: '2025-02-05',
84
60
  vision: true,
85
61
  },
@@ -91,11 +67,6 @@ const Google: ModelProviderCard = {
91
67
  enabled: true,
92
68
  id: 'gemini-2.0-flash-thinking-exp-01-21',
93
69
  maxOutput: 65_536,
94
- pricing: {
95
- cachedInput: 0,
96
- input: 0,
97
- output: 0,
98
- },
99
70
  releasedAt: '2025-01-21',
100
71
  vision: true,
101
72
  },
@@ -107,11 +78,6 @@ const Google: ModelProviderCard = {
107
78
  functionCall: true,
108
79
  id: 'learnlm-1.5-pro-experimental',
109
80
  maxOutput: 8192,
110
- pricing: {
111
- cachedInput: 0,
112
- input: 0,
113
- output: 0,
114
- },
115
81
  releasedAt: '2024-11-19',
116
82
  vision: true,
117
83
  },
@@ -122,11 +88,6 @@ const Google: ModelProviderCard = {
122
88
  functionCall: true,
123
89
  id: 'gemini-1.5-flash-002',
124
90
  maxOutput: 8192,
125
- pricing: {
126
- cachedInput: 0.018_75,
127
- input: 0.075,
128
- output: 0.3,
129
- },
130
91
  releasedAt: '2024-09-25',
131
92
  vision: true,
132
93
  },
@@ -137,11 +98,6 @@ const Google: ModelProviderCard = {
137
98
  functionCall: true,
138
99
  id: 'gemini-1.5-flash-001',
139
100
  maxOutput: 8192,
140
- pricing: {
141
- cachedInput: 0.018_75,
142
- input: 0.075,
143
- output: 0.3,
144
- },
145
101
  vision: true,
146
102
  },
147
103
  {
@@ -152,11 +108,6 @@ const Google: ModelProviderCard = {
152
108
  functionCall: true,
153
109
  id: 'gemini-1.5-pro-002',
154
110
  maxOutput: 8192,
155
- pricing: {
156
- cachedInput: 0.315,
157
- input: 1.25,
158
- output: 2.5,
159
- },
160
111
  releasedAt: '2024-09-24',
161
112
  vision: true,
162
113
  },
@@ -167,11 +118,6 @@ const Google: ModelProviderCard = {
167
118
  functionCall: true,
168
119
  id: 'gemini-1.5-pro-001',
169
120
  maxOutput: 8192,
170
- pricing: {
171
- cachedInput: 0.875,
172
- input: 3.5,
173
- output: 10.5,
174
- },
175
121
  releasedAt: '2024-02-15',
176
122
  vision: true,
177
123
  },
@@ -182,11 +128,6 @@ const Google: ModelProviderCard = {
182
128
  functionCall: true,
183
129
  id: 'gemini-1.5-flash-8b',
184
130
  maxOutput: 8192,
185
- pricing: {
186
- cachedInput: 0.02,
187
- input: 0.075,
188
- output: 0.3,
189
- },
190
131
  releasedAt: '2024-10-03',
191
132
  vision: true,
192
133
  },
@@ -13,10 +13,6 @@ const Groq: ModelProviderCard = {
13
13
  functionCall: true,
14
14
  id: 'llama-3.3-70b-versatile',
15
15
  maxOutput: 8192,
16
- pricing: {
17
- input: 0.05,
18
- output: 0.08,
19
- },
20
16
  },
21
17
  {
22
18
  contextWindowTokens: 8192,
@@ -26,10 +22,6 @@ const Groq: ModelProviderCard = {
26
22
  enabled: true,
27
23
  id: 'llama-3.2-11b-vision-preview',
28
24
  maxOutput: 8192,
29
- pricing: {
30
- input: 0.05,
31
- output: 0.08,
32
- },
33
25
  vision: true,
34
26
  },
35
27
  {
@@ -40,10 +32,6 @@ const Groq: ModelProviderCard = {
40
32
  enabled: true,
41
33
  id: 'llama-3.2-90b-vision-preview',
42
34
  maxOutput: 8192,
43
- pricing: {
44
- input: 0.59,
45
- output: 0.79,
46
- },
47
35
  vision: true,
48
36
  },
49
37
  {
@@ -55,10 +43,6 @@ const Groq: ModelProviderCard = {
55
43
  functionCall: true,
56
44
  id: 'llama-3.1-8b-instant',
57
45
  maxOutput: 8192,
58
- pricing: {
59
- input: 0.05,
60
- output: 0.08,
61
- },
62
46
  },
63
47
  {
64
48
  contextWindowTokens: 131_072,
@@ -69,10 +53,6 @@ const Groq: ModelProviderCard = {
69
53
  functionCall: true,
70
54
  id: 'llama-3.1-70b-versatile',
71
55
  maxOutput: 8192,
72
- pricing: {
73
- input: 0.59,
74
- output: 0.79,
75
- },
76
56
  },
77
57
  /*
78
58
  // Offline due to overwhelming demand! Stay tuned for updates.
@@ -89,10 +69,6 @@ const Groq: ModelProviderCard = {
89
69
  displayName: 'Llama 3 Groq 8B Tool Use (Preview)',
90
70
  functionCall: true,
91
71
  id: 'llama3-groq-8b-8192-tool-use-preview',
92
- pricing: {
93
- input: 0.19,
94
- output: 0.19,
95
- },
96
72
  },
97
73
  {
98
74
  contextWindowTokens: 8192,
@@ -100,10 +76,6 @@ const Groq: ModelProviderCard = {
100
76
  displayName: 'Llama 3 Groq 70B Tool Use (Preview)',
101
77
  functionCall: true,
102
78
  id: 'llama3-groq-70b-8192-tool-use-preview',
103
- pricing: {
104
- input: 0.89,
105
- output: 0.89,
106
- },
107
79
  },
108
80
  {
109
81
  contextWindowTokens: 8192,
@@ -111,10 +83,6 @@ const Groq: ModelProviderCard = {
111
83
  displayName: 'Meta Llama 3 8B',
112
84
  functionCall: true,
113
85
  id: 'llama3-8b-8192',
114
- pricing: {
115
- input: 0.05,
116
- output: 0.08,
117
- },
118
86
  },
119
87
  {
120
88
  contextWindowTokens: 8192,
@@ -122,10 +90,6 @@ const Groq: ModelProviderCard = {
122
90
  displayName: 'Meta Llama 3 70B',
123
91
  functionCall: true,
124
92
  id: 'llama3-70b-8192',
125
- pricing: {
126
- input: 0.59,
127
- output: 0.79,
128
- },
129
93
  },
130
94
  {
131
95
  contextWindowTokens: 8192,
@@ -134,10 +98,6 @@ const Groq: ModelProviderCard = {
134
98
  enabled: true,
135
99
  functionCall: true,
136
100
  id: 'gemma2-9b-it',
137
- pricing: {
138
- input: 0.2,
139
- output: 0.2,
140
- },
141
101
  },
142
102
  {
143
103
  contextWindowTokens: 8192,
@@ -145,10 +105,6 @@ const Groq: ModelProviderCard = {
145
105
  displayName: 'Gemma 7B',
146
106
  functionCall: true,
147
107
  id: 'gemma-7b-it',
148
- pricing: {
149
- input: 0.07,
150
- output: 0.07,
151
- },
152
108
  },
153
109
  {
154
110
  contextWindowTokens: 32_768,
@@ -156,10 +112,6 @@ const Groq: ModelProviderCard = {
156
112
  displayName: 'Mixtral 8x7B',
157
113
  functionCall: true,
158
114
  id: 'mixtral-8x7b-32768',
159
- pricing: {
160
- input: 0.24,
161
- output: 0.24,
162
- },
163
115
  },
164
116
  {
165
117
  contextWindowTokens: 4096,