From 34842fc16ef7790e81439e3712a93a894bf7f25a Mon Sep 17 00:00:00 2001 From: DigHuang <114602213+DigHuang@users.noreply.github.com> Date: Wed, 29 Apr 2026 20:36:08 +0800 Subject: [PATCH] feat(reason): configurable reasoning effort with tool-call propagation (#6837) * feat(reason): reasoning effort config * feat: reasoning effort config ui * refactor: price UI and add bordered table style * feat(reason): add default reasoning effort and propagate to tool call node * chore: ai-proxy version * refactor(ai): narrow openai v6 tool types and tidy reasoning UI * chore(ai): drop unused httpsAgent global and restore error-path * feat(ai): add reasoning effort tip in AI settings modal --- deploy/dev/docker-compose.cn.yml | 2 +- deploy/dev/docker-compose.yml | 2 +- deploy/docker/cn/docker-compose.milvus.yml | 2 +- deploy/docker/cn/docker-compose.oceanbase.yml | 2 +- deploy/docker/cn/docker-compose.opengauss.yml | 2 +- deploy/docker/cn/docker-compose.pg.yml | 2 +- deploy/docker/cn/docker-compose.seekdb.yml | 2 +- deploy/docker/cn/docker-compose.zilliz.yml | 2 +- .../docker/global/docker-compose.milvus.yml | 2 +- .../global/docker-compose.oceanbase.yml | 2 +- .../global/docker-compose.opengauss.yml | 2 +- deploy/docker/global/docker-compose.pg.yml | 2 +- .../docker/global/docker-compose.seekdb.yml | 2 +- .../docker/global/docker-compose.zilliz.yml | 2 +- packages/global/core/ai/constants.ts | 12 +- packages/global/core/ai/llm/type.ts | 8 + packages/global/core/ai/llm/utils.ts | 1 + packages/global/core/ai/model.schema.ts | 1 + packages/global/core/app/formEdit/type.ts | 3 + packages/global/core/app/type.ts | 2 + packages/global/core/type.ts | 5 - packages/global/core/workflow/constants.ts | 1 + packages/global/core/workflow/runtime/type.ts | 2 + .../workflow/template/system/aiChat/index.ts | 6 + .../core/workflow/template/system/toolCall.ts | 6 + packages/global/package.json | 4 +- packages/service/common/middle/httpAgent.ts | 13 - packages/service/core/ai/config.ts | 2 +- packages/service/core/ai/config/utils.ts | 6 +- packages/service/core/ai/llm/request.ts | 31 +- .../service/core/workflow/dispatch/ai/chat.ts | 2 + .../workflow/dispatch/ai/toolcall/toolCall.ts | 2 + .../workflow/dispatch/ai/toolcall/type.ts | 2 + packages/service/package.json | 1 - .../service/test/core/ai/llm/request.test.ts | 178 +++++ .../web/components/common/MySelect/index.tsx | 2 +- packages/web/i18n/en/account.json | 5 +- packages/web/i18n/en/app.json | 9 +- packages/web/i18n/en/common.json | 7 + packages/web/i18n/zh-CN/account.json | 5 +- packages/web/i18n/zh-CN/app.json | 9 +- packages/web/i18n/zh-CN/common.json | 7 + packages/web/i18n/zh-Hant/account.json | 5 +- packages/web/i18n/zh-Hant/app.json | 9 +- packages/web/i18n/zh-Hant/common.json | 7 + packages/web/styles/theme.ts | 51 ++ pnpm-lock.yaml | 543 +++---------- .../core/ai/AISettingModal/index.tsx | 718 +++++++++--------- .../components/core/ai/PriceTiersLabel.tsx | 342 +++++---- .../account/model/AddModelBox.tsx | 15 + .../app/detail/Edit/SimpleApp/EditForm.tsx | 1 + .../RenderInput/templates/SettingLLMModel.tsx | 3 + .../app/src/service/common/system/index.ts | 2 - 53 files changed, 1062 insertions(+), 994 deletions(-) delete mode 100644 packages/global/core/type.ts delete mode 100644 packages/service/common/middle/httpAgent.ts diff --git a/deploy/dev/docker-compose.cn.yml b/deploy/dev/docker-compose.cn.yml index 65388854fd..2bb480140b 100644 --- a/deploy/dev/docker-compose.cn.yml +++ b/deploy/dev/docker-compose.cn.yml @@ -323,7 +323,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.3 + image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped ports: diff --git a/deploy/dev/docker-compose.yml b/deploy/dev/docker-compose.yml index 95304b3350..98e9642a75 100644 --- a/deploy/dev/docker-compose.yml +++ b/deploy/dev/docker-compose.yml @@ -323,7 +323,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: ghcr.io/labring/aiproxy:v0.5.3 + image: ghcr.io/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped ports: diff --git a/deploy/docker/cn/docker-compose.milvus.yml b/deploy/docker/cn/docker-compose.milvus.yml index 89f1761856..a307b06707 100644 --- a/deploy/docker/cn/docker-compose.milvus.yml +++ b/deploy/docker/cn/docker-compose.milvus.yml @@ -463,7 +463,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.3 + image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/cn/docker-compose.oceanbase.yml b/deploy/docker/cn/docker-compose.oceanbase.yml index ec6f9e4177..da6c410e8e 100644 --- a/deploy/docker/cn/docker-compose.oceanbase.yml +++ b/deploy/docker/cn/docker-compose.oceanbase.yml @@ -441,7 +441,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.3 + image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/cn/docker-compose.opengauss.yml b/deploy/docker/cn/docker-compose.opengauss.yml index ab79fdaa1f..0264ae8db5 100644 --- a/deploy/docker/cn/docker-compose.opengauss.yml +++ b/deploy/docker/cn/docker-compose.opengauss.yml @@ -424,7 +424,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.3 + image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/cn/docker-compose.pg.yml b/deploy/docker/cn/docker-compose.pg.yml index 8d3275f004..a00081fc5e 100644 --- a/deploy/docker/cn/docker-compose.pg.yml +++ b/deploy/docker/cn/docker-compose.pg.yml @@ -423,7 +423,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.3 + image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/cn/docker-compose.seekdb.yml b/deploy/docker/cn/docker-compose.seekdb.yml index e67cc9d357..3261b656fb 100644 --- a/deploy/docker/cn/docker-compose.seekdb.yml +++ b/deploy/docker/cn/docker-compose.seekdb.yml @@ -428,7 +428,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.3 + image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/cn/docker-compose.zilliz.yml b/deploy/docker/cn/docker-compose.zilliz.yml index 31d96c01a9..7257a934d2 100644 --- a/deploy/docker/cn/docker-compose.zilliz.yml +++ b/deploy/docker/cn/docker-compose.zilliz.yml @@ -406,7 +406,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.3 + image: registry.cn-hangzhou.aliyuncs.com/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/global/docker-compose.milvus.yml b/deploy/docker/global/docker-compose.milvus.yml index 6c1739be94..84c0798631 100644 --- a/deploy/docker/global/docker-compose.milvus.yml +++ b/deploy/docker/global/docker-compose.milvus.yml @@ -463,7 +463,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: ghcr.io/labring/aiproxy:v0.5.3 + image: ghcr.io/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/global/docker-compose.oceanbase.yml b/deploy/docker/global/docker-compose.oceanbase.yml index 876d91a6f9..fd8e38ab45 100644 --- a/deploy/docker/global/docker-compose.oceanbase.yml +++ b/deploy/docker/global/docker-compose.oceanbase.yml @@ -441,7 +441,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: ghcr.io/labring/aiproxy:v0.5.3 + image: ghcr.io/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/global/docker-compose.opengauss.yml b/deploy/docker/global/docker-compose.opengauss.yml index f13fae7869..58ad7efbff 100644 --- a/deploy/docker/global/docker-compose.opengauss.yml +++ b/deploy/docker/global/docker-compose.opengauss.yml @@ -424,7 +424,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: ghcr.io/labring/aiproxy:v0.5.3 + image: ghcr.io/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/global/docker-compose.pg.yml b/deploy/docker/global/docker-compose.pg.yml index 9c4c31d3ec..9a2c698fc3 100644 --- a/deploy/docker/global/docker-compose.pg.yml +++ b/deploy/docker/global/docker-compose.pg.yml @@ -423,7 +423,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: ghcr.io/labring/aiproxy:v0.5.3 + image: ghcr.io/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/global/docker-compose.seekdb.yml b/deploy/docker/global/docker-compose.seekdb.yml index c9ca67d451..b211bbbb61 100644 --- a/deploy/docker/global/docker-compose.seekdb.yml +++ b/deploy/docker/global/docker-compose.seekdb.yml @@ -428,7 +428,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: ghcr.io/labring/aiproxy:v0.5.3 + image: ghcr.io/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/deploy/docker/global/docker-compose.zilliz.yml b/deploy/docker/global/docker-compose.zilliz.yml index cbd946622d..434f502c56 100644 --- a/deploy/docker/global/docker-compose.zilliz.yml +++ b/deploy/docker/global/docker-compose.zilliz.yml @@ -406,7 +406,7 @@ services: # AI Proxy fastgpt-aiproxy: - image: ghcr.io/labring/aiproxy:v0.5.3 + image: ghcr.io/labring/aiproxy:v0.5.6 container_name: fastgpt-aiproxy restart: unless-stopped depends_on: diff --git a/packages/global/core/ai/constants.ts b/packages/global/core/ai/constants.ts index 6f620cfe8b..8c30cfb629 100644 --- a/packages/global/core/ai/constants.ts +++ b/packages/global/core/ai/constants.ts @@ -1,5 +1,5 @@ import { i18nT } from '../../../web/i18n/utils'; -import type { CompletionUsage } from './llm/type'; +import type { CompletionUsage, ReasoningEffort } from './llm/type'; import type { LLMModelItemType, EmbeddingModelItemType, STTModelType } from './model.schema'; export const getLLMDefaultUsage = (): CompletionUsage => { @@ -88,6 +88,16 @@ export enum EmbeddingTypeEnm { db = 'db' } +export const reasoningEffortList: { label: string; value: ReasoningEffort }[] = [ + { label: i18nT('common:reasoning_effort.default'), value: null }, + { label: i18nT('common:reasoning_effort.none'), value: 'none' }, + { label: i18nT('common:reasoning_effort.minimal'), value: 'minimal' }, + { label: i18nT('common:reasoning_effort.low'), value: 'low' }, + { label: i18nT('common:reasoning_effort.medium'), value: 'medium' }, + { label: i18nT('common:reasoning_effort.high'), value: 'high' }, + { label: i18nT('common:reasoning_effort.xhigh'), value: 'xhigh' } +]; + export const completionFinishReasonMap = { error: i18nT('chat:completion_finish_error'), close: i18nT('chat:completion_finish_close'), diff --git a/packages/global/core/ai/llm/type.ts b/packages/global/core/ai/llm/type.ts index f4ab83609b..d0220ef598 100644 --- a/packages/global/core/ai/llm/type.ts +++ b/packages/global/core/ai/llm/type.ts @@ -242,6 +242,14 @@ export type CompletionFinishReason = z.infer { vision: !!llm?.vision, temperature: typeof llm?.maxTemperature === 'number', reasoning: !!llm?.reasoning, + reasoningEffort: !!llm?.reasoningEffort, topP: !!llm?.showTopP, stop: !!llm?.showStopSign, responseFormat: !!(llm?.responseFormatList && llm?.responseFormatList.length > 0), diff --git a/packages/global/core/ai/model.schema.ts b/packages/global/core/ai/model.schema.ts index a9fb970235..ea58b0128b 100644 --- a/packages/global/core/ai/model.schema.ts +++ b/packages/global/core/ai/model.schema.ts @@ -67,6 +67,7 @@ export const LLMModelItemSchema = PriceTypeSchema.extend(BaseModelItemSchema.sha censor: z.boolean().optional(), vision: z.boolean().optional(), reasoning: z.boolean().optional(), + reasoningEffort: z.boolean().optional(), functionCall: z.boolean(), toolChoice: z.boolean(), diff --git a/packages/global/core/app/formEdit/type.ts b/packages/global/core/app/formEdit/type.ts index 41b1c13c7c..ad336cb4a1 100644 --- a/packages/global/core/app/formEdit/type.ts +++ b/packages/global/core/app/formEdit/type.ts @@ -41,6 +41,9 @@ export const AppFormEditFormV1TypeSchema = z.object({ [NodeInputKeyEnum.aiChatIsResponseText]: z.boolean(), maxHistories: z.int().min(0).max(100), [NodeInputKeyEnum.aiChatReasoning]: z.boolean().optional(), + [NodeInputKeyEnum.aiChatReasoningEffort]: z + .enum(['none', 'minimal', 'low', 'medium', 'high', 'xhigh']) + .nullish(), [NodeInputKeyEnum.aiChatTopP]: z.number().optional(), [NodeInputKeyEnum.aiChatStopSign]: z.string().optional(), [NodeInputKeyEnum.aiChatResponseFormat]: z.string().optional(), diff --git a/packages/global/core/app/type.ts b/packages/global/core/app/type.ts index ff1cf71537..8ac5b6c5d4 100644 --- a/packages/global/core/app/type.ts +++ b/packages/global/core/app/type.ts @@ -4,6 +4,7 @@ import type { NodeInputKeyEnum } from '../workflow/constants'; import { VariableInputEnum } from '../workflow/constants'; import { InputComponentPropsTypeSchema } from '../workflow/type/io'; import { DatasetSearchModeEnum } from '../dataset/constants'; +import type { ReasoningEffort } from '../ai/llm/type'; import { StoreEdgeItemTypeSchema } from '../workflow/type/edge'; import type { AppPermission } from '../../support/permission/app/controller'; import { ParentIdSchema, type ParentIdType } from '../../common/parentFolder/type'; @@ -180,6 +181,7 @@ export type SettingAIDataType = { maxHistories?: number; [NodeInputKeyEnum.aiChatVision]?: boolean; // Is open vision mode [NodeInputKeyEnum.aiChatReasoning]?: boolean; // Is open reasoning mode + [NodeInputKeyEnum.aiChatReasoningEffort]?: ReasoningEffort; [NodeInputKeyEnum.aiChatTopP]?: number; [NodeInputKeyEnum.aiChatStopSign]?: string; [NodeInputKeyEnum.aiChatResponseFormat]?: string; diff --git a/packages/global/core/type.ts b/packages/global/core/type.ts deleted file mode 100644 index acceaede96..0000000000 --- a/packages/global/core/type.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Agent } from 'http'; - -declare global { - var httpsAgent: Agent; -} diff --git a/packages/global/core/workflow/constants.ts b/packages/global/core/workflow/constants.ts index d5488a5996..2b9533098c 100644 --- a/packages/global/core/workflow/constants.ts +++ b/packages/global/core/workflow/constants.ts @@ -163,6 +163,7 @@ export enum NodeInputKeyEnum { aiChatVision = 'aiChatVision', stringQuoteText = 'stringQuoteText', aiChatReasoning = 'aiChatReasoning', + aiChatReasoningEffort = 'aiChatReasoningEffort', aiChatTopP = 'aiChatTopP', aiChatStopSign = 'aiChatStopSign', aiChatResponseFormat = 'aiChatResponseFormat', diff --git a/packages/global/core/workflow/runtime/type.ts b/packages/global/core/workflow/runtime/type.ts index 03cc2b78da..4817340888 100644 --- a/packages/global/core/workflow/runtime/type.ts +++ b/packages/global/core/workflow/runtime/type.ts @@ -19,6 +19,7 @@ import type { WorkflowResponseType } from '../../../../service/core/workflow/dis import type { AiChatQuoteRoleType } from '../template/system/aiChat/type'; import type { OpenaiAccountType } from '../../../support/user/team/type'; import { CompletionFinishReasonSchema } from '../../ai/llm/type'; +import type { ReasoningEffort } from '../../ai/llm/type'; import type { InteractiveNodeResponseType, WorkflowInteractiveResponseType @@ -380,6 +381,7 @@ export type AIChatNodeProps = { [NodeInputKeyEnum.aiChatIsResponseText]: boolean; [NodeInputKeyEnum.aiChatVision]?: boolean; [NodeInputKeyEnum.aiChatReasoning]?: boolean; + [NodeInputKeyEnum.aiChatReasoningEffort]?: ReasoningEffort; [NodeInputKeyEnum.aiChatTopP]?: number; [NodeInputKeyEnum.aiChatStopSign]?: string; [NodeInputKeyEnum.aiChatResponseFormat]?: string; diff --git a/packages/global/core/workflow/template/system/aiChat/index.ts b/packages/global/core/workflow/template/system/aiChat/index.ts index 54086308d6..378c30ba24 100644 --- a/packages/global/core/workflow/template/system/aiChat/index.ts +++ b/packages/global/core/workflow/template/system/aiChat/index.ts @@ -98,6 +98,12 @@ export const AiChatModule: FlowNodeTemplateType = { valueType: WorkflowIOValueTypeEnum.boolean, value: true }, + { + key: NodeInputKeyEnum.aiChatReasoningEffort, + renderTypeList: [FlowNodeInputTypeEnum.hidden], + label: '', + valueType: WorkflowIOValueTypeEnum.string + }, { key: NodeInputKeyEnum.aiChatTopP, renderTypeList: [FlowNodeInputTypeEnum.hidden], diff --git a/packages/global/core/workflow/template/system/toolCall.ts b/packages/global/core/workflow/template/system/toolCall.ts index 478f9b78ad..9e5f0cf6f4 100644 --- a/packages/global/core/workflow/template/system/toolCall.ts +++ b/packages/global/core/workflow/template/system/toolCall.ts @@ -71,6 +71,12 @@ export const ToolCallNode: FlowNodeTemplateType = { valueType: WorkflowIOValueTypeEnum.boolean, value: true }, + { + key: NodeInputKeyEnum.aiChatReasoningEffort, + renderTypeList: [FlowNodeInputTypeEnum.hidden], + label: '', + valueType: WorkflowIOValueTypeEnum.string + }, { key: NodeInputKeyEnum.aiChatTopP, renderTypeList: [FlowNodeInputTypeEnum.hidden], diff --git a/packages/global/package.json b/packages/global/package.json index 906bb8e4d7..fe3fdae8c1 100644 --- a/packages/global/package.json +++ b/packages/global/package.json @@ -10,7 +10,7 @@ "pnpm": "10.x" }, "dependencies": { - "@fastgpt-sdk/plugin": "0.6.0", + "@fastgpt-sdk/plugin": "0.6.1", "@apidevtools/swagger-parser": "^10.1.0", "@bany/curl-to-json": "^1.2.8", "axios": "catalog:", @@ -22,7 +22,7 @@ "json5": "catalog:", "nanoid": "catalog:", "next": "catalog:", - "openai": "4.104.0", + "openai": "6.34.0", "openapi-types": "^12.1.3", "timezones-list": "^3.0.2", "lodash": "catalog:", diff --git a/packages/service/common/middle/httpAgent.ts b/packages/service/common/middle/httpAgent.ts deleted file mode 100644 index a50966fe50..0000000000 --- a/packages/service/common/middle/httpAgent.ts +++ /dev/null @@ -1,13 +0,0 @@ -import tunnel from 'tunnel'; - -export function initHttpAgent() { - // proxy obj - if (process.env.AXIOS_PROXY_HOST && process.env.AXIOS_PROXY_PORT) { - global.httpsAgent = tunnel.httpsOverHttp({ - proxy: { - host: process.env.AXIOS_PROXY_HOST, - port: +process.env.AXIOS_PROXY_PORT - } - }); - } -} diff --git a/packages/service/core/ai/config.ts b/packages/service/core/ai/config.ts index 79c83913b8..edbe2a3123 100644 --- a/packages/service/core/ai/config.ts +++ b/packages/service/core/ai/config.ts @@ -7,6 +7,7 @@ const aiProxyBaseUrl = process.env.AIPROXY_API_ENDPOINT const openaiBaseUrl = aiProxyBaseUrl || process.env.OPENAI_BASE_URL || 'https://api.openai.com/v1'; const openaiBaseKey = process.env.AIPROXY_API_TOKEN || process.env.CHAT_API_KEY || ''; +// 代理走 packages/service/common/proxy/index.ts 里的 EnvHttpProxyAgent + setGlobalDispatcher export const getAIApi = (props?: { userKey?: OpenaiAccountType; timeout?: number }) => { const { userKey, timeout } = props || {}; @@ -15,7 +16,6 @@ export const getAIApi = (props?: { userKey?: OpenaiAccountType; timeout?: number return new OpenAI({ baseURL: baseUrl, apiKey, - httpAgent: global.httpsAgent, timeout, maxRetries: 2 }); diff --git a/packages/service/core/ai/config/utils.ts b/packages/service/core/ai/config/utils.ts index 356efe63f7..87f4c2d1b1 100644 --- a/packages/service/core/ai/config/utils.ts +++ b/packages/service/core/ai/config/utils.ts @@ -128,6 +128,8 @@ export const loadSystemModels = async (init = false, language = 'en') => { const dbModel = dbModels.find((item) => item.model === model.model); const provider = getModelProvider(dbModel?.metadata?.provider || model.provider, language); + const dbLlmMetadata = + dbModel?.metadata?.type === ModelTypeEnum.llm ? dbModel.metadata : undefined; const modelData: any = { ...model, @@ -138,7 +140,9 @@ export const loadSystemModels = async (init = false, language = 'en') => { isCustom: false, ...(model.type === ModelTypeEnum.llm && { - maxResponse: model.maxTokens ?? 16000 + maxResponse: model.maxTokens ?? 16000, + reasoning: dbLlmMetadata?.reasoning ?? model.reasoning ?? false, + reasoningEffort: dbLlmMetadata?.reasoningEffort ?? model.reasoningEffort ?? false }), ...(model.type === ModelTypeEnum.llm && dbModel?.metadata?.type === ModelTypeEnum.llm diff --git a/packages/service/core/ai/llm/request.ts b/packages/service/core/ai/llm/request.ts index 82594ef1af..f0c330d9ea 100644 --- a/packages/service/core/ai/llm/request.ts +++ b/packages/service/core/ai/llm/request.ts @@ -4,6 +4,7 @@ import type { ChatCompletionCreateParamsStreaming, ChatCompletionMessageParam, ChatCompletionMessageToolCall, + ChatCompletionTool, CompletionFinishReason, CompletionUsage, OpenAI, @@ -258,10 +259,14 @@ export const createLLMResponse = async ( ...(toolCalls?.length && { tool_calls: toolCalls }) }; - // Usage count + // requestBody 运行时是经 LLMRequestBodyType narrow 进来的 FastGPT 数据, + // 但类型层 InferCompletionsBody 落到了 SDK 形态(messages/tools 是 v6 后的 union) const inputTokens = usage?.prompt_tokens || - (await countGptMessagesTokens(requestBody.messages, requestBody.tools)); + (await countGptMessagesTokens( + requestBody.messages as ChatCompletionMessageParam[], + requestBody.tools as ChatCompletionTool[] | undefined + )); const outputTokens = usage?.completion_tokens || (await countGptMessagesTokens([assistantMessage])); @@ -358,8 +363,9 @@ export const createLLMResponse = async ( inputTokens: 0, outputTokens: 0 }, - requestMessages: requestBody.messages, - completeMessages: [...requestBody.messages] + // requestBody.messages 在类型层是 SDK v6 的联合(含 custom tool),运行时 FastGPT 仅产 function 形态 + requestMessages: requestBody.messages as ChatCompletionMessageParam[], + completeMessages: [...requestBody.messages] as ChatCompletionMessageParam[] }; } }; @@ -634,8 +640,12 @@ export const createCompleteResponse = async ({ const { toolCalls } = (() => { if (tools?.length) { if (toolCallMode === 'toolChoice') { + // openai v6 的 tool_calls 是 function | custom 联合,FastGPT 仅消费 function 形态。 return { - toolCalls: response.choices?.[0]?.message?.tool_calls || [] + toolCalls: + response.choices?.[0]?.message?.tool_calls?.filter( + (call): call is ChatCompletionMessageToolCall => call.type === 'function' + ) || [] }; } @@ -682,7 +692,12 @@ type InferCompletionsBody = T extends { stream: true } ? ChatCompletionCreateParamsNonStreaming : ChatCompletionCreateParams; -type LLMRequestBodyType = Omit & { +// tools 同步用 FastGPT narrow 后的 ChatCompletionTool(function-only), +// 避免 SDK 联合类型透过 T['tools'] 漏到下游。 +type LLMRequestBodyType = Omit< + T, + 'model' | 'stop' | 'response_format' | 'messages' | 'tools' +> & { model: string | LLMModelItemType; stop?: string; response_format?: { @@ -690,6 +705,7 @@ type LLMRequestBodyType = Omit({ if (!supportParams.responseFormat) { delete requestBody.response_format; } + if (!supportParams.reasoningEffort) { + delete requestBody.reasoning_effort; + } // field map if (modelData.fieldMap) { diff --git a/packages/service/core/workflow/dispatch/ai/chat.ts b/packages/service/core/workflow/dispatch/ai/chat.ts index 02f8107ccc..540fb2f825 100644 --- a/packages/service/core/workflow/dispatch/ai/chat.ts +++ b/packages/service/core/workflow/dispatch/ai/chat.ts @@ -86,6 +86,7 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise): LLMModelItemType => ({ @@ -1250,6 +1265,117 @@ describe('createLLMResponse', () => { expect(result.finish_reason).toBe('length'); }); }); + + describe('reasoning_effort handling', () => { + const buildOkResponse = () => ({ + choices: [ + { + message: { role: 'assistant', content: 'ok' }, + finish_reason: 'stop' + } + ], + usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 } + }); + + it('should preserve reasoning_effort when model supports it', async () => { + mockGetLLMModel.mockReturnValue(createMockModelData({ reasoning: true })); + mockGetLLMSupportParams.mockReturnValueOnce({ + ...defaultSupportParams, + reasoning: true, + reasoningEffort: true + }); + + const mockCreate = vi.fn().mockResolvedValue(buildOkResponse()); + mockGetAIApi.mockReturnValue({ + chat: { completions: { create: mockCreate } } + } as any); + + await createLLMResponse({ + body: { + model: 'gpt-4', + messages: [{ role: ChatCompletionRequestMessageRoleEnum.User, content: 'hi' }], + reasoning_effort: 'high', + stream: false + } + }); + + expect(mockCreate).toHaveBeenCalledTimes(1); + expect(mockCreate.mock.calls[0][0].reasoning_effort).toBe('high'); + }); + + it('should strip reasoning_effort when model does not support it', async () => { + mockGetLLMSupportParams.mockReturnValueOnce({ + ...defaultSupportParams, + reasoningEffort: false + }); + + const mockCreate = vi.fn().mockResolvedValue(buildOkResponse()); + mockGetAIApi.mockReturnValue({ + chat: { completions: { create: mockCreate } } + } as any); + + await createLLMResponse({ + body: { + model: 'gpt-4', + messages: [{ role: ChatCompletionRequestMessageRoleEnum.User, content: 'hi' }], + reasoning_effort: 'high', + stream: false + } + }); + + expect(mockCreate).toHaveBeenCalledTimes(1); + expect(mockCreate.mock.calls[0][0]).not.toHaveProperty('reasoning_effort'); + }); + }); + + describe('Error handling - requestMessages provenance', () => { + it('should return prompt-rewritten requestMessages on API error', async () => { + const loaded: ChatCompletionMessageParam[] = [ + { role: ChatCompletionRequestMessageRoleEnum.System, content: 'sys' }, + { role: ChatCompletionRequestMessageRoleEnum.User, content: 'q' } + ]; + const rewritten: ChatCompletionMessageParam[] = [ + ...loaded, + { role: ChatCompletionRequestMessageRoleEnum.User, content: 'rewritten-suffix' } + ]; + + mockLoadRequestMessages.mockResolvedValueOnce(loaded as any); + mockPromptToolCallMessageRewrite.mockReturnValueOnce(rewritten as any); + + const mockAI = { + chat: { + completions: { + create: vi.fn().mockRejectedValue(new Error('boom')) + } + } + }; + mockGetAIApi.mockReturnValue(mockAI as any); + + const result = await createLLMResponse({ + throwError: false, + body: { + model: 'gpt-4', + messages: [{ role: ChatCompletionRequestMessageRoleEnum.User, content: 'q' }], + tools: [ + { + type: 'function' as const, + function: { + name: 'noop', + description: 'n', + parameters: { type: 'object', properties: {} } + } + } + ], + toolCallMode: 'prompt', + stream: false + } + }); + + expect(result.error).toBeDefined(); + expect(result.requestMessages).toEqual(rewritten); + expect(result.completeMessages).toEqual(rewritten); + }); + }); }); describe('createCompleteResponse', () => { @@ -1341,6 +1467,58 @@ describe('createCompleteResponse', () => { expect(result.toolCalls![0].function.name).toBe('test_tool'); expect(toolCalls).toHaveLength(1); }); + + it('should drop non-function tool_calls (e.g. custom type) in toolChoice mode', async () => { + const response = { + choices: [ + { + message: { + role: 'assistant', + content: null, + tool_calls: [ + { + id: 'call_fn', + type: 'function', + function: { name: 'test_tool', arguments: '{}' } + }, + { + id: 'call_custom', + type: 'custom', + custom: { name: 'shell', input: 'ls' } + } + ] + }, + finish_reason: 'tool_calls' + } + ], + usage: { prompt_tokens: 10, completion_tokens: 5, total_tokens: 15 } + }; + + const tools = [ + { + type: 'function' as const, + function: { + name: 'test_tool', + description: 'Test', + parameters: { type: 'object', properties: {} } + } + } + ]; + + const result = await createCompleteResponse({ + body: { + model: 'gpt-4', + messages: [], + tools, + stream: false + }, + response: response as any + }); + + expect(result.toolCalls).toHaveLength(1); + expect(result.toolCalls![0].id).toBe('call_fn'); + expect(result.toolCalls![0].type).toBe('function'); + }); }); describe('createStreamResponse', () => { diff --git a/packages/web/components/common/MySelect/index.tsx b/packages/web/components/common/MySelect/index.tsx index 94e7acb659..ec72b58790 100644 --- a/packages/web/components/common/MySelect/index.tsx +++ b/packages/web/components/common/MySelect/index.tsx @@ -35,7 +35,7 @@ import EmptyTip from '../EmptyTip'; * customOnOpen: 自定义打开回调 * customOnClose: 自定义关闭回调 * */ -export type SelectProps = Omit & { +export type SelectProps = Omit & { value?: T; valueLabel?: string | React.ReactNode; placeholder?: string; diff --git a/packages/web/i18n/en/account.json b/packages/web/i18n/en/account.json index b1c671b97f..c067caf9fb 100644 --- a/packages/web/i18n/en/account.json +++ b/packages/web/i18n/en/account.json @@ -84,8 +84,9 @@ "model.price_tier_range_invalid": "Invalid price tier range. Please make sure upper bounds keep increasing", "model.price_tiers": "Price tiers", "model.price_tiers_tip": "Match a tier by input token range, then bill input and output tokens with that tier's prices. Each next range starts after the previous upper bound. Leave the last upper bound empty to mean and above.", - "model.reasoning": "Support output thinking", + "model.reasoning": "Model supports thinking", "model.reasoning_tip": "For example, Deepseek-reasoner can output the thinking process.", + "model.reasoning_effort": "Support thinking config", "model.request_auth": "Custom key", "model.request_auth_tip": "When making a request to a custom request address, carry the request header: Authorization: Bearer xxx to make the request.", "model.request_url": "Custom url", @@ -118,7 +119,7 @@ "personal_information": "Personal", "promotion_records": "Promotions", "requests_per_minute": "Requests per minute", - "reset_default": "Restore the default configuration", + "reset_default": "Restore default", "status": "state", "subscription_mode_month": "Duration", "subscription_package": "Subscription package", diff --git a/packages/web/i18n/en/app.json b/packages/web/i18n/en/app.json index 1e9f2c46f2..854a245e4c 100644 --- a/packages/web/i18n/en/app.json +++ b/packages/web/i18n/en/app.json @@ -35,6 +35,9 @@ "Tool_description": "Tool description", "Tool_name": "Tool name", "ai_point_price": "Billing", + "ai_setting_basic_config": "Basic settings", + "ai_setting_reasoning_config": "Reasoning settings", + "ai_setting_reasoning_config_tip": "Some models do not fully support every reasoning option. If you see an error, try a different reasoning option or use the default.", "ai_settings": "AI Settings", "all_apps": "All Applications", "app.Version name": "Version Name", @@ -289,7 +292,11 @@ "publish_success": "Publish Successful", "question_guide_tip": "After the conversation, 3 guiding questions will be generated for you.", "raw_params": "original parameters", - "reasoning_response": "Output thinking", + "reasoning_response": "Hide AI reasoning", + "hide_response": "Hide AI output", + "hide_response_tip": "When checked, the model output is not shown to the user directly, but it can still be retrieved from the AI reply for downstream processing.", + "reasoning_effort": "Reasoning effort", + "reasoning_effort_unsupported": "This model does not support disabling reasoning", "recharge": "Go to recharge", "reference_variable": "Reference variables", "refresh_templates": "Refresh", diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json index 0a10350a03..18a14f9a92 100644 --- a/packages/web/i18n/en/common.json +++ b/packages/web/i18n/en/common.json @@ -955,6 +955,13 @@ "question_feedback": "Work order", "read_course": "Read Course", "read_doc": "Read Document", + "reasoning_effort.default": "Default", + "reasoning_effort.high": "High", + "reasoning_effort.low": "Low", + "reasoning_effort.medium": "Medium", + "reasoning_effort.minimal": "Minimal", + "reasoning_effort.none": "None", + "reasoning_effort.xhigh": "Extra high", "redo_tip": "Redo ctrl shift z", "redo_tip_mac": "Redo ⌘ shift z", "refresh": "Refresh", diff --git a/packages/web/i18n/zh-CN/account.json b/packages/web/i18n/zh-CN/account.json index c92393bbf9..2f56a7aecc 100644 --- a/packages/web/i18n/zh-CN/account.json +++ b/packages/web/i18n/zh-CN/account.json @@ -84,8 +84,9 @@ "model.price_tier_range_invalid": "价格梯度区间设置有误,请检查区间上限是否递增", "model.price_tiers": "模型价格梯度", "model.price_tiers_tip": "按输入 Token 所在区间匹配一个梯度,再使用该梯度的输入价格和输出价格分别计费。区间起点自动按上一梯度递增,最后一个梯度上限留空表示及以上。", - "model.reasoning": "支持输出思考", + "model.reasoning": "模型支持思考", "model.reasoning_tip": "例如 Deepseek-reasoner,可以输出思考过程。", + "model.reasoning_effort": "支持思考配置", "model.request_auth": "自定义请求 Key", "model.request_auth_tip": "向自定义请求地址发起请求时候,携带请求头:Authorization: Bearer xxx 进行请求", "model.request_url": "自定义请求地址", @@ -118,7 +119,7 @@ "personal_information": "个人信息", "promotion_records": "促销记录", "requests_per_minute": "QPM", - "reset_default": "恢复默认配置", + "reset_default": "恢复默认", "status": "状态", "subscription_mode_month": "时长", "subscription_package": "订阅套餐", diff --git a/packages/web/i18n/zh-CN/app.json b/packages/web/i18n/zh-CN/app.json index c2d0c00456..1f52885c6f 100644 --- a/packages/web/i18n/zh-CN/app.json +++ b/packages/web/i18n/zh-CN/app.json @@ -35,6 +35,9 @@ "Tool_description": "工具描述", "Tool_name": "工具名称", "ai_point_price": "AI积分计费", + "ai_setting_basic_config": "基础配置", + "ai_setting_reasoning_config": "思考配置", + "ai_setting_reasoning_config_tip": "部分模型未完全适配所有思考配置,如提示报错,请尝试切换其他思考配置选项或使用默认选项。", "ai_settings": "AI 配置", "all_apps": "全部应用", "app.Version name": "版本名称", @@ -289,7 +292,11 @@ "publish_success": "发布成功", "question_guide_tip": "对话结束后,会为你生成 3 个引导性问题。", "raw_params": "原始参数", - "reasoning_response": "输出思考", + "reasoning_response": "隐藏 AI 思考", + "hide_response": "隐藏 AI 输出", + "hide_response_tip": "勾选后,模型输出内容不会直接展示给用户,但可以在 AI 回复的输出中获取本次模型输出的内容进行二次处理。", + "reasoning_effort": "思考配置", + "reasoning_effort_unsupported": "该模型不支持关闭思考", "recharge": "去充值", "reference_variable": "引用变量", "refresh_templates": "换一批", diff --git a/packages/web/i18n/zh-CN/common.json b/packages/web/i18n/zh-CN/common.json index e2d2b4e19a..6bb2a43fa5 100644 --- a/packages/web/i18n/zh-CN/common.json +++ b/packages/web/i18n/zh-CN/common.json @@ -955,6 +955,13 @@ "question_feedback": "工单咨询", "read_course": "查看教程", "read_doc": "查看文档", + "reasoning_effort.default": "默认", + "reasoning_effort.high": "深度思考", + "reasoning_effort.low": "轻量思考", + "reasoning_effort.medium": "标准思考", + "reasoning_effort.minimal": "极简思考", + "reasoning_effort.none": "不思考", + "reasoning_effort.xhigh": "极致思考", "redo_tip": "恢复 ctrl shift z", "redo_tip_mac": "恢复 ⌘ shift z", "refresh": "刷新", diff --git a/packages/web/i18n/zh-Hant/account.json b/packages/web/i18n/zh-Hant/account.json index 8969066de3..a98a43a7de 100644 --- a/packages/web/i18n/zh-Hant/account.json +++ b/packages/web/i18n/zh-Hant/account.json @@ -84,8 +84,9 @@ "model.price_tier_range_invalid": "價格梯度區間設定有誤,請確認區間上限有持續遞增", "model.price_tiers": "模型價格梯度", "model.price_tiers_tip": "依輸入 Token 所在區間匹配一個梯度,再使用該梯度的輸入價格和輸出價格分別計費。區間起點會依上一梯度自動遞增,最後一個梯度上限留空表示及以上。", - "model.reasoning": "支援輸出思考", + "model.reasoning": "模型支援思考", "model.reasoning_tip": "例如 Deepseek-reasoner,可以輸出思考過程。", + "model.reasoning_effort": "支援思考配置", "model.request_auth": "自訂請求 Key", "model.request_auth_tip": "向自訂請求地址發起請求時候,攜帶請求頭:Authorization: Bearer xxx 進行請求", "model.request_url": "自訂請求地址", @@ -118,7 +119,7 @@ "personal_information": "個人資訊", "promotion_records": "促銷記錄", "requests_per_minute": "QPM", - "reset_default": "恢復預設設定", + "reset_default": "恢復預設", "status": "狀態", "subscription_mode_month": "時長", "subscription_package": "訂閱套餐", diff --git a/packages/web/i18n/zh-Hant/app.json b/packages/web/i18n/zh-Hant/app.json index 689ed1a4dd..cf0b32c6d5 100644 --- a/packages/web/i18n/zh-Hant/app.json +++ b/packages/web/i18n/zh-Hant/app.json @@ -33,6 +33,9 @@ "Tool_description": "工具描述", "Tool_name": "工具名稱", "ai_point_price": "AI 積分計費", + "ai_setting_basic_config": "基礎設定", + "ai_setting_reasoning_config": "思考設定", + "ai_setting_reasoning_config_tip": "部分模型未完全適配所有思考設定,如提示報錯,請嘗試切換其他思考設定選項或使用預設選項。", "ai_settings": "AI 設定", "all_apps": "所有應用程式", "app.Version name": "版本名稱", @@ -280,7 +283,11 @@ "publish_success": "發布成功", "question_guide_tip": "對話結束後,會為你產生 3 個引導性問題。", "raw_params": "原始參數", - "reasoning_response": "輸出思考", + "reasoning_response": "隱藏 AI 思考", + "hide_response": "隱藏 AI 輸出", + "hide_response_tip": "勾選後,模型輸出內容不會直接展示給用戶,但可以在 AI 回覆的輸出中取得本次模型輸出的內容進行二次處理。", + "reasoning_effort": "思考配置", + "reasoning_effort_unsupported": "該模型不支援關閉思考", "recharge": "去充值", "reference_variable": "引用變量", "refresh_templates": "換一批", diff --git a/packages/web/i18n/zh-Hant/common.json b/packages/web/i18n/zh-Hant/common.json index 357e3fcd53..5c753d0ecc 100644 --- a/packages/web/i18n/zh-Hant/common.json +++ b/packages/web/i18n/zh-Hant/common.json @@ -945,6 +945,13 @@ "question_feedback": "工單諮詢", "read_course": "閱讀教學", "read_doc": "閱讀文件", + "reasoning_effort.default": "預設", + "reasoning_effort.high": "深度思考", + "reasoning_effort.low": "輕量思考", + "reasoning_effort.medium": "標準思考", + "reasoning_effort.minimal": "極簡思考", + "reasoning_effort.none": "不思考", + "reasoning_effort.xhigh": "極致思考", "redo_tip": "重做 ctrl shift z", "redo_tip_mac": "重做 ⌘ shift z", "request_end": "已載入全部", diff --git a/packages/web/styles/theme.ts b/packages/web/styles/theme.ts index 9d0e87b350..2ac2d2b977 100644 --- a/packages/web/styles/theme.ts +++ b/packages/web/styles/theme.ts @@ -709,6 +709,57 @@ const Table = tableMultiStyle({ } } } + }, + bordered: { + table: { + bg: 'white' + }, + thead: { + tr: { + bg: 'myGray.25', + th: { + px: 3, + py: 2, + height: '32px', + bg: 'myGray.25', + color: 'myGray.500', + fontSize: 'mini', + fontWeight: 'medium', + letterSpacing: '0.5px', + textTransform: 'none', + borderRadius: 'none !important', + borderBottom: '1px solid', + borderColor: 'myGray.200', + '&:not(:first-of-type)': { + borderLeft: '1px solid', + borderColor: 'myGray.200' + } + } + } + }, + tbody: { + tr: { + td: { + px: 3, + py: 2, + color: 'myGray.500', + fontSize: 'mini', + letterSpacing: '0.4px', + borderRadius: 'none !important', + borderBottom: 'none', + '&:not(:first-of-type)': { + borderLeft: '1px solid', + borderColor: 'myGray.200' + } + }, + '&:not(:first-of-type)': { + td: { + borderTop: '1px solid', + borderColor: 'myGray.200' + } + } + } + } } }, defaultProps: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16bd6e323f..cb7ad824bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -243,8 +243,8 @@ importers: specifier: ^1.2.8 version: 1.2.8 '@fastgpt-sdk/plugin': - specifier: 0.6.0 - version: 0.6.0 + specifier: 0.6.1 + version: 0.6.1 axios: specifier: 'catalog:' version: 1.13.6 @@ -276,8 +276,8 @@ importers: specifier: 'catalog:' version: 16.2.4(@babel/core@7.26.10)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.85.1) openai: - specifier: 4.104.0 - version: 4.104.0(encoding@0.1.13)(ws@8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10))(zod@4.1.12) + specifier: 6.34.0 + version: 6.34.0(ws@8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10))(zod@4.1.12) openapi-types: specifier: ^12.1.3 version: 12.1.3 @@ -480,9 +480,6 @@ importers: tiktoken: specifier: 1.0.17 version: 1.0.17 - tunnel: - specifier: ^0.0.6 - version: 0.0.6 turndown: specifier: ^7.1.2 version: 7.2.0 @@ -742,7 +739,7 @@ importers: version: 1.4.0(bufferutil@4.1.0)(encoding@0.1.13)(utf-8-validate@5.0.10) '@larksuiteoapi/node-sdk': specifier: ^1.59.0 - version: 1.61.1(bufferutil@4.1.0)(utf-8-validate@5.0.10) + version: 1.62.0(bufferutil@4.1.0)(utf-8-validate@5.0.10) '@node-rs/jieba': specifier: 'catalog:' version: 2.0.1 @@ -1267,16 +1264,16 @@ importers: version: 0.0.38 '@typescript-eslint/eslint-plugin': specifier: 'catalog:' - version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.9.3))(eslint@8.56.0)(typescript@5.9.3) + version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1)(typescript@5.9.3) '@typescript-eslint/parser': specifier: 'catalog:' - version: 6.21.0(eslint@8.56.0)(typescript@5.9.3) + version: 6.21.0(eslint@8.57.1)(typescript@5.9.3) eslint: specifier: 'catalog:' - version: 8.56.0 + version: 8.57.1 eslint-config-next: specifier: 'catalog:' - version: 15.5.12(eslint@8.56.0)(typescript@5.9.3) + version: 15.5.12(eslint@8.57.1)(typescript@5.9.3) tailwindcss: specifier: ^3 version: 3.4.18(tsx@4.20.6)(yaml@2.8.1) @@ -1700,8 +1697,8 @@ packages: '@apify/timeout@0.3.3': resolution: {integrity: sha512-lyvwMXee8SJNjNyxhr+nSTNyvjyoxbxol51xikq9VytFOPNSEMz8N02mUAuLVJNqrnqCBFRybjeqZdg4Y5AZlA==} - '@apify/utilities@2.27.0': - resolution: {integrity: sha512-P3maAvUi5sUw4F4AKRyfczAQAl20YodEjSlFrjg6Bif8ThRAott7atEAfdy8FfyjI7Z0l+0MrbvtF4ZiGdJ8mw==} + '@apify/utilities@2.29.0': + resolution: {integrity: sha512-Yx+NoTWKD7gf/x4DhNkqiWcHLM2SuNd9kosudMboLLNHAN5dbzgMqLhH5s2WSERizjWRKsHMP7eINMClPOXTPQ==} '@asamuzakjp/css-color@3.2.0': resolution: {integrity: sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==} @@ -3112,22 +3109,12 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.5.1': - resolution: {integrity: sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/eslint-utils@4.9.1': resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-community/regexpp@4.12.2': resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -3136,10 +3123,6 @@ packages: resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@8.56.0': - resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@8.57.1': resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3152,8 +3135,8 @@ packages: resolution: {integrity: sha512-nt1qCq7frcRiR+406vEERWC1vEPVIKPUGH/ZRP/mlBxvNJp1RycWQT8RhK7/tHmW6xPNZoRL/q2WfhM4Q+L7eg==} engines: {node: '>=20', pnpm: '>=9'} - '@fastgpt-sdk/plugin@0.6.0': - resolution: {integrity: sha512-xvjWj3+WLVqI1lggZEMlHLrl5c90JPomXOS5DZlWqgrmcgdoUlE1yzmWC2iXCoG2+IQTcOKaooqE6ITVqURgOg==} + '@fastgpt-sdk/plugin@0.6.1': + resolution: {integrity: sha512-2sut2mgiZmrgJl8A5XPas5mYYyDs9Sdl2E5xF9CmBJuwblSrsdibbxe1lv2saLX5z6vHQ+C/aGb/JjwOGBIocA==} '@fastgpt-sdk/sandbox-adapter@0.0.36': resolution: {integrity: sha512-RPwK6kFmpv5U2tqPNj+HzDoZEQ06fgMsrOzXx/uT33rubikOLHmNV4kJ8Mra+EhzzYbNmFq2iFapaocy4ExbwQ==} @@ -3222,11 +3205,6 @@ packages: peerDependencies: hono: ^4 - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - '@humanwhocodes/config-array@0.13.0': resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} @@ -3493,8 +3471,8 @@ packages: '@kubernetes/client-node@1.4.0': resolution: {integrity: sha512-Zge3YvF7DJi264dU1b3wb/GmzR99JhUpqTvp+VGHfwZT+g7EOOYNScDJNZwXy9cszyIGPIs0VHr+kk8e95qqrA==} - '@larksuiteoapi/node-sdk@1.61.1': - resolution: {integrity: sha512-BxLBCXk/652I0nWduQbiIrTH2TPe/i4ZD6UhW3VCTVFzrOq5Y9SKvAwanBE6z1ZyEPL6iLnXg/TfGvGSzG6MLw==} + '@larksuiteoapi/node-sdk@1.62.0': + resolution: {integrity: sha512-ZITiuAkiVgphn6OPO8MHeWV1q7+UNByLmNiYVDIAxF5+HJ8USl4xPinDOq9AMJSEUqdBJtiLdz7UltV5jP+EDg==} '@leichtgewicht/ip-codec@2.0.5': resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} @@ -6028,6 +6006,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.16.0: + resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} + engines: {node: '>=0.4.0'} + hasBin: true + address@1.2.2: resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==} engines: {node: '>= 10.0.0'} @@ -6086,6 +6069,9 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + ajv@7.2.4: resolution: {integrity: sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==} @@ -6358,8 +6344,8 @@ packages: bare-buffer: optional: true - bare-os@3.8.7: - resolution: {integrity: sha512-G4Gr1UsGeEy2qtDTZwL7JFLo2wapUarz7iTMcYcMFdS89AIQuBoyjgXZz0Utv7uHs3xA9LckhVbeBi8lEQrC+w==} + bare-os@3.9.0: + resolution: {integrity: sha512-JTjuZyNIDpw+GytMO4a6TK1VXdVKKJr6DRxEHasyuYyShV2deuiHJK/ahGZlebc+SG0/wJCB9XK8gprBGDFi/Q==} engines: {bare: '>=1.14.0'} bare-path@3.0.0: @@ -6461,11 +6447,6 @@ packages: browser-or-node@2.1.1: resolution: {integrity: sha512-8CVjaLJGuSKMVTxJ2DpBl5XnlNDiT4cQFeuCJJrvJmts9YrTZDizTX7PjC2s6W4x+MBGZeEY6dGMrF04/6Hgqg==} - browserslist@4.24.4: - resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - browserslist@4.28.2: resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -7383,8 +7364,8 @@ packages: devtools-protocol@0.0.1367902: resolution: {integrity: sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==} - devtools-protocol@0.0.1617982: - resolution: {integrity: sha512-DN4tEwx1D6d3OvVjLfh5nBkAlIq08URlNLAuE0XgSZnMQcpXb++6TkmqBOp8wAYOQnxWbATtvxwFYnyM8CT+Ig==} + devtools-protocol@0.0.1619965: + resolution: {integrity: sha512-K/7kqEPRZE0oec3HO8n/R2++UjTa4mSXqromH+zkwePpkzkO85aoLnuuFgX5j60NMaRLCoSZSWWk7NBRz7ePZQ==} didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -7519,9 +7500,6 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.118: - resolution: {integrity: sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==} - electron-to-chromium@1.5.341: resolution: {integrity: sha512-1sZTssferjgDgaqRTc0ieP+ozzpOy7LQTPTtEW3yQFn4+ORdIAZWV5BthXPyHF7YqLvFJCUPhNhdAJQYlYUgiw==} @@ -7742,12 +7720,6 @@ packages: resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} - eslint@8.56.0: - resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. - hasBin: true - eslint@8.57.1: resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -7763,8 +7735,8 @@ packages: engines: {node: '>=4'} hasBin: true - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -10136,9 +10108,6 @@ packages: resolution: {integrity: sha512-iwpZdvW6Umz12ICmu9IYPRxg0tOLGmU3Tq2tKetejCj3oZd7b2nUXwP3a7QA5M9glWy8wlPS1G3RwM/CdsUbdQ==} engines: {node: '>=8.0.0'} - node-releases@2.0.19: - resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} - node-releases@2.0.37: resolution: {integrity: sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==} @@ -10182,8 +10151,8 @@ packages: oauth-sign@0.9.0: resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} - oauth4webapi@3.8.5: - resolution: {integrity: sha512-A8jmyUckVhRJj5lspguklcl90Ydqk61H3dcU0oLhH3Yv13KpAliKTt5hknpGGPZSSfOwGyraNEFmofDYH+1kSg==} + oauth4webapi@3.8.6: + resolution: {integrity: sha512-iwemM91xz8nryHti2yTmg5fhyEMVOkOXwHNqbvcATjyajb5oQxCQzrNOA6uElRHuMhQQTKUyFKV9y/CNyg25BQ==} object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -10277,6 +10246,18 @@ packages: zod: optional: true + openai@6.34.0: + resolution: {integrity: sha512-yEr2jdGf4tVFYG6ohmr3pF6VJuveP0EA/sS8TBx+4Eq5NT10alu5zg2dmxMXMgqpihRDQlFGpRt2XwsGj+Fyxw==} + hasBin: true + peerDependencies: + ws: ^8.18.0 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + ws: + optional: true + zod: + optional: true + openapi-fetch@0.14.1: resolution: {integrity: sha512-l7RarRHxlEZYjMLd/PR0slfMVse2/vvIAGm75/F7J6MlQ8/b9uUQmUF2kCPrQhJqMXSxmYWObVgeYXbFYzZR+A==} @@ -10290,8 +10271,8 @@ packages: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} hasBin: true - openid-client@6.8.3: - resolution: {integrity: sha512-AoY/NaN9esS3+xvHInFSK0g3skSfeE0uqQAKRj4rB6/GsBIvzwTUaYo9+HcqpKIaP0dP85p5W07hayKgS4GAeA==} + openid-client@6.8.4: + resolution: {integrity: sha512-QSw0BA08piujetEwfZsHoTrDpMEha7GDZDicQqVwX4u0ChCjefvjDB++TZ8BTg76UpwhzIQgdvvfgfl3HpCSAw==} option@0.2.4: resolution: {integrity: sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==} @@ -11793,9 +11774,6 @@ packages: strnum@1.1.2: resolution: {integrity: sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==} - strnum@2.1.2: - resolution: {integrity: sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==} - strnum@2.2.3: resolution: {integrity: sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==} @@ -12116,10 +12094,6 @@ packages: tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} - tunnel@0.0.6: - resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} - engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} - turbo@2.9.6: resolution: {integrity: sha512-+v2QJey7ZUeUiuigkU+uFfklvNUyPI2VO2vBpMYJA+a1hKFLFiKtUYlRHdb3P9CrAvMzi0upbjI4WT+zKtqkBg==} hasBin: true @@ -12189,8 +12163,8 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typed-query-selector@2.12.1: - resolution: {integrity: sha512-uzR+FzI8qrUEIu96oaeBJmd9E7CFEiQ3goA5qCVgc4s5llSubcfGHq9yUstZx/k4s9dXHVKsE35YWoFyvEqEHA==} + typed-query-selector@2.12.2: + resolution: {integrity: sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==} typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} @@ -12319,12 +12293,6 @@ packages: synckit: optional: true - update-browserslist-db@1.1.3: - resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - update-browserslist-db@1.2.3: resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} hasBin: true @@ -13097,7 +13065,7 @@ snapshots: '@apify/timeout@0.3.3': {} - '@apify/utilities@2.27.0': + '@apify/utilities@2.29.0': dependencies: '@apify/consts': 2.52.1 '@apify/log': 2.5.35 @@ -14996,7 +14964,7 @@ snapshots: dependencies: '@apify/log': 2.5.35 '@apify/timeout': 0.3.3 - '@apify/utilities': 2.27.0 + '@apify/utilities': 2.29.0 '@crawlee/core': 3.16.0 '@crawlee/types': 3.16.0 '@crawlee/utils': 3.16.0 @@ -15076,7 +15044,7 @@ snapshots: '@apify/log': 2.5.35 '@apify/pseudo_url': 2.0.76 '@apify/timeout': 0.3.3 - '@apify/utilities': 2.27.0 + '@apify/utilities': 2.29.0 '@crawlee/memory-storage': 3.16.0 '@crawlee/types': 3.16.0 '@crawlee/utils': 3.16.0 @@ -15099,7 +15067,7 @@ snapshots: '@crawlee/http@3.16.0': dependencies: '@apify/timeout': 0.3.3 - '@apify/utilities': 2.27.0 + '@apify/utilities': 2.29.0 '@crawlee/basic': 3.16.0 '@crawlee/types': 3.16.0 '@crawlee/utils': 3.16.0 @@ -15118,7 +15086,7 @@ snapshots: '@crawlee/jsdom@3.16.0(bufferutil@4.1.0)(canvas@3.2.3)(utf-8-validate@5.0.10)': dependencies: '@apify/timeout': 0.3.3 - '@apify/utilities': 2.27.0 + '@apify/utilities': 2.29.0 '@crawlee/http': 3.16.0 '@crawlee/types': 3.16.0 '@crawlee/utils': 3.16.0 @@ -15136,7 +15104,7 @@ snapshots: '@crawlee/linkedom@3.16.0(canvas@3.2.3)': dependencies: '@apify/timeout': 0.3.3 - '@apify/utilities': 2.27.0 + '@apify/utilities': 2.29.0 '@crawlee/http': 3.16.0 '@crawlee/types': 3.16.0 linkedom: 0.18.12(canvas@3.2.3) @@ -15190,7 +15158,7 @@ snapshots: '@crawlee/types': 3.16.0 '@crawlee/utils': 3.16.0 cheerio: 1.0.0-rc.12 - devtools-protocol: 0.0.1617982 + devtools-protocol: 0.0.1619965 jquery: 3.7.1 ow: 0.28.2 tslib: 2.8.1 @@ -15471,28 +15439,16 @@ snapshots: '@esbuild/win32-x64@0.25.11': optional: true - '@eslint-community/eslint-utils@4.5.1(eslint@8.56.0)': - dependencies: - eslint: 8.56.0 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/eslint-utils@4.9.1(eslint@8.56.0)': - dependencies: - eslint: 8.56.0 - eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.9.1(eslint@8.57.1)': dependencies: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.12.1': {} - '@eslint-community/regexpp@4.12.2': {} '@eslint/eslintrc@2.1.4': dependencies: - ajv: 6.12.6 + ajv: 6.15.0 debug: 4.4.3 espree: 9.6.1 globals: 13.24.0 @@ -15504,8 +15460,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.56.0': {} - '@eslint/js@8.57.1': {} '@faker-js/faker@9.9.0': {} @@ -15521,7 +15475,7 @@ snapshots: '@opentelemetry/sdk-logs': 0.203.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.39.0 - '@fastgpt-sdk/plugin@0.6.0': + '@fastgpt-sdk/plugin@0.6.1': dependencies: '@fortaine/fetch-event-source': 3.0.6 zod: 4.1.12 @@ -15602,14 +15556,6 @@ snapshots: dependencies: hono: 4.11.7 - '@humanwhocodes/config-array@0.11.14': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.4.3 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -15831,7 +15777,7 @@ snapshots: js-yaml: 4.1.1 jsonpath-plus: 10.3.0 node-fetch: 2.7.0(encoding@0.1.13) - openid-client: 6.8.3 + openid-client: 6.8.4 rfc4648: 1.5.4 socks-proxy-agent: 8.0.5 stream-buffers: 3.0.3 @@ -15845,13 +15791,13 @@ snapshots: - supports-color - utf-8-validate - '@larksuiteoapi/node-sdk@1.61.1(bufferutil@4.1.0)(utf-8-validate@5.0.10)': + '@larksuiteoapi/node-sdk@1.62.0(bufferutil@4.1.0)(utf-8-validate@5.0.10)': dependencies: axios: 1.13.6 lodash.identity: 3.0.0 lodash.merge: 4.6.2 lodash.pickby: 4.6.0 - protobufjs: 7.4.0 + protobufjs: 7.5.5 qs: 6.15.1 ws: 8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -18171,7 +18117,7 @@ snapshots: '@types/cors@2.8.19': dependencies: - '@types/node': 24.0.13 + '@types/node': 20.17.24 '@types/d3-array@3.2.1': {} @@ -18302,7 +18248,7 @@ snapshots: '@types/dns-packet@5.6.5': dependencies: - '@types/node': 24.0.13 + '@types/node': 20.17.24 '@types/estree-jsx@1.0.5': dependencies: @@ -18367,7 +18313,7 @@ snapshots: '@types/http-proxy@1.17.17': dependencies: - '@types/node': 24.0.13 + '@types/node': 20.17.24 '@types/js-cookie@3.0.6': {} @@ -18452,7 +18398,7 @@ snapshots: '@types/nodemailer@6.4.23': dependencies: - '@types/node': 24.0.13 + '@types/node': 20.17.24 '@types/nprogress@0.2.3': {} @@ -18476,7 +18422,7 @@ snapshots: '@types/qrcode@1.5.5': dependencies: - '@types/node': 24.0.13 + '@types/node': 20.17.24 '@types/qs@6.9.18': {} @@ -18569,33 +18515,13 @@ snapshots: '@types/xml2js@0.4.14': dependencies: - '@types/node': 24.0.13 + '@types/node': 20.17.24 '@types/yauzl@2.10.3': dependencies: '@types/node': 20.17.24 optional: true - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.9.3))(eslint@8.56.0)(typescript@5.9.3)': - dependencies: - '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.9.3) - '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/type-utils': 6.21.0(eslint@8.56.0)(typescript@5.9.3) - '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.4.3 - eslint: 8.56.0 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - semver: 7.7.4 - ts-api-utils: 1.4.3(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -18616,22 +18542,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.59.0(@typescript-eslint/parser@8.59.0(eslint@8.56.0)(typescript@5.9.3))(eslint@8.56.0)(typescript@5.9.3)': - dependencies: - '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.59.0(eslint@8.56.0)(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.59.0 - '@typescript-eslint/type-utils': 8.59.0(eslint@8.56.0)(typescript@5.9.3) - '@typescript-eslint/utils': 8.59.0(eslint@8.56.0)(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.59.0 - eslint: 8.56.0 - ignore: 7.0.5 - natural-compare: 1.4.0 - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@8.59.0(@typescript-eslint/parser@8.59.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -18648,19 +18558,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.9.3)': - dependencies: - '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.4.3 - eslint: 8.56.0 - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 @@ -18674,18 +18571,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.59.0(eslint@8.56.0)(typescript@5.9.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.59.0 - '@typescript-eslint/types': 8.59.0 - '@typescript-eslint/typescript-estree': 8.59.0(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.59.0 - debug: 4.4.3 - eslint: 8.56.0 - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/parser@8.59.0(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@typescript-eslint/scope-manager': 8.59.0 @@ -18721,18 +18606,6 @@ snapshots: dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@6.21.0(eslint@8.56.0)(typescript@5.9.3)': - dependencies: - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.9.3) - '@typescript-eslint/utils': 6.21.0(eslint@8.56.0)(typescript@5.9.3) - debug: 4.4.3 - eslint: 8.56.0 - ts-api-utils: 1.4.3(typescript@5.9.3) - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/type-utils@6.21.0(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.9.3) @@ -18745,18 +18618,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.59.0(eslint@8.56.0)(typescript@5.9.3)': - dependencies: - '@typescript-eslint/types': 8.59.0 - '@typescript-eslint/typescript-estree': 8.59.0(typescript@5.9.3) - '@typescript-eslint/utils': 8.59.0(eslint@8.56.0)(typescript@5.9.3) - debug: 4.4.3 - eslint: 8.56.0 - ts-api-utils: 2.5.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/type-utils@8.59.0(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@typescript-eslint/types': 8.59.0 @@ -18803,20 +18664,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@6.21.0(eslint@8.56.0)(typescript@5.9.3)': - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@8.56.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.9.3) - eslint: 8.56.0 - semver: 7.7.4 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@6.21.0(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@8.57.1) @@ -18831,17 +18678,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.59.0(eslint@8.56.0)(typescript@5.9.3)': - dependencies: - '@eslint-community/eslint-utils': 4.9.1(eslint@8.56.0) - '@typescript-eslint/scope-manager': 8.59.0 - '@typescript-eslint/types': 8.59.0 - '@typescript-eslint/typescript-estree': 8.59.0(typescript@5.9.3) - eslint: 8.56.0 - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/utils@8.59.0(eslint@8.57.1)(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@8.57.1) @@ -19100,9 +18936,9 @@ snapshots: mime-types: 3.0.2 negotiator: 1.0.0 - acorn-jsx@5.3.2(acorn@8.15.0): + acorn-jsx@5.3.2(acorn@8.16.0): dependencies: - acorn: 8.15.0 + acorn: 8.16.0 acorn-walk@8.3.4: dependencies: @@ -19110,6 +18946,8 @@ snapshots: acorn@8.15.0: {} + acorn@8.16.0: {} + address@1.2.2: {} adm-zip@0.5.17: {} @@ -19164,6 +19002,13 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + ajv@7.2.4: dependencies: fast-deep-equal: 3.1.3 @@ -19509,12 +19354,12 @@ snapshots: - bare-abort-controller optional: true - bare-os@3.8.7: + bare-os@3.9.0: optional: true bare-path@3.0.0: dependencies: - bare-os: 3.8.7 + bare-os: 3.9.0 optional: true bare-stream@2.13.0(bare-events@2.5.4): @@ -19636,13 +19481,6 @@ snapshots: browser-or-node@2.1.1: {} - browserslist@4.24.4: - dependencies: - caniuse-lite: 1.0.30001788 - electron-to-chromium: 1.5.118 - node-releases: 2.0.19 - update-browserslist-db: 1.1.3(browserslist@4.24.4) - browserslist@4.28.2: dependencies: baseline-browser-mapping: 2.10.20 @@ -20601,7 +20439,7 @@ snapshots: devtools-protocol@0.0.1367902: {} - devtools-protocol@0.0.1617982: {} + devtools-protocol@0.0.1619965: {} didyoumean@1.2.2: {} @@ -20747,8 +20585,6 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.118: {} - electron-to-chromium@1.5.341: {} elkjs@0.9.3: {} @@ -20953,26 +20789,6 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-next@15.5.12(eslint@8.56.0)(typescript@5.9.3): - dependencies: - '@next/eslint-plugin-next': 15.5.12 - '@rushstack/eslint-patch': 1.16.1 - '@typescript-eslint/eslint-plugin': 8.59.0(@typescript-eslint/parser@8.59.0(eslint@8.56.0)(typescript@5.9.3))(eslint@8.56.0)(typescript@5.9.3) - '@typescript-eslint/parser': 8.59.0(eslint@8.56.0)(typescript@5.9.3) - eslint: 8.56.0 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.9.0(eslint-plugin-import@2.32.0)(eslint@8.56.0) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.59.0(eslint@8.56.0)(typescript@5.9.3))(eslint-import-resolver-typescript@3.9.0)(eslint@8.56.0) - eslint-plugin-jsx-a11y: 6.10.2(eslint@8.56.0) - eslint-plugin-react: 7.37.4(eslint@8.56.0) - eslint-plugin-react-hooks: 5.2.0(eslint@8.56.0) - optionalDependencies: - typescript: 5.9.3 - transitivePeerDependencies: - - eslint-import-resolver-webpack - - eslint-plugin-import-x - - supports-color - eslint-config-next@15.5.12(eslint@8.57.1)(typescript@5.9.3): dependencies: '@next/eslint-plugin-next': 15.5.12 @@ -21001,21 +20817,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.9.0(eslint-plugin-import@2.32.0)(eslint@8.56.0): - dependencies: - '@nolyfill/is-core-module': 1.0.39 - debug: 4.4.3 - eslint: 8.56.0 - get-tsconfig: 4.13.6 - is-bun-module: 1.3.0 - oxc-resolver: 5.0.0 - stable-hash: 0.0.5 - tinyglobby: 0.2.15 - optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.59.0(eslint@8.56.0)(typescript@5.9.3))(eslint-import-resolver-typescript@3.9.0)(eslint@8.56.0) - transitivePeerDependencies: - - supports-color - eslint-import-resolver-typescript@3.9.0(eslint-plugin-import@2.32.0)(eslint@8.57.1): dependencies: '@nolyfill/is-core-module': 1.0.39 @@ -21031,17 +20832,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.59.0(eslint@8.56.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0)(eslint@8.56.0): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 8.59.0(eslint@8.56.0)(typescript@5.9.3) - eslint: 8.56.0 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.9.0(eslint-plugin-import@2.32.0)(eslint@8.56.0) - transitivePeerDependencies: - - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.59.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0)(eslint@8.57.1): dependencies: debug: 3.2.7 @@ -21053,35 +20843,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.59.0(eslint@8.56.0)(typescript@5.9.3))(eslint-import-resolver-typescript@3.9.0)(eslint@8.56.0): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.9 - array.prototype.findlastindex: 1.2.6 - array.prototype.flat: 1.3.3 - array.prototype.flatmap: 1.3.3 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.56.0 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.59.0(eslint@8.56.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.9.0)(eslint@8.56.0) - hasown: 2.0.2 - is-core-module: 2.16.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.1 - semver: 6.3.1 - string.prototype.trimend: 1.0.9 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 8.59.0(eslint@8.56.0)(typescript@5.9.3) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.59.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.9.0)(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 @@ -21111,25 +20872,6 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.10.2(eslint@8.56.0): - dependencies: - aria-query: 5.3.2 - array-includes: 3.1.9 - array.prototype.flatmap: 1.3.3 - ast-types-flow: 0.0.8 - axe-core: 4.10.3 - axobject-query: 4.1.0 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 8.56.0 - hasown: 2.0.2 - jsx-ast-utils: 3.3.5 - language-tags: 1.0.9 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - safe-regex-test: 1.1.0 - string.prototype.includes: 2.0.1 - eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.1): dependencies: aria-query: 5.3.2 @@ -21149,36 +20891,10 @@ snapshots: safe-regex-test: 1.1.0 string.prototype.includes: 2.0.1 - eslint-plugin-react-hooks@5.2.0(eslint@8.56.0): - dependencies: - eslint: 8.56.0 - eslint-plugin-react-hooks@5.2.0(eslint@8.57.1): dependencies: eslint: 8.57.1 - eslint-plugin-react@7.37.4(eslint@8.56.0): - dependencies: - array-includes: 3.1.9 - array.prototype.findlast: 1.2.5 - array.prototype.flatmap: 1.3.3 - array.prototype.tosorted: 1.1.4 - doctrine: 2.1.0 - es-iterator-helpers: 1.2.1 - eslint: 8.56.0 - estraverse: 5.3.0 - hasown: 2.0.2 - jsx-ast-utils: 3.3.5 - minimatch: 3.1.2 - object.entries: 1.1.9 - object.fromentries: 2.0.8 - object.values: 1.2.1 - prop-types: 15.8.1 - resolve: 2.0.0-next.5 - semver: 6.3.1 - string.prototype.matchall: 4.0.12 - string.prototype.repeat: 1.0.0 - eslint-plugin-react@7.37.4(eslint@8.57.1): dependencies: array-includes: 3.1.9 @@ -21210,49 +20926,6 @@ snapshots: eslint-visitor-keys@5.0.1: {} - eslint@8.56.0: - dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@8.56.0) - '@eslint-community/regexpp': 4.12.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.56.0 - '@humanwhocodes/config-array': 0.11.14 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.3.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.3 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.1 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - eslint@8.57.1: dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@8.57.1) @@ -21263,7 +20936,7 @@ snapshots: '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.3.0 - ajv: 6.12.6 + ajv: 6.15.0 chalk: 4.1.2 cross-spawn: 7.0.6 debug: 4.4.3 @@ -21272,7 +20945,7 @@ snapshots: eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.6.0 + esquery: 1.7.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -21298,13 +20971,13 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.15.0 - acorn-jsx: 5.3.2(acorn@8.15.0) + acorn: 8.16.0 + acorn-jsx: 5.3.2(acorn@8.16.0) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} - esquery@1.6.0: + esquery@1.7.0: dependencies: estraverse: 5.3.0 @@ -21512,7 +21185,7 @@ snapshots: fast-xml-parser@5.2.5: dependencies: - strnum: 2.1.2 + strnum: 2.2.3 fast-xml-parser@5.5.8: dependencies: @@ -22254,7 +21927,7 @@ snapshots: header-generator@2.1.82: dependencies: - browserslist: 4.24.4 + browserslist: 4.28.2 generative-bayesian-network: 2.1.82 ow: 0.28.2 tslib: 2.8.1 @@ -24267,8 +23940,6 @@ snapshots: node-hex@1.0.1: {} - node-releases@2.0.19: {} - node-releases@2.0.37: {} node-xlsx@0.24.0: @@ -24299,7 +23970,7 @@ snapshots: oauth-sign@0.9.0: {} - oauth4webapi@3.8.5: {} + oauth4webapi@3.8.6: {} object-assign@4.1.1: {} @@ -24391,22 +24062,12 @@ snapshots: transitivePeerDependencies: - encoding - openai@4.104.0(encoding@0.1.13)(ws@8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10))(zod@4.1.12): - dependencies: - '@types/node': 18.19.80 - '@types/node-fetch': 2.6.12 - abort-controller: 3.0.0 - agentkeepalive: 4.6.0 - form-data-encoder: 1.7.2 - formdata-node: 4.4.1 - node-fetch: 2.7.0(encoding@0.1.13) + openai@6.26.0(ws@8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10))(zod@4.1.12): optionalDependencies: ws: 8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10) zod: 4.1.12 - transitivePeerDependencies: - - encoding - openai@6.26.0(ws@8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10))(zod@4.1.12): + openai@6.34.0(ws@8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10))(zod@4.1.12): optionalDependencies: ws: 8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10) zod: 4.1.12 @@ -24421,10 +24082,10 @@ snapshots: opener@1.5.2: {} - openid-client@6.8.3: + openid-client@6.8.4: dependencies: jose: 6.2.2 - oauth4webapi: 3.8.5 + oauth4webapi: 3.8.6 option@0.2.4: {} @@ -25041,7 +24702,7 @@ snapshots: chromium-bidi: 0.11.0(devtools-protocol@0.0.1367902) debug: 4.4.3 devtools-protocol: 0.0.1367902 - typed-query-selector: 2.12.1 + typed-query-selector: 2.12.2 ws: 8.20.0(bufferutil@4.1.0)(utf-8-validate@5.0.10) transitivePeerDependencies: - bare-abort-controller @@ -25057,7 +24718,7 @@ snapshots: cosmiconfig: 9.0.1(typescript@5.9.3) devtools-protocol: 0.0.1367902 puppeteer-core: 23.11.1(bufferutil@4.1.0)(utf-8-validate@5.0.10) - typed-query-selector: 2.12.1 + typed-query-selector: 2.12.2 transitivePeerDependencies: - bare-abort-controller - bare-buffer @@ -26303,8 +25964,6 @@ snapshots: strnum@1.1.2: {} - strnum@2.1.2: {} - strnum@2.2.3: {} strtok3@10.3.5: @@ -26462,7 +26121,7 @@ snapshots: terser@5.39.0: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.15.0 + acorn: 8.16.0 commander: 2.20.3 source-map-support: 0.5.21 optional: true @@ -26646,8 +26305,6 @@ snapshots: dependencies: safe-buffer: 5.2.1 - tunnel@0.0.6: {} - turbo@2.9.6: optionalDependencies: '@turbo/darwin-64': 2.9.6 @@ -26732,7 +26389,7 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typed-query-selector@2.12.1: {} + typed-query-selector@2.12.2: {} typedarray-to-buffer@3.1.5: dependencies: @@ -26861,12 +26518,6 @@ snapshots: dependencies: rolldown: 1.0.0-rc.9 - update-browserslist-db@1.1.3(browserslist@4.24.4): - dependencies: - browserslist: 4.24.4 - escalade: 3.2.0 - picocolors: 1.1.1 - update-browserslist-db@1.2.3(browserslist@4.28.2): dependencies: browserslist: 4.28.2 @@ -26918,7 +26569,7 @@ snapshots: mime-types: 2.1.35 qs: 6.15.1 type-fest: 4.41.0 - undici: 7.18.2 + undici: 7.25.0 ylru: 2.0.0 use-callback-ref@1.3.3(@types/react@18.3.1)(react@18.3.1): @@ -27192,7 +26843,7 @@ snapshots: vm2@3.10.5: dependencies: - acorn: 8.15.0 + acorn: 8.16.0 acorn-walk: 8.3.4 optional: true diff --git a/projects/app/src/components/core/ai/AISettingModal/index.tsx b/projects/app/src/components/core/ai/AISettingModal/index.tsx index 9c08b52872..a0d33a990e 100644 --- a/projects/app/src/components/core/ai/AISettingModal/index.tsx +++ b/projects/app/src/components/core/ai/AISettingModal/index.tsx @@ -1,15 +1,12 @@ import React, { useMemo, useState } from 'react'; -import MyModal from '@fastgpt/web/components/common/MyModal'; +import MyModal from '@fastgpt/web/components/v2/common/MyModal'; import { useTranslation } from 'next-i18next'; import { useForm } from 'react-hook-form'; import { Box, - type BoxProps, Button, Flex, HStack, - ModalBody, - ModalFooter, Switch, TableContainer, Tbody, @@ -18,8 +15,8 @@ import { Thead, Tr, Table, - type FlexProps, - Input + Input, + VStack } from '@chakra-ui/react'; import { useSystemStore } from '@/web/common/system/useSystemStore'; import { NodeInputKeyEnum } from '@fastgpt/global/core/workflow/constants'; @@ -28,7 +25,7 @@ import { getDocPath } from '@/web/common/system/doc'; import AIModelSelector from '@/components/Select/AIModelSelector'; import { type LLMModelItemType } from '@fastgpt/global/core/ai/model.schema'; import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip'; -import PriceTiersLabel from '../PriceTiersLabel'; +import { PriceLine } from '../PriceTiersLabel'; import { getWebLLMModel } from '@/web/common/system/utils'; import MyIcon from '@fastgpt/web/components/common/Icon'; import dynamic from 'next/dynamic'; @@ -36,25 +33,58 @@ import InputSlider from '@fastgpt/web/components/common/MySlider/InputSlider'; import MySelect from '@fastgpt/web/components/common/MySelect'; import JsonEditor from '@fastgpt/web/components/common/Textarea/JsonEditor'; import { getLLMSupportParams } from '@fastgpt/global/core/ai/llm/utils'; +import { reasoningEffortList } from '@fastgpt/global/core/ai/constants'; +import type { ReasoningEffort } from '@fastgpt/global/core/ai/llm/type'; const ModelPriceModal = dynamic(() => import('@/components/core/ai/ModelTable').then((mod) => mod.ModelPriceModal) ); -const FlexItemStyles: FlexProps = { - mt: 4, - alignItems: 'center', - h: '35px' -}; -const LabelStyles: BoxProps = { - display: 'flex', - alignItems: 'center', - justifyContent: 'space-between', - fontSize: 'sm', - color: 'myGray.900', - width: '9rem', - mr: 5 -}; +const RIGHT_AREA_WIDTH = '320px'; + +const SectionCard = ({ title, children }: { title: string; children: React.ReactNode }) => ( + + + + {title} + + {children} + + +); + +const SettingRow = ({ + label, + tip, + switchControl, + children +}: { + label: React.ReactNode; + tip?: string; + switchControl?: React.ReactNode; + children?: React.ReactNode; +}) => ( + + + {label} + {tip && } + + + {switchControl} + {children && ( + + {children} + + )} + + +); export type AIChatSettingsModalProps = { showMaxToken?: boolean; @@ -86,11 +116,12 @@ const AIChatSettingsModal = ({ const [refresh, setRefresh] = useState(false); const { feConfigs } = useSystemStore(); - const { handleSubmit, getValues, setValue, watch, register } = useForm({ + const { handleSubmit, getValues, setValue, watch, register } = useForm({ defaultValues: defaultData }); const model = watch('model'); const reasoning = watch(NodeInputKeyEnum.aiChatReasoning); + const reasoningEffort = watch(NodeInputKeyEnum.aiChatReasoningEffort); const showResponseAnswerText = watch(NodeInputKeyEnum.aiChatIsResponseText) !== undefined; const showVisionSwitch = watch(NodeInputKeyEnum.aiChatVision) !== undefined; const showMaxHistoriesSlider = watch('maxHistories') !== undefined; @@ -123,7 +154,6 @@ const AIChatSettingsModal = ({ const onChangeModel = (e: string) => { setValue('model', e); - // update max tokens const modelData = getWebLLMModel(e); if (modelData) { setValue('maxToken', modelData.maxResponse / 2); @@ -132,10 +162,11 @@ const AIChatSettingsModal = ({ setRefresh(!refresh); }; + const showReasoningSection = supportParams.reasoning && showReasoning; + return ( @@ -144,7 +175,7 @@ const AIChatSettingsModal = ({ { window.open(getDocPath('/introduction/guide/course/ai_settings/'), '_blank'); @@ -153,334 +184,335 @@ const AIChatSettingsModal = ({ )} } - w={'500px'} + w={'580px'} + maxW={'90vw'} > - - - - {t('common:core.ai.Model')} - - - ({ - value: item.model, - label: item.name - }))} - onChange={onChangeModel} - /> - - - - - - - - - - - - - - - - - - - - -
- - {t('app:ai_point_price')} - - {({ onOpen }) => ( - - )} - - - - {t('common:core.ai.Max context')} - - - {t('common:core.ai.Support tool')} - - -
- {!!selectedModel && ( - - )} - - {Math.round((selectedModel?.maxContext || 4096) / 1000)}K - - {selectedModel?.toolChoice || selectedModel?.functionCall - ? t('common:support') - : t('common:not_support')} -
-
- - {showMaxHistoriesSlider && ( - - - - {t('app:max_histories_number')} - - - - - { - setValue('maxHistories', e); - setRefresh(!refresh); - }} - /> - - - )} - {showMaxToken && ( - - - {t('app:max_tokens')} - { - setValue('maxToken', e.target.checked ? tokenLimit / 2 : undefined); - }} - /> - - - { - setValue(NodeInputKeyEnum.aiChatMaxToken, val); - setRefresh(!refresh); - }} - /> - - - )} - {supportParams.temperature && showTemperature && ( - - - - {t('app:temperature')} - - - { - setValue('temperature', e.target.checked ? 0 : undefined); - }} - /> - - - { - setValue(NodeInputKeyEnum.aiChatTemperature, e); - setRefresh(!refresh); - }} - /> - - - )} - {supportParams.topP && showTopP && ( - - - - Top_p - - - { - setValue(NodeInputKeyEnum.aiChatTopP, e.target.checked ? 1 : undefined); - }} - /> - - - { - setValue(NodeInputKeyEnum.aiChatTopP, e); - setRefresh(!refresh); - }} - /> - - - )} - {showStopSign && supportParams.stop && ( - - - - {t('app:stop_sign')} - - { - setValue(NodeInputKeyEnum.aiChatStopSign, e.target.checked ? '' : undefined); - }} - /> - - - - - - )} - {showResponseFormat && supportParams.responseFormat && ( - - - {t('app:response_format')} - { - setValue( - NodeInputKeyEnum.aiChatResponseFormat, - e.target.checked ? selectedModel?.responseFormatList?.[0] : undefined - ); - }} - /> - - - - isDisabled={responseFormat === undefined} - size={'sm'} - bg={'myGray.25'} - list={selectedModel.responseFormatList!.map((item) => ({ - value: item, - label: item + + + {/* 基础配置 */} + + + ({ + value: item.model, + label: item.name }))} - value={responseFormat} - onChange={(e) => { - setValue(NodeInputKeyEnum.aiChatResponseFormat, e); - }} + onChange={onChangeModel} /> - - - )} - {/* Json schema */} - {showResponseFormat && responseFormat === 'json_schema' && ( - - - - JSON Schema - - - - - { - setValue(NodeInputKeyEnum.aiChatJsonSchema, e); - }} - bg={'myGray.25'} - /> - - - )} - {supportParams.reasoning && showReasoning && ( - - - {t('app:reasoning_response')} - { - const value = e.target.checked; - setValue(NodeInputKeyEnum.aiChatReasoning, value); - }} - /> - - - )} - {showVisionSwitch && ( - - - - {t('app:llm_use_vision')} - - - {supportParams.vision ? ( - + + + + + + + + + + + + + + + + + + + + +
+ + {t('app:ai_point_price')} + + {({ onOpen }) => ( + + )} + + + {t('common:core.ai.Max context')} + + {t('common:core.ai.Support tool')} + + +
+ {!!selectedModel && ( + + )} + {Math.round((selectedModel?.maxContext || 4096) / 1000)}K + {selectedModel?.toolChoice || selectedModel?.functionCall + ? t('common:support') + : t('common:not_support')} +
+ {!!selectedModel && ( + + )} +
+
+ + {showMaxHistoriesSlider && ( + + { - const value = e.target.checked; - setValue(NodeInputKeyEnum.aiChatVision, value); + setValue('maxHistories', e); + setRefresh(!refresh); }} /> - ) : ( - - {t('app:llm_not_support_vision')} - - )} -
-
- )} - {showResponseAnswerText && ( - - - - {t('app:stream_response')} - - - { - const value = e.target.checked; - setValue(NodeInputKeyEnum.aiChatIsResponseText, value); - setRefresh((state) => !state); - }} + + )} + {showMaxToken && ( + { + setValue('maxToken', e.target.checked ? tokenLimit / 2 : undefined); + }} + /> + } + > + { + setValue(NodeInputKeyEnum.aiChatMaxToken, val); + setRefresh(!refresh); + }} + /> + + )} + {supportParams.temperature && showTemperature && ( + { + setValue('temperature', e.target.checked ? 0 : undefined); + }} + /> + } + > + { + setValue(NodeInputKeyEnum.aiChatTemperature, e); + setRefresh(!refresh); + }} + /> + + )} + {supportParams.topP && showTopP && ( + { + setValue(NodeInputKeyEnum.aiChatTopP, e.target.checked ? 1 : undefined); + }} + /> + } + > + { + setValue(NodeInputKeyEnum.aiChatTopP, e); + setRefresh(!refresh); + }} + /> + + )} + {showStopSign && supportParams.stop && ( + { + setValue(NodeInputKeyEnum.aiChatStopSign, e.target.checked ? '' : undefined); + }} + /> + } + > + + + )} + {showResponseFormat && supportParams.responseFormat && ( + { + setValue( + NodeInputKeyEnum.aiChatResponseFormat, + e.target.checked ? selectedModel?.responseFormatList?.[0] : undefined + ); + }} + /> + } + > + + isDisabled={responseFormat === undefined} + h={'38px'} + list={selectedModel.responseFormatList!.map((item) => ({ + value: item, + label: item + }))} + value={responseFormat} + onChange={(e) => { + setValue(NodeInputKeyEnum.aiChatResponseFormat, e); + }} + /> + + )} + {showResponseFormat && responseFormat === 'json_schema' && ( + + + JSON Schema + + + { + setValue(NodeInputKeyEnum.aiChatJsonSchema, e); + }} + bg={'myGray.25'} + /> + + )} + {showVisionSwitch && ( + { + setValue(NodeInputKeyEnum.aiChatVision, e.target.checked); + }} + /> + ) : ( + + {t('app:llm_not_support_vision')} + + ) + } /> - - - )} -
- + )} + {showResponseAnswerText && ( + { + setValue(NodeInputKeyEnum.aiChatIsResponseText, !e.target.checked); + setRefresh((state) => !state); + }} + /> + } + /> + )} + + + {/* 思考配置 */} + {showReasoningSection && ( + + + {supportParams.reasoningEffort ? ( + + h={'38px'} + list={reasoningEffortList.map((item) => ({ + label: t(item.label), + value: item.value + }))} + value={reasoningEffort ?? null} + onChange={(e) => { + setValue(NodeInputKeyEnum.aiChatReasoningEffort, e); + }} + /> + ) : ( + + {t('app:reasoning_effort_unsupported')} + + )} + + {reasoningEffort !== 'none' && ( + { + setValue(NodeInputKeyEnum.aiChatReasoning, !e.target.checked); + }} + /> + } + /> + )} + + )} + + + - - + +
); }; diff --git a/projects/app/src/components/core/ai/PriceTiersLabel.tsx b/projects/app/src/components/core/ai/PriceTiersLabel.tsx index d42a448bd7..31ae1dcc6a 100644 --- a/projects/app/src/components/core/ai/PriceTiersLabel.tsx +++ b/projects/app/src/components/core/ai/PriceTiersLabel.tsx @@ -1,4 +1,4 @@ -import React, { useMemo } from 'react'; +import React from 'react'; import { Box, Flex, Table, Tbody, Td, Th, Thead, Tr } from '@chakra-ui/react'; import { useTranslation } from 'next-i18next'; import type { ModelPriceTierType, PriceType } from '@fastgpt/global/core/ai/model.schema'; @@ -40,158 +40,202 @@ const formatPriceSummary = ({ ); }; -const PriceTiersLabel = ({ config, unitLabel }: { config: PriceType; unitLabel: string }) => { +const SummaryLine = ({ + tiers, + priceKey, + unitLabel, + fontSize +}: { + tiers: ModelPriceTierType[]; + priceKey: 'input' | 'output'; + unitLabel: string; + fontSize: string; +}) => { const { t } = useTranslation(); - const tiers = useMemo(() => config.priceTiers || [], [config]); - - if (tiers.length === 0) { - return -; - } - return ( - 1 ? ( - - - - - - - - - - - - {tiers.map((tier, index) => ( - - - - - - ))} - -
- {t('common:model.price_tier_range')} - - {t('common:model.input_price')} - - {t('common:model.output_price')} -
- - {`${getTierLowerBoundLabel(tier)} < `} - {t('common:Input')} - {typeof tier.maxInputTokens === 'number' ? ( - {` <= ${tier.maxInputTokens}`} - ) : null} - - - {`${tier.inputPrice} ${t('common:support.wallet.subscription.point')}`} - - {`${tier.outputPrice} ${t('common:support.wallet.subscription.point')}`} -
-
-
- ) : null - } - px={0} - py={0} - maxW={'420px'} + + {priceKey === 'input' ? t('common:Input') : t('common:Output')}: + {formatPriceSummary({ + tiers, + priceKey: priceKey === 'input' ? 'inputPrice' : 'outputPrice', + unitLabel + })} + + ); +}; + +const TierBreakdownTable = ({ tiers }: { tiers: ModelPriceTierType[] }) => { + const { t } = useTranslation(); + return ( + - - - {t('common:Input')}: - {formatPriceSummary({ - tiers, - priceKey: 'inputPrice', - unitLabel - })} - - - {t('common:Output')}: - {formatPriceSummary({ - tiers, - priceKey: 'outputPrice', - unitLabel - })} - + + + + + + + + + + + {tiers.map((tier, index) => ( + + + + + + ))} + +
+ {t('common:model.price_tier_range')} + + {t('common:model.input_price')} + + {t('common:model.output_price')} +
+ + {`${getTierLowerBoundLabel(tier)} < `} + {t('common:Input')} + {typeof tier.maxInputTokens === 'number' ? ( + {` <= ${tier.maxInputTokens}`} + ) : null} + + + {`${tier.inputPrice} ${t('common:support.wallet.subscription.point')}`} + + {`${tier.outputPrice} ${t('common:support.wallet.subscription.point')}`} +
-
+ + ); +}; + +const TierTooltip = ({ + tiers, + color, + children +}: { + tiers: ModelPriceTierType[]; + color?: string; + children: React.ReactNode; +}) => ( + 1 ? : null} + px={0} + py={0} + maxW={'420px'} + > + + {children} + + +); + +export const PriceLine = React.memo( + ({ + config, + unitLabel, + priceKey, + fontSize = 'sm', + color + }: { + config: PriceType; + unitLabel: string; + priceKey: 'input' | 'output'; + fontSize?: string; + color?: string; + }) => { + const tiers = config.priceTiers || []; + if (tiers.length === 0) return -; + return ( + + + + ); + } +); + +const PriceTiersLabel = ({ config, unitLabel }: { config: PriceType; unitLabel: string }) => { + const tiers = config.priceTiers || []; + if (tiers.length === 0) return -; + return ( + + + + ); }; diff --git a/projects/app/src/pageComponents/account/model/AddModelBox.tsx b/projects/app/src/pageComponents/account/model/AddModelBox.tsx index b9aed90a35..896fb9a62a 100644 --- a/projects/app/src/pageComponents/account/model/AddModelBox.tsx +++ b/projects/app/src/pageComponents/account/model/AddModelBox.tsx @@ -769,6 +769,14 @@ export const ModelEditModal = ({ } }); + const reasoningEnabled = useWatch({ control, name: 'reasoning' }); + useEffect(() => { + // 仅在 reasoning 关闭且 reasoningEffort 实际为 true 时才清,避免挂载即把表单标 dirty + if (!reasoningEnabled && getValues('reasoningEffort')) { + setValue('reasoningEffort', false, { shouldDirty: false }); + } + }, [reasoningEnabled, getValues, setValue]); + const isCustom = !!modelData.isCustom; const isLLMModel = modelData?.type === ModelTypeEnum.llm; const isEmbeddingModel = modelData?.type === ModelTypeEnum.embedding; @@ -1074,6 +1082,13 @@ export const ModelEditModal = ({ field={'reasoning'} register={register} /> + {reasoningEnabled && ( + + )} {feConfigs?.isPlus && ( { inputs.find((input) => input.key === NodeInputKeyEnum.aiChatVision)?.value ?? true, aiChatReasoning: inputs.find((input) => input.key === NodeInputKeyEnum.aiChatReasoning)?.value ?? true, + aiChatReasoningEffort: inputs.find( + (input) => input.key === NodeInputKeyEnum.aiChatReasoningEffort + )?.value, aiChatTopP: inputs.find((input) => input.key === NodeInputKeyEnum.aiChatTopP)?.value, aiChatStopSign: inputs.find((input) => input.key === NodeInputKeyEnum.aiChatStopSign)?.value, aiChatResponseFormat: inputs.find( diff --git a/projects/app/src/service/common/system/index.ts b/projects/app/src/service/common/system/index.ts index 2f4182df4e..fb06ba6954 100644 --- a/projects/app/src/service/common/system/index.ts +++ b/projects/app/src/service/common/system/index.ts @@ -1,4 +1,3 @@ -import { initHttpAgent } from '@fastgpt/service/common/middle/httpAgent'; import fs, { existsSync } from 'fs'; import type { FastGPTFeConfigsType } from '@fastgpt/global/common/system/types/index'; import type { FastGPTConfigFileType } from '@fastgpt/global/common/system/types/index'; @@ -84,7 +83,6 @@ export function initGlobalVariables() { global.datasetParseQueueLen = global.datasetParseQueueLen ?? 0; global.qaQueueLen = global.qaQueueLen ?? 0; global.vectorQueueLen = global.vectorQueueLen ?? 0; - initHttpAgent(); initPlusRequest(); }