V4.14.10 dev (#6674)

* feat: model config with brand-new price calculate machanism (#6616)

* fix: image read and json error (Agent) (#6502)

* fix:
1.image read
2.JSON parsing error

* dataset cite and pause

* perf: plancall second parse

* add test

---------

Co-authored-by: archer <545436317@qq.com>

* master message

* remove invalid code

* wip: model config

* feat: model config with brand-new price calculate machanism

* merge main branch

* ajust calculate way

* ajust priceTiers resolve procession

* perf: price config code

* fix: default price

* fix: test

* fix: comment

* fix test

---------

Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com>
Co-authored-by: archer <545436317@qq.com>

* wip: fix modal UI (#6634)

* wip: fix modal UI

* fix: maxInputToken set

* chore: add price unit for non llm models

* chore: replace question mark icon with beta tag (#6672)

* feat:rerank too long; fix:rerank ui(agent),embedding returns 0 (#6663)

* feat:rerank too long; fix:rerank ui(agent),embedding returns 0

* rerank

* fix:rerank function

* perf: rerank code

* fix rerank

* perf: model price ui

---------

Co-authored-by: archer <545436317@qq.com>

* remove llmtype field

* revert model init

* fix: filed

* fix: model select filter

* perf: multiple selector render

* remove invalid checker

* remove invalid i18n

* perf: model selector tip

* perf: model selector tip

* fix cr

* limit pnpm version

* fix: i18n

* fix action

* set default mintoken

* update i18n

* perf: usage push

* fix:rerank model ui (#6677)

* fix: tier match error

* fix: testr

---------

Co-authored-by: Ryo <whoeverimf5@gmail.com>
Co-authored-by: YeYuheng <57035043+YYH211@users.noreply.github.com>
This commit is contained in:
Archer
2026-03-30 10:05:42 +08:00
committed by GitHub
parent 03dd9c00a8
commit 3f4400a500
108 changed files with 3774 additions and 1469 deletions
+26 -15
View File
@@ -1,20 +1,31 @@
import { vi } from 'vitest';
/**
* Mock addLog for testing
* 在测试中 mock 日志系统,避免测试输出中混入大量日志信息
* Mock @fastgpt/service/common/logger (otel logger) with console
*/
vi.mock('@fastgpt/service/common/system/log', () => ({
addLog: {
log: vi.fn(),
debug: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
error: vi.fn()
},
EventTypeEnum: {
outLinkBot: '[Outlink bot]',
feishuBot: '[Feishu bot]',
wxOffiaccount: '[Offiaccount bot]'
}
const consoleLogger = {
log: console.log,
debug: console.debug,
info: console.info,
warn: console.warn,
error: console.error
};
vi.mock('@fastgpt/service/common/logger', () => ({
getLogger: () => consoleLogger,
configureLogger: vi.fn(),
disposeLogger: vi.fn(),
LogCategories: new Proxy(
{},
{
get: (_target, prop) =>
new Proxy(
{},
{
get: (_t, p) =>
new Proxy({}, { get: (_t2, p2) => `${String(prop)}.${String(p)}.${String(p2)}` })
}
)
}
)
}));