@lobehub/chat 1.124.1 → 1.124.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 (119) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/changelog/v1.json +18 -0
  3. package/package.json +1 -1
  4. package/packages/const/package.json +3 -1
  5. package/packages/const/src/analytics.ts +1 -1
  6. package/packages/const/src/desktop.ts +3 -2
  7. package/packages/const/src/discover.ts +3 -2
  8. package/packages/const/src/guide.ts +2 -2
  9. package/packages/const/src/hotkeys.ts +1 -1
  10. package/packages/const/src/index.ts +2 -0
  11. package/packages/const/src/settings/common.ts +1 -1
  12. package/packages/const/src/settings/genUserLLMConfig.test.ts +1 -2
  13. package/packages/const/src/settings/genUserLLMConfig.ts +1 -2
  14. package/packages/const/src/settings/hotkey.ts +3 -2
  15. package/packages/const/src/settings/index.ts +1 -3
  16. package/packages/const/src/settings/knowledge.ts +1 -1
  17. package/packages/const/src/settings/llm.ts +2 -4
  18. package/packages/const/src/settings/systemAgent.ts +1 -5
  19. package/packages/const/src/settings/tts.ts +1 -1
  20. package/packages/const/src/trace.ts +1 -1
  21. package/packages/const/src/url.ts +2 -2
  22. package/packages/const/src/user.ts +1 -2
  23. package/packages/database/src/client/db.test.ts +19 -13
  24. package/packages/electron-server-ipc/src/ipcClient.test.ts +783 -1
  25. package/packages/file-loaders/src/loadFile.test.ts +61 -0
  26. package/packages/file-loaders/src/utils/isTextReadableFile.test.ts +43 -0
  27. package/packages/file-loaders/src/utils/parser-utils.test.ts +155 -0
  28. package/packages/model-runtime/package.json +2 -1
  29. package/packages/model-runtime/src/ai21/index.test.ts +2 -2
  30. package/packages/model-runtime/src/ai360/index.test.ts +2 -2
  31. package/packages/model-runtime/src/akashchat/index.test.ts +19 -0
  32. package/packages/model-runtime/src/anthropic/index.test.ts +1 -2
  33. package/packages/model-runtime/src/baichuan/index.test.ts +1 -2
  34. package/packages/model-runtime/src/bedrock/index.test.ts +1 -2
  35. package/packages/model-runtime/src/bfl/createImage.test.ts +1 -2
  36. package/packages/model-runtime/src/bfl/index.test.ts +1 -2
  37. package/packages/model-runtime/src/cloudflare/index.test.ts +1 -2
  38. package/packages/model-runtime/src/cohere/index.test.ts +19 -0
  39. package/packages/model-runtime/src/deepseek/index.test.ts +2 -2
  40. package/packages/model-runtime/src/fireworksai/index.test.ts +2 -2
  41. package/packages/model-runtime/src/giteeai/index.test.ts +2 -2
  42. package/packages/model-runtime/src/github/index.test.ts +2 -2
  43. package/packages/model-runtime/src/google/createImage.test.ts +1 -2
  44. package/packages/model-runtime/src/google/index.test.ts +1 -1
  45. package/packages/model-runtime/src/groq/index.test.ts +2 -3
  46. package/packages/model-runtime/src/higress/index.ts +2 -3
  47. package/packages/model-runtime/src/huggingface/index.test.ts +40 -0
  48. package/packages/model-runtime/src/hunyuan/index.test.ts +2 -3
  49. package/packages/model-runtime/src/internlm/index.test.ts +2 -2
  50. package/packages/model-runtime/src/jina/index.test.ts +19 -0
  51. package/packages/model-runtime/src/lmstudio/index.test.ts +2 -2
  52. package/packages/model-runtime/src/minimax/index.test.ts +19 -0
  53. package/packages/model-runtime/src/mistral/index.test.ts +2 -3
  54. package/packages/model-runtime/src/modelscope/index.test.ts +19 -0
  55. package/packages/model-runtime/src/moonshot/index.test.ts +1 -2
  56. package/packages/model-runtime/src/nebius/index.test.ts +19 -0
  57. package/packages/model-runtime/src/novita/index.test.ts +3 -4
  58. package/packages/model-runtime/src/nvidia/index.test.ts +19 -0
  59. package/packages/model-runtime/src/openrouter/index.test.ts +2 -3
  60. package/packages/model-runtime/src/perplexity/index.test.ts +2 -3
  61. package/packages/model-runtime/src/ppio/index.test.ts +3 -4
  62. package/packages/model-runtime/src/qwen/index.test.ts +2 -2
  63. package/packages/model-runtime/src/sambanova/index.test.ts +19 -0
  64. package/packages/model-runtime/src/search1api/index.test.ts +19 -0
  65. package/packages/model-runtime/src/sensenova/index.test.ts +2 -2
  66. package/packages/model-runtime/src/spark/index.test.ts +2 -2
  67. package/packages/model-runtime/src/stepfun/index.test.ts +2 -2
  68. package/packages/model-runtime/src/taichu/index.test.ts +4 -5
  69. package/packages/model-runtime/src/tencentcloud/index.test.ts +1 -1
  70. package/packages/model-runtime/src/togetherai/index.test.ts +1 -2
  71. package/packages/model-runtime/src/upstage/index.test.ts +1 -2
  72. package/packages/model-runtime/src/utils/openaiCompatibleFactory/index.test.ts +9 -7
  73. package/packages/model-runtime/src/utils/streams/anthropic.ts +2 -2
  74. package/packages/model-runtime/src/utils/streams/openai/openai.ts +20 -13
  75. package/packages/model-runtime/src/utils/streams/openai/responsesStream.test.ts +1 -2
  76. package/packages/model-runtime/src/utils/streams/openai/responsesStream.ts +2 -2
  77. package/packages/model-runtime/src/utils/streams/protocol.ts +2 -2
  78. package/packages/model-runtime/src/wenxin/index.test.ts +2 -3
  79. package/packages/model-runtime/src/xai/index.test.ts +2 -2
  80. package/packages/model-runtime/src/zeroone/index.test.ts +1 -2
  81. package/packages/model-runtime/src/zhipu/index.test.ts +2 -3
  82. package/packages/model-runtime/vitest.config.mts +0 -7
  83. package/packages/types/src/discover/index.ts +0 -8
  84. package/packages/types/src/index.ts +4 -0
  85. package/packages/types/src/message/base.ts +1 -1
  86. package/packages/types/src/openai/chat.ts +2 -3
  87. package/packages/types/src/tool/index.ts +1 -0
  88. package/packages/types/src/tool/tool.ts +1 -1
  89. package/packages/types/src/user/settings/index.ts +1 -2
  90. package/packages/utils/package.json +2 -1
  91. package/packages/utils/src/_deprecated/parseModels.test.ts +1 -1
  92. package/packages/utils/src/_deprecated/parseModels.ts +1 -1
  93. package/packages/utils/src/client/topic.test.ts +1 -2
  94. package/packages/utils/src/client/topic.ts +1 -2
  95. package/packages/utils/src/electron/desktopRemoteRPCFetch.ts +1 -1
  96. package/packages/utils/src/fetch/fetchSSE.ts +7 -8
  97. package/packages/utils/src/fetch/parseError.ts +1 -3
  98. package/packages/utils/src/format.test.ts +1 -2
  99. package/packages/utils/src/index.ts +1 -0
  100. package/packages/utils/src/toolManifest.ts +1 -2
  101. package/packages/utils/src/trace.ts +1 -1
  102. package/packages/utils/vitest.config.mts +1 -2
  103. package/packages/web-crawler/src/__tests__/urlRules.test.ts +275 -0
  104. package/packages/web-crawler/src/crawImpl/__tests__/exa.test.ts +269 -0
  105. package/packages/web-crawler/src/crawImpl/__tests__/firecrawl.test.ts +284 -0
  106. package/packages/web-crawler/src/crawImpl/__tests__/naive.test.ts +234 -0
  107. package/packages/web-crawler/src/crawImpl/__tests__/tavily.test.ts +359 -0
  108. package/packages/web-crawler/src/utils/__tests__/errorType.test.ts +217 -0
  109. package/packages/web-crawler/vitest.config.mts +3 -0
  110. package/src/app/(backend)/webapi/models/[provider]/pull/route.ts +0 -2
  111. package/src/app/(backend)/webapi/models/[provider]/route.ts +0 -2
  112. package/src/app/(backend)/webapi/text-to-image/[provider]/route.ts +0 -2
  113. package/src/app/(backend)/webapi/trace/route.ts +0 -2
  114. package/src/components/Thinking/index.tsx +2 -3
  115. package/src/features/ChatInput/StoreUpdater.tsx +2 -0
  116. package/src/libs/traces/index.ts +1 -1
  117. package/src/server/modules/ModelRuntime/trace.ts +1 -2
  118. package/packages/const/src/settings/sync.ts +0 -5
  119. package/packages/model-runtime/src/openrouter/__snapshots__/index.test.ts.snap +0 -113
@@ -1,113 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`LobeOpenRouterAI > chat > should handle fetch error gracefully 1`] = `
4
- [
5
- {
6
- "contextWindowTokens": 131072,
7
- "description": "Reflection Llama-3.1 70B is trained with a new technique called Reflection-Tuning that teaches a LLM to detect mistakes in its reasoning and correct course.
8
-
9
- The model was trained on synthetic data.
10
-
11
- _These are free, rate-limited endpoints for [Reflection 70B](/models/mattshumer/reflection-70b). Outputs may be cached. Read about rate limits [here](/docs/limits)._",
12
- "displayName": "Reflection 70B",
13
- "enabled": false,
14
- "functionCall": false,
15
- "id": "mattshumer/reflection-70b:free",
16
- "maxOutput": undefined,
17
- "pricing": undefined,
18
- "reasoning": false,
19
- "releasedAt": "1970-01-20",
20
- "type": "chat",
21
- "vision": false,
22
- },
23
- ]
24
- `;
25
-
26
- exports[`LobeOpenRouterAI > chat > should handle fetch failure gracefully 1`] = `
27
- [
28
- {
29
- "contextWindowTokens": 131072,
30
- "description": "Reflection Llama-3.1 70B is trained with a new technique called Reflection-Tuning that teaches a LLM to detect mistakes in its reasoning and correct course.
31
-
32
- The model was trained on synthetic data.
33
-
34
- _These are free, rate-limited endpoints for [Reflection 70B](/models/mattshumer/reflection-70b). Outputs may be cached. Read about rate limits [here](/docs/limits)._",
35
- "displayName": "Reflection 70B",
36
- "enabled": false,
37
- "functionCall": false,
38
- "id": "mattshumer/reflection-70b:free",
39
- "maxOutput": undefined,
40
- "pricing": undefined,
41
- "reasoning": false,
42
- "releasedAt": "1970-01-20",
43
- "type": "chat",
44
- "vision": false,
45
- },
46
- ]
47
- `;
48
-
49
- exports[`LobeOpenRouterAI > models > should get models with frontend models data 1`] = `
50
- [
51
- {
52
- "contextWindowTokens": 131072,
53
- "description": "Reflection Llama-3.1 70B is trained with a new technique called Reflection-Tuning that teaches a LLM to detect mistakes in its reasoning and correct course.
54
-
55
- The model was trained on synthetic data.
56
-
57
- _These are free, rate-limited endpoints for [Reflection 70B](/models/mattshumer/reflection-70b). Outputs may be cached. Read about rate limits [here](/docs/limits)._",
58
- "displayName": "Reflection 70B",
59
- "enabled": false,
60
- "functionCall": true,
61
- "id": "mattshumer/reflection-70b:free",
62
- "maxOutput": 4096,
63
- "reasoning": true,
64
- "releasedAt": "2024-09-06",
65
- "type": "chat",
66
- "vision": false,
67
- },
68
- ]
69
- `;
70
-
71
- exports[`LobeOpenRouterAI > models > should handle fetch error gracefully 1`] = `
72
- [
73
- {
74
- "contextWindowTokens": 131072,
75
- "description": "Reflection Llama-3.1 70B is trained with a new technique called Reflection-Tuning that teaches a LLM to detect mistakes in its reasoning and correct course.
76
-
77
- The model was trained on synthetic data.
78
-
79
- _These are free, rate-limited endpoints for [Reflection 70B](/models/mattshumer/reflection-70b). Outputs may be cached. Read about rate limits [here](/docs/limits)._",
80
- "displayName": "Reflection 70B",
81
- "enabled": false,
82
- "functionCall": false,
83
- "id": "mattshumer/reflection-70b:free",
84
- "maxOutput": 4096,
85
- "reasoning": false,
86
- "releasedAt": "2024-09-06",
87
- "type": "chat",
88
- "vision": false,
89
- },
90
- ]
91
- `;
92
-
93
- exports[`LobeOpenRouterAI > models > should handle fetch failure gracefully 1`] = `
94
- [
95
- {
96
- "contextWindowTokens": 131072,
97
- "description": "Reflection Llama-3.1 70B is trained with a new technique called Reflection-Tuning that teaches a LLM to detect mistakes in its reasoning and correct course.
98
-
99
- The model was trained on synthetic data.
100
-
101
- _These are free, rate-limited endpoints for [Reflection 70B](/models/mattshumer/reflection-70b). Outputs may be cached. Read about rate limits [here](/docs/limits)._",
102
- "displayName": "Reflection 70B",
103
- "enabled": false,
104
- "functionCall": false,
105
- "id": "mattshumer/reflection-70b:free",
106
- "maxOutput": 4096,
107
- "reasoning": false,
108
- "releasedAt": "2024-09-06",
109
- "type": "chat",
110
- "vision": false,
111
- },
112
- ]
113
- `;