@lobehub/lobehub 2.0.0-next.243 → 2.0.0-next.244
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/.github/workflows/test.yml +29 -14
- package/CHANGELOG.md +25 -0
- package/changelog/v1.json +5 -0
- package/locales/en-US/subscription.json +1 -1
- package/locales/zh-CN/subscription.json +1 -1
- package/package.json +1 -1
- package/src/locales/default/subscription.ts +1 -1
- package/src/services/__tests__/models.test.ts +2 -1
- package/src/services/chat/index.ts +1 -1
- package/src/services/models.ts +2 -2
- package/vitest.config.mts +0 -1
|
@@ -61,26 +61,41 @@ jobs:
|
|
|
61
61
|
|
|
62
62
|
- name: Upload coverage to Codecov
|
|
63
63
|
if: always()
|
|
64
|
+
env:
|
|
65
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
64
66
|
run: |
|
|
65
67
|
curl -Os https://cli.codecov.io/latest/linux/codecov
|
|
66
68
|
chmod +x codecov
|
|
67
|
-
|
|
69
|
+
|
|
70
|
+
# Build common args
|
|
71
|
+
COMMON_ARGS="--git-service github"
|
|
72
|
+
|
|
73
|
+
# PR args setup
|
|
74
|
+
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
|
75
|
+
COMMON_ARGS="$COMMON_ARGS --pr ${{ github.event.pull_request.number }}"
|
|
76
|
+
COMMON_ARGS="$COMMON_ARGS --sha ${{ github.event.pull_request.head.sha }}"
|
|
77
|
+
# Fork PR needs username:branch format for tokenless upload
|
|
78
|
+
if [ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]; then
|
|
79
|
+
COMMON_ARGS="$COMMON_ARGS --branch ${{ github.event.pull_request.head.label }}"
|
|
80
|
+
else
|
|
81
|
+
COMMON_ARGS="$COMMON_ARGS --branch ${{ github.event.pull_request.head.ref }}"
|
|
82
|
+
fi
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# Token (if available)
|
|
86
|
+
if [ -n "$CODECOV_TOKEN" ]; then
|
|
87
|
+
COMMON_ARGS="$COMMON_ARGS -t $CODECOV_TOKEN"
|
|
88
|
+
fi
|
|
89
|
+
|
|
68
90
|
for package in $PACKAGES; do
|
|
69
91
|
dir="${package#@lobechat/}"
|
|
70
92
|
if [ -f "./packages/$dir/coverage/lcov.info" ]; then
|
|
71
93
|
echo "Uploading coverage for $dir..."
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
--disable-search
|
|
78
|
-
else
|
|
79
|
-
./codecov upload-process \
|
|
80
|
-
-f ./packages/$dir/coverage/lcov.info \
|
|
81
|
-
-F packages/$dir \
|
|
82
|
-
--disable-search
|
|
83
|
-
fi
|
|
94
|
+
./codecov upload-coverage \
|
|
95
|
+
$COMMON_ARGS \
|
|
96
|
+
--file ./packages/$dir/coverage/lcov.info \
|
|
97
|
+
--flag packages/$dir \
|
|
98
|
+
--disable-search
|
|
84
99
|
fi
|
|
85
100
|
done
|
|
86
101
|
|
|
@@ -111,7 +126,7 @@ jobs:
|
|
|
111
126
|
run: bun i
|
|
112
127
|
|
|
113
128
|
- name: Run tests
|
|
114
|
-
run: bunx vitest --coverage --silent='passed-only' --shard=${{ matrix.shard }}/2
|
|
129
|
+
run: bunx vitest --coverage --silent='passed-only' --reporter=default --reporter=blob --shard=${{ matrix.shard }}/2
|
|
115
130
|
|
|
116
131
|
- name: Upload blob report
|
|
117
132
|
if: ${{ !cancelled() }}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.244](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.243...v2.0.0-next.244)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-08**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **api**: Fix the issue where custom AI Providers cannot use custom APIs.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **api**: Fix the issue where custom AI Providers cannot use custom APIs, closes [#11335](https://github.com/lobehub/lobe-chat/issues/11335) ([2c666b8](https://github.com/lobehub/lobe-chat/commit/2c666b8))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 2.0.0-next.243](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.242...v2.0.0-next.243)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2026-01-08**</sup>
|
package/changelog/v1.json
CHANGED
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
"qa.list.embeddings.q": "How is vector storage calculated?",
|
|
246
246
|
"qa.list.free.a": "{{name}} has always adhered to open source principles. For professional developers, you can use all open source capabilities through self-deployment of the community version. In {{cloud}}, we provide all registered users with {{credit}} free computing credits per month, ready to use without complex configuration. If you need more usage, you can subscribe to {{starter}}, {{premium}} or {{ultimate}}.",
|
|
247
247
|
"qa.list.free.q": "Can {{name}} be used for free?",
|
|
248
|
-
"qa.list.limit.a": "{{cloud}} subscription plans are divided into {{starter}}, {{premium}} and {{ultimate}}, each providing different computing credits. If your current plan credits are insufficient, we recommend upgrading. Alternatively, you can set up a custom model API key to use API credits purchased from other sources.",
|
|
248
|
+
"qa.list.limit.a": "{{cloud}} subscription plans are divided into {{starter}}, {{premium}} and {{ultimate}}, each providing different computing credits. If your current plan credits are insufficient, we recommend upgrading. You can also purchase credit packages on the <fundsLink>\"{{funds}}\"</fundsLink> page for pay-as-you-go usage. Alternatively, you can set up a custom model API key to use API credits purchased from other sources.",
|
|
249
249
|
"qa.list.limit.q": "What if I run out of computing credits?",
|
|
250
250
|
"qa.list.management.a": "On the {{subscribe}} page, you can \"Upgrade / Downgrade\" your current subscription plan, or switch between yearly and monthly billing. Through \"{{usage}}-{{management}}\" you can go to Stripe for subscription management, and you can cancel your subscription at any time. After cancellation, you will be automatically downgraded to the free version when your current plan expires.",
|
|
251
251
|
"qa.list.management.q": "How do I change or cancel my subscription?",
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
"qa.list.embeddings.q": "向量存储是如何计算的?",
|
|
246
246
|
"qa.list.free.a": "{{name}} 始终坚持开源原则。专业开发者可通过部署社区版使用全部开源功能。在 {{cloud}} 中,我们为所有注册用户每月提供 {{credit}} 点免费算力,无需复杂配置即可使用。如需更多使用量,可订阅 {{starter}}、{{premium}} 或 {{ultimate}}。",
|
|
247
247
|
"qa.list.free.q": "{{name}} 可以免费使用吗?",
|
|
248
|
-
"qa.list.limit.a": "{{cloud}} 的订阅计划分为 {{starter}}、{{premium}} 和 {{ultimate}}
|
|
248
|
+
"qa.list.limit.a": "{{cloud}} 的订阅计划分为 {{starter}}、{{premium}} 和 {{ultimate}},每个计划提供不同的算力点数。如当前计划点数不足,建议升级计划。您也可以在<fundsLink>「{{funds}}」</fundsLink>页面购买积分包进行按量付费充值。此外,您也可以配置自定义模型 API 密钥,使用其他来源购买的 API 点数。",
|
|
249
249
|
"qa.list.limit.q": "算力点数用完怎么办?",
|
|
250
250
|
"qa.list.management.a": "在 {{subscribe}} 页面,您可以“升级 / 降级”当前订阅计划,或切换年付与月付。在“{{usage}}-{{management}}”中可跳转至 Stripe 进行订阅管理,您可随时取消订阅。取消后,当前计划到期时将自动降级为免费版。",
|
|
251
251
|
"qa.list.management.q": "如何更改或取消订阅?",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.244",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent 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",
|
|
@@ -278,7 +278,7 @@ export default {
|
|
|
278
278
|
'{{name}} has always adhered to open source principles. For professional developers, you can use all open source capabilities through self-deployment of the community version. In {{cloud}}, we provide all registered users with {{credit}} free computing credits per month, ready to use without complex configuration. If you need more usage, you can subscribe to {{starter}}, {{premium}} or {{ultimate}}.',
|
|
279
279
|
'qa.list.free.q': 'Can {{name}} be used for free?',
|
|
280
280
|
'qa.list.limit.a':
|
|
281
|
-
'{{cloud}} subscription plans are divided into {{starter}}, {{premium}} and {{ultimate}}, each providing different computing credits. If your current plan credits are insufficient, we recommend upgrading. Alternatively, you can set up a custom model API key to use API credits purchased from other sources.',
|
|
281
|
+
'{{cloud}} subscription plans are divided into {{starter}}, {{premium}} and {{ultimate}}, each providing different computing credits. If your current plan credits are insufficient, we recommend upgrading. You can also purchase credit packages on the <fundsLink>"{{funds}}"</fundsLink> page for pay-as-you-go usage. Alternatively, you can set up a custom model API key to use API credits purchased from other sources.',
|
|
282
282
|
'qa.list.limit.q': 'What if I run out of computing credits?',
|
|
283
283
|
'qa.list.management.a':
|
|
284
284
|
'On the {{subscribe}} page, you can "Upgrade / Downgrade" your current subscription plan, or switch between yearly and monthly billing. Through "{{usage}}-{{management}}" you can go to Stripe for subscription management, and you can cancel your subscription at any time. After cancellation, you will be automatically downgraded to the free version when your current plan expires.',
|
|
@@ -82,7 +82,8 @@ describe('ModelsService', () => {
|
|
|
82
82
|
await modelsService.getModels('custom-provider');
|
|
83
83
|
|
|
84
84
|
expect(mockedResolveRuntimeProvider).toHaveBeenCalledWith('custom-provider');
|
|
85
|
-
|
|
85
|
+
// API endpoint uses original provider, allowing server to query correct config
|
|
86
|
+
expect(fetch).toHaveBeenCalledWith('/webapi/models/custom-provider', { headers: {} });
|
|
86
87
|
expect(mockedInitializeWithClientStore).not.toHaveBeenCalled();
|
|
87
88
|
});
|
|
88
89
|
|
|
@@ -402,7 +402,7 @@ class ChatService {
|
|
|
402
402
|
responseAnimation,
|
|
403
403
|
].reduce((acc, cur) => merge(acc, standardizeAnimationStyle(cur)), {});
|
|
404
404
|
|
|
405
|
-
return fetchSSE(API_ENDPOINTS.chat(
|
|
405
|
+
return fetchSSE(API_ENDPOINTS.chat(provider), {
|
|
406
406
|
body: JSON.stringify(payload),
|
|
407
407
|
fetcher: fetcher,
|
|
408
408
|
headers,
|
package/src/services/models.ts
CHANGED
|
@@ -49,7 +49,7 @@ export class ModelsService {
|
|
|
49
49
|
return agentRuntime.models();
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const res = await fetch(API_ENDPOINTS.models(
|
|
52
|
+
const res = await fetch(API_ENDPOINTS.models(provider), { headers });
|
|
53
53
|
if (!res.ok) return;
|
|
54
54
|
|
|
55
55
|
return res.json();
|
|
@@ -87,7 +87,7 @@ export class ModelsService {
|
|
|
87
87
|
});
|
|
88
88
|
res = (await agentRuntime.pullModel({ model }, { signal }))!;
|
|
89
89
|
} else {
|
|
90
|
-
res = await fetch(API_ENDPOINTS.modelPull(
|
|
90
|
+
res = await fetch(API_ENDPOINTS.modelPull(provider), {
|
|
91
91
|
body: JSON.stringify({ model }),
|
|
92
92
|
headers,
|
|
93
93
|
method: 'POST',
|