fix: 编码套餐默认启用深度推理
- 区分编码套餐与模型推理概念 - 编码套餐切换时默认开启深度推理 - 更新中英文提示文案
This commit is contained in:
1 parent
4c02d7d352
commit
99b5d94dc2
4 files changed
+19
-7
No files matched your search
@@ -23,6 +23,7 @@ import {
|
|||||||
endpointPlaceholder,
|
endpointPlaceholder,
|
||||||
findProvider,
|
findProvider,
|
||||||
GATEWAY_PROVIDERS,
|
GATEWAY_PROVIDERS,
|
||||||
|
isCodingPlanProvider,
|
||||||
LOCAL_PROVIDERS,
|
LOCAL_PROVIDERS,
|
||||||
needsManualModel,
|
needsManualModel,
|
||||||
} from './llmProviders';
|
} from './llmProviders';
|
||||||
@@ -166,7 +167,14 @@ export default function LLMConfigPage() {
|
|||||||
setModelMode(needsManualModel(p, next) ? 'input' : 'select');
|
setModelMode(needsManualModel(p, next) ? 'input' : 'select');
|
||||||
setDiscoveredModels([]);
|
setDiscoveredModels([]);
|
||||||
invalidateVerify();
|
invalidateVerify();
|
||||||
setCfg({ ...cfg, provider: p, endpoint: next.endpoint, model, api_key: '' });
|
setCfg({
|
||||||
|
...cfg,
|
||||||
|
provider: p,
|
||||||
|
endpoint: next.endpoint,
|
||||||
|
model,
|
||||||
|
api_key: '',
|
||||||
|
reasoning_enabled: isCodingPlanProvider(p),
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onModel = (m: string) => {
|
const onModel = (m: string) => {
|
||||||
|
|||||||
@@ -172,6 +172,10 @@ export const PROVIDERS: ProviderMeta[] = [
|
|||||||
|
|
||||||
export const findProvider = (provider: string) => PROVIDERS.find((item) => item.id === provider);
|
export const findProvider = (provider: string) => PROVIDERS.find((item) => item.id === provider);
|
||||||
|
|
||||||
|
// 编码套餐默认启用深度推理,用户仍可在页面中按模型能力关闭。 // Logan.Li
|
||||||
|
export const isCodingPlanProvider = (provider: string) =>
|
||||||
|
CLOUD_CODING_PROVIDERS.some((item) => item.id === provider);
|
||||||
|
|
||||||
export const needsManualModel = (provider: string, meta?: ProviderMeta) =>
|
export const needsManualModel = (provider: string, meta?: ProviderMeta) =>
|
||||||
provider === 'custom' || provider === 'new-api' || provider === 'vllm'
|
provider === 'custom' || provider === 'new-api' || provider === 'vllm'
|
||||||
|| provider === 'lmstudio' || !meta?.models.length;
|
|| provider === 'lmstudio' || !meta?.models.length;
|
||||||
|
|||||||
@@ -8420,7 +8420,7 @@
|
|||||||
"durationM": "{{mins}}m",
|
"durationM": "{{mins}}m",
|
||||||
"emptyConvHint": "No conversations yet; enter a question to start chatting with the AI assistant",
|
"emptyConvHint": "No conversations yet; enter a question to start chatting with the AI assistant",
|
||||||
"enableLlm": "Enable LLM Service",
|
"enableLlm": "Enable LLM Service",
|
||||||
"enableReasoning": "Enable reasoning mode",
|
"enableReasoning": "Enable deep reasoning",
|
||||||
"endpointLabel": "Endpoint",
|
"endpointLabel": "Endpoint",
|
||||||
"endpointModelHint": "Enter the endpoint ID created in the provider console",
|
"endpointModelHint": "Enter the endpoint ID created in the provider console",
|
||||||
"errorOccurred": "An error occurred",
|
"errorOccurred": "An error occurred",
|
||||||
@@ -8664,9 +8664,9 @@
|
|||||||
"reasoningHigh": "High",
|
"reasoningHigh": "High",
|
||||||
"reasoningLow": "Low",
|
"reasoningLow": "Low",
|
||||||
"reasoningMedium": "Medium",
|
"reasoningMedium": "Medium",
|
||||||
"reasoningModelHint": "For reasoning models such as OpenAI GPT-5 / o-series, DeepSeek R1, and Claude Sonnet / Opus 4.",
|
"reasoningModelHint": "Enabled by default for Coding Plans; adjust it for model capabilities such as GPT-5 / o-series, DeepSeek R1, and Claude Sonnet / Opus 4.",
|
||||||
"reasoningOn": "Reasoning mode is on",
|
"reasoningOn": "Reasoning mode is on",
|
||||||
"reasoningPlanMode": "Reasoning / Plan Mode",
|
"reasoningPlanMode": "Deep Reasoning",
|
||||||
"recommended": "Recommended",
|
"recommended": "Recommended",
|
||||||
"regenerate": "Regenerate",
|
"regenerate": "Regenerate",
|
||||||
"rejectedExec": "Execution rejected: {{cmd}}",
|
"rejectedExec": "Execution rejected: {{cmd}}",
|
||||||
|
|||||||
@@ -8420,7 +8420,7 @@
|
|||||||
"durationM": "{{mins}}分钟",
|
"durationM": "{{mins}}分钟",
|
||||||
"emptyConvHint": "暂无对话记录,输入问题开始与 AI 助手对话",
|
"emptyConvHint": "暂无对话记录,输入问题开始与 AI 助手对话",
|
||||||
"enableLlm": "启用 LLM 服务",
|
"enableLlm": "启用 LLM 服务",
|
||||||
"enableReasoning": "启用推理模式",
|
"enableReasoning": "启用深度推理",
|
||||||
"endpointLabel": "接口地址(Endpoint)",
|
"endpointLabel": "接口地址(Endpoint)",
|
||||||
"endpointModelHint": "请填写在提供商控制台创建的接入点 ID",
|
"endpointModelHint": "请填写在提供商控制台创建的接入点 ID",
|
||||||
"errorOccurred": "发生错误",
|
"errorOccurred": "发生错误",
|
||||||
@@ -8664,9 +8664,9 @@
|
|||||||
"reasoningHigh": "高",
|
"reasoningHigh": "高",
|
||||||
"reasoningLow": "低",
|
"reasoningLow": "低",
|
||||||
"reasoningMedium": "中",
|
"reasoningMedium": "中",
|
||||||
"reasoningModelHint": "适用于 OpenAI GPT-5 / o-series、DeepSeek R1、Claude Sonnet / Opus 4 等推理模型。",
|
"reasoningModelHint": "编码套餐默认开启;也可按模型能力调整,适用于 GPT-5 / o-series、DeepSeek R1、Claude Sonnet / Opus 4 等。",
|
||||||
"reasoningOn": "推理模式已开启",
|
"reasoningOn": "推理模式已开启",
|
||||||
"reasoningPlanMode": "推理 / Plan 模式",
|
"reasoningPlanMode": "深度推理",
|
||||||
"recommended": "推荐",
|
"recommended": "推荐",
|
||||||
"regenerate": "重新生成",
|
"regenerate": "重新生成",
|
||||||
"rejectedExec": "已拒绝执行:{{cmd}}",
|
"rejectedExec": "已拒绝执行:{{cmd}}",
|
||||||
|
|||||||
Reference in new issue
Block a user