@lobehub/chat 1.25.0 → 1.25.1

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.25.1](https://github.com/lobehub/lobe-chat/compare/v1.25.0...v1.25.1)
6
+
7
+ <sup>Released on **2024-10-26**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix `modelList` merge.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix `modelList` merge, closes [#4491](https://github.com/lobehub/lobe-chat/issues/4491) ([ea422d8](https://github.com/lobehub/lobe-chat/commit/ea422d8))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ## [Version 1.25.0](https://github.com/lobehub/lobe-chat/compare/v1.24.2...v1.25.0)
6
31
 
7
32
  <sup>Released on **2024-10-26**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.25.0",
3
+ "version": "1.25.1",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -89,23 +89,10 @@ export const createModelListSlice: StateCreator<
89
89
  };
90
90
 
91
91
  const defaultModelProviderList = produce(DEFAULT_MODEL_PROVIDER_LIST, (draft) => {
92
- const openai = draft.find((d) => d.id === ModelProvider.OpenAI);
93
- if (openai) openai.chatModels = mergeModels('openai', openai.chatModels);
94
-
95
- const azure = draft.find((d) => d.id === ModelProvider.Azure);
96
- if (azure) azure.chatModels = mergeModels('azure', azure.chatModels);
97
-
98
- const ollama = draft.find((d) => d.id === ModelProvider.Ollama);
99
- if (ollama) ollama.chatModels = mergeModels('ollama', ollama.chatModels);
100
-
101
- const openrouter = draft.find((d) => d.id === ModelProvider.OpenRouter);
102
- if (openrouter) openrouter.chatModels = mergeModels('openrouter', openrouter.chatModels);
103
-
104
- const togetherai = draft.find((d) => d.id === ModelProvider.TogetherAI);
105
- if (togetherai) togetherai.chatModels = mergeModels('togetherai', togetherai.chatModels);
106
-
107
- const novita = draft.find((d) => d.id === ModelProvider.Novita);
108
- if (novita) novita.chatModels = mergeModels('novita', novita.chatModels);
92
+ Object.values(ModelProvider).forEach((id) =>{
93
+ const provider = draft.find((d) => d.id === id);
94
+ if (provider) provider.chatModels = mergeModels(id as any, provider.chatModels);
95
+ })
109
96
  });
110
97
 
111
98
  set({ defaultModelProviderList }, false, `refreshDefaultModelList - ${params?.trigger}`);