fix(knowledge): 统一向量化费用归属说明

This commit is contained in:
2026-09-15 10:00:06 +08:00
parent 5ed21835ae
commit c466039adb
7 changed files with 23 additions and 10 deletions

View File

@@ -20,8 +20,10 @@ function openCreation() {
it('explains who configures an empty embedding catalog and refreshes without losing the name', async () => {
api.call.mockResolvedValueOnce(empty).mockResolvedValueOnce(available);
openCreation();
expect(await screen.findByText('暂时没有可用的向量模型。请联系平台管理员在 Yuxi 完成配置,然后刷新。')).toBeVisible();
expect(await screen.findByText('暂时没有可用的向量模型。Embedding 只在 Yuxi 配置,请联系平台管理员启用后刷新;向量化费用由平台承担,不计入用户用量或智能体费用上限。')).toBeVisible();
expect(screen.getByRole('combobox', { name: '向量模型' })).toBeDisabled();
expect(screen.getByText(/上传到知识库的文档可供/)).toHaveTextContent('embedding 向量化由平台承担,不计入用户用量、词元点数或智能体费用上限');
expect(screen.getByText(/上传到知识库的文档可供/)).toHaveTextContent('知识处理如触发对话模型调用,仍按原模型实际用量计费');
fireEvent.click(screen.getByText('管理员配置说明'));
expect(screen.getByText(/Yuxi 后台/)).toHaveTextContent('智能体管理 → 模型供应商');
expect(screen.getByText(/Yuxi 后台/)).toHaveTextContent('服务地址和 API Key');