diff --git a/apps/web/tests/models-settings.e2e.ts b/apps/web/tests/models-settings.e2e.ts index c5af5b5aa2..0abc01dcd1 100644 --- a/apps/web/tests/models-settings.e2e.ts +++ b/apps/web/tests/models-settings.e2e.ts @@ -7,9 +7,10 @@ // appears after route topology invalidation without presenting liveness as // provider status. The customized-settings fold writes its curated fields — // the endpoint, a declared route's own name and protocol, and the reasoning -// levels of its models — as merge patches against the stored profile. Zero model calls: configuration is pure -// settings/credentials/llm-domain traffic, so there is no fixture and a -// stray stream would fail loud because the adapter registry is empty. The provider under test is +// levels of its models — as merge patches against the stored profile. Zero +// model calls: configuration is pure settings/credentials/llm-domain traffic, +// so there is no fixture and a stray stream would fail loud because the +// adapter registry is empty. The provider under test is // minimax-cn so a developer's real ANTHROPIC/OPENAI environment keys can // never shadow the derived reference. The deletion dialog distinguishes a // reference-free profile from a page-managed key before the credential and diff --git a/packages/client/ui-settings-models/README.i18n.yaml b/packages/client/ui-settings-models/README.i18n.yaml index 197d4e0c08..876279ca68 100644 --- a/packages/client/ui-settings-models/README.i18n.yaml +++ b/packages/client/ui-settings-models/README.i18n.yaml @@ -21,8 +21,8 @@ en: f4817eb2e3537ed9 zh: e589c193fa85473f /deepseek-ai-dsh-client-ui-settings-models/use-this-package/editing-a-provider: - en: 5a396a989c06ce82 - zh: 2cda02adefaed4a0 + en: 8279389d020c4f30 + zh: ea01d8e5924f3f41 /deepseek-ai-dsh-client-ui-settings-models/use-this-package/adding-and-deleting-providers: en: 9d533c65c82cd4a4 zh: 0a5da334e127c035 diff --git a/packages/client/ui-settings-models/README.md b/packages/client/ui-settings-models/README.md index 04e7d4b17a..2c9830be68 100644 --- a/packages/client/ui-settings-models/README.md +++ b/packages/client/ui-settings-models/README.md @@ -59,7 +59,7 @@ The DeepSeek card edits the `llm-deepseek` endpoint, credentials, and model cata Expand **Customized settings → Model options** to edit each model. Both provider families share the same row layout, labels, and icons: context window and max output tokens occupy two columns, and **Input types** occupies a separate row with **Text** and **Image** checkboxes. A row without an input declaration displays the installed model’s input types, then the provider default, then Text. Known pi-ai providers load their installed catalog without endpoint I/O; opening a row does not write an override. Explicit input selections take precedence, including text-only overrides of vision models. Checkbox edits save the selected types, with at least one type required. DeepSeek writes `inputModalities`; pi-ai writes `input`. Unchecking Image for DeepSeek also removes `imagePixelBudget` and `imageMaxBytes`, because the adapter rejects those limits without image input. Clearing the input field in `cordis.patch.yml` restores adapter inheritance; **Restore default models** resets the entire catalog override. Declare only input types the upstream model can actually process. -A model row on a hand-declared pi-ai route also edits its **Reasoning levels**, the `reasoningEfforts` the adapter already reads from `cordis.patch.yml`; the **?** beside the label explains the two columns. With the switch off the field is absent, so the model does not reason and the model picker offers no level; a stored `false` is kept until the switch is used. Turning it on adds rows for off, low, medium, and high. Each row pairs a level select — one of pi-ai's `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`, each usable once — with the **API value** sent for it, which starts as the level name, and a blank value sends the level name. Off only turns reasoning off, so its value field is disabled; a value already written for it in `cordis.patch.yml` is shown and kept. Changing a row's level resets a value still spelled as the old level. Rows can be added and deleted, the model picker lists the levels in escalation order whatever the row order, and at least one level besides Off is required. Routes served from the installed catalog and the DeepSeek card keep the adapter's levels and show no reasoning control. +A model row on a hand-declared pi-ai route also edits its **Reasoning levels**, the `reasoningEfforts` the adapter already reads from `cordis.patch.yml`; the **?** beside the label explains the two columns. With the switch off the field is absent, so the model does not reason and the model picker offers no level; a stored `false` is kept until the switch is used. Turning it on adds rows for off, low, medium, and high. Each row pairs a level select — one of pi-ai's `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`, each usable once — with the **API value** sent for it, which starts as the level name, and a blank value sends the level name. Off only turns reasoning off, so its value field is disabled; a value already written for it in `cordis.patch.yml` is shown and kept. Changing a row's level resets a value still spelled as the old level; a custom value carries over only between two thinking levels, so changing a row to or from Off resets it. Rows can be added and deleted, the model picker lists the levels in escalation order whatever the row order, and at least one level besides Off is required. Routes served from the installed catalog and the DeepSeek card keep the adapter's levels and show no reasoning control. ### Adding and deleting providers diff --git a/packages/client/ui-settings-models/README.zh.md b/packages/client/ui-settings-models/README.zh.md index 8062e1cc55..38d32ca146 100644 --- a/packages/client/ui-settings-models/README.zh.md +++ b/packages/client/ui-settings-models/README.zh.md @@ -59,7 +59,7 @@ API 密钥输入框初始为空,并通过 `autocomplete="new-password"` 请求 展开**自定义设置 → 模型选项**编辑模型。两个提供商家族共用相同的模型行布局、标签和图标:上下文窗口与最大输出 token 数分为两列,**输入类型**独占下一行,提供**文本**和**图片**复选框。未声明输入类型的模型行优先显示已安装模型的输入类型,其次是提供商默认值,最后回退为文本。已知 pi-ai 提供商会加载已安装目录,不向端点发送请求;打开模型行不会写入覆盖值。显式输入选择具有优先权,包括为视觉模型设置的仅文本覆盖。修改复选框会保存所选类型,且至少保留一种。DeepSeek 写入 `inputModalities`,pi-ai 写入 `input`。DeepSeek 取消勾选图片时,还会移除 `imagePixelBudget` 和 `imageMaxBytes`,因为适配器在没有图片输入时拒绝这些限制。在 `cordis.patch.yml` 中清除输入字段可恢复适配器继承;**恢复默认模型**会重置整个模型目录覆盖。仅声明上游模型实际能够处理的输入类型。 -手工声明的 pi-ai 路由上,模型行还会编辑**推理等级**,即适配器本来就从 `cordis.patch.yml` 读取的 `reasoningEfforts`;标签旁的 **?** 说明两列的含义。开关关闭时该字段不存在,模型不推理,模型选择器不提供任何档位;已存储的 `false` 在开关被操作前保持不变。打开开关会添加 off、low、medium 和 high 四行。每行把一个档位选择框——pi-ai 的 `off`、`minimal`、`low`、`medium`、`high`、`xhigh`、`max` 之一,每个档位只能用一次——与发送给它的 **API 参数值**配成一对,参数值初始为档位名,留空时发送档位名。Off 只表示关闭思考,因此它的参数值输入框是禁用的;`cordis.patch.yml` 中已为它写好的值会显示并保留。修改某行的档位时,仍是旧档位名的参数值会随之重置。行可以增删,无论行的顺序如何,模型选择器都按升级顺序列出档位,且至少需要一个 Off 以外的档位。走已安装目录的路由和 DeepSeek 卡片沿用适配器的档位,不显示推理等级控件。 +手工声明的 pi-ai 路由上,模型行还会编辑**推理等级**,即适配器本来就从 `cordis.patch.yml` 读取的 `reasoningEfforts`;标签旁的 **?** 说明两列的含义。开关关闭时该字段不存在,模型不推理,模型选择器不提供任何档位;已存储的 `false` 在开关被操作前保持不变。打开开关会添加 off、low、medium 和 high 四行。每行把一个档位选择框——pi-ai 的 `off`、`minimal`、`low`、`medium`、`high`、`xhigh`、`max` 之一,每个档位只能用一次——与发送给它的 **API 参数值**配成一对,参数值初始为档位名,留空时发送档位名。Off 只表示关闭思考,因此它的参数值输入框是禁用的;`cordis.patch.yml` 中已为它写好的值会显示并保留。修改某行的档位时,仍是旧档位名的参数值会随之重置;自定义值只在两个思考档位之间保留,切到或切离 Off 都会重置。行可以增删,无论行的顺序如何,模型选择器都按升级顺序列出档位,且至少需要一个 Off 以外的档位。走已安装目录的路由和 DeepSeek 卡片沿用适配器的档位,不显示推理等级控件。 ### 新增与删除提供商 diff --git a/packages/client/ui-settings-models/src/client/locales.ts b/packages/client/ui-settings-models/src/client/locales.ts index 9a6437bbc2..bd39d8ec84 100644 --- a/packages/client/ui-settings-models/src/client/locales.ts +++ b/packages/client/ui-settings-models/src/client/locales.ts @@ -77,7 +77,7 @@ export const en = { modelReasoningLevel: 'Level', modelReasoningValue: 'API value', modelReasoningHelp: 'About reasoning levels', - modelReasoningHelpText: 'The API value is sent in the request\'s reasoning-effort field, such as OpenAI\'s reasoning_effort. It defaults to the level name; where the model provider\'s API documentation specifies a different value, follow it. Off turns reasoning off and takes no value.', + modelReasoningHelpText: 'The API value is sent in the request\'s reasoning-effort field, such as OpenAI\'s reasoning_effort. It defaults to the level name; where the model provider\'s API documentation specifies a different value, follow it. Off turns reasoning off and needs no value; a value already written in the configuration is kept and sent.', modelReasoningNeedsLevel: 'Add at least one level besides Off, or turn reasoning levels off.', modelReasoningAdd: 'Add level', modelReasoningRemove: 'Delete level', @@ -218,7 +218,7 @@ export const zh: { [Key in keyof typeof en]: string } = { modelReasoningLevel: '档位', modelReasoningValue: 'API 参数值', modelReasoningHelp: '推理等级说明', - modelReasoningHelpText: 'API 参数值会写入请求的推理强度字段(如 OpenAI 的 reasoning_effort),默认与档位名相同;如有不同,以模型提供商的 API 文档为准。Off 表示关闭思考,无需填写。', + modelReasoningHelpText: 'API 参数值会写入请求的推理强度字段(如 OpenAI 的 reasoning_effort),默认与档位名相同;如有不同,以模型提供商的 API 文档为准。Off 表示关闭思考,不需要填写参数值;配置中已写入的值会保留并发送。', modelReasoningNeedsLevel: '至少添加一个 Off 以外的档位;不需要思考请关闭推理等级。', modelReasoningAdd: '添加档位', modelReasoningRemove: '删除档位',