@qilin-agent/client-ui-settings-models 3.1.5 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +6 -6
- package/README.md +13 -3
- package/README.zh.md +13 -3
- package/lib/client.js +1476 -113
- package/lib/index.js +24 -4
- package/lib/types/client/ApiKeyInput.d.ts +17 -0
- package/lib/types/client/CustomProviderCard.d.ts +13 -5
- package/lib/types/client/ModelListEditor.d.ts +13 -0
- package/lib/types/client/ModelReasoningEfforts.d.ts +43 -0
- package/lib/types/client/ModelRow.d.ts +2 -0
- package/lib/types/client/ProviderEditor.d.ts +25 -6
- package/lib/types/client/index.d.ts +4 -2
- package/lib/types/client/locales.d.ts +24 -3
- package/lib/types/client/operations.d.ts +1 -7
- package/lib/types/client/store.d.ts +27 -4
- package/lib/types/index.d.ts +10 -3
- package/lib/types/onboarding-config.d.ts +16 -0
- package/package.json +18 -13
package/README.i18n.yaml
CHANGED
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
en: cac50319f379a794
|
|
19
19
|
zh: 5452cb099584cfd7
|
|
20
20
|
/qilin-agent-client-ui-settings-models/use-this-package/api-keys:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
21
|
+
en: 644c771c6398d855
|
|
22
|
+
zh: 3fae98747222b713
|
|
23
23
|
/qilin-agent-client-ui-settings-models/use-this-package/editing-a-provider:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: bf92096bdde5e93a
|
|
25
|
+
zh: 4012a71b7d0f01d2
|
|
26
26
|
/qilin-agent-client-ui-settings-models/use-this-package/adding-and-deleting-providers:
|
|
27
27
|
en: 30c980f905a0245d
|
|
28
28
|
zh: bc119152d4f1a16d
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
en: dfa69c8f6c7e522e
|
|
43
43
|
zh: ee084759767805b4
|
|
44
44
|
/qilin-agent-client-ui-settings-models/understand-the-implementation/onboarding-coordinator:
|
|
45
|
-
en:
|
|
46
|
-
zh:
|
|
45
|
+
en: 616fda9b1af8283d
|
|
46
|
+
zh: 53c45f136a5b76d0
|
|
47
47
|
/qilin-agent-client-ui-settings-models/further-exploration:
|
|
48
48
|
en: 79d843a7353898ac
|
|
49
49
|
zh: ba499db1207ea7ac
|
package/README.md
CHANGED
|
@@ -31,16 +31,26 @@ A provider with a stored catalog error remains visible with its diagnostic and e
|
|
|
31
31
|
|
|
32
32
|
### API keys
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
API-key inputs start empty and use `autocomplete="new-password"` to ask browsers not to autofill saved login passwords. A nonempty draft has the same reveal control as masked conversation text: **Show secret** reveals the current input and **Hide secret** masks it. Changing or clearing the input masks it again. Stored credentials are never read into the input.
|
|
35
|
+
|
|
36
|
+
The primary field on an editor card is a single **API key** input — the page never asks for an environment-variable name. A typed key stores write-only through `credentials.set` under the profile's reference, deriving `<ROUTE>_API_KEY` when the profile has none, and the pi-ai profile records that derivation as `apiKeyEnv`, so `settings.yaml` never carries a key value. Leaving a new pi-ai provider's key blank saves a reference-free profile and preserves provider-native authentication (for example the Bedrock credential chain or Vertex ADC). The field's placeholder and help tooltip use the profile's `apiKeyEnv` when it has one; otherwise they use the credential variables of the route's `nativeAuth`, excluding `baseURLEnv` address variables, in lookup order, as the configurable-provider directory reports them. These display hints omit references containing `oauth` (case-insensitively), and describe saved credentials followed by the displayed environment fallbacks. This presentation filter does not change the [credential resolution order](../../../docs/subsystems/credentials.md), the adapter's complete environment list, or an explicit reference. A filtered explicit reference still has a usable key input with the plain placeholder and no tooltip. A native route that has no key authentication omits the key field and authentication help entirely; an explicit reference still enables the field. A profile without a reference on a route without `nativeAuth`, such as a hand-declared route, shows the plain key placeholder and no tooltip. A row labels API-key state with a green solid dot only when a referenced credential is confirmed configured, and with a red solid dot only when a named reference is confirmed missing. A successful Apply emits a local accessible status message without echoing secret material.
|
|
37
|
+
|
|
38
|
+
The editor reads redacted `CredentialInfo` from the page snapshot to choose the saved-credential placeholder or environment detection, without displaying a credential-source label. The card runs no credential probe of its own; refreshing the snapshot updates an open editor, and the hint never receives a credential value or changes field writability.
|
|
35
39
|
|
|
36
40
|
### Editing a provider
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
A blank key field offers a saved credential when one is detected, with no status text below the input; otherwise it offers environment authentication. Redacted credential checks from the page snapshot distinguish a detected environment reference, no detected variables, and an unconfirmed read. A missing-variable hint names the first variable to configure, and a detected environment reference names the variable it found. Address configuration variables do not count as credentials. Hidden authentication references still participate in detection; a generic detected hint keeps their names hidden. Detection does not validate credentials, test a connection, or inspect provider-managed files such as AWS profiles and Google application-default credentials. A nonempty input shows no authentication status text. The page reads native variable names as well as named references, in batches of at most 64, and never reads their values into the Client.
|
|
43
|
+
|
|
44
|
+
A provider whose directory entry reports `baseURLEnv` shows those configuration names below the **Base URL** input only while no endpoint is stored and the directory reports no `defaultBaseURL`; a stored profile endpoint, else that catalog endpoint, is the placeholder choice.
|
|
45
|
+
|
|
46
|
+
The collapsed 自定义设置 fold carries the curated extras: `baseURL` for both families (the placeholder shows the endpoint the profile resolves to — the public endpoint for deepseek, else the `defaultBaseURL` the configurable-provider directory reports for a pi-ai catalog route), each adapter's model catalog, and the **display name** and **API protocol** of a pi-ai route the adapter does not ship. Profile `headers` remain deployment configuration in `settings.yaml` or Cordis config and have no Models-page editor. The Provider ID stays fixed: it is the settings key, the name every other namespace and every logged session references, and the stem of a credential reference the page cannot read back to move. There is no provider-scoped reasoning-effort field: effort is a per-model capability, so a provider-scoped control could only be set to a value some models reject. Each model row edits `id`, optional display `name`, optional `contextWindow`/`maxTokens`, input types, and, on a hand-declared pi-ai route, reasoning levels; unrelated model fields survive edits.
|
|
39
47
|
|
|
40
48
|
The DeepSeek card edits the shared `llm-deepseek` endpoint, credentials, and model catalog without a protocol selector. When Cordis YAML selects Messages, the public endpoint placeholder is `https://api.deepseek.com/anthropic`. Saving the card preserves protocol configuration.
|
|
41
49
|
|
|
42
50
|
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 `settings.yaml` restores adapter inheritance; **Restore default models** resets the entire catalog override. Declare only input types the upstream model can actually process.
|
|
43
51
|
|
|
52
|
+
A model row on a hand-declared pi-ai route also edits its **Reasoning levels**, the `reasoningEfforts` the adapter already reads from `settings.yaml`; 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 always starts from rows for off, low, medium, and high; it does not restore levels removed earlier, and **Cancel** discards the edit instead. Each row pairs a level select — the keys `llm-pi-ai`'s configuration schema accepts in `reasoningEfforts`, read from the namespace schema like the protocol choices and today `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`, each usable once — with the **API value** sent for it, which starts as the level name; a field cleared while typing stores the level name and shows it once the field is left. Off only turns reasoning off, so its value field is disabled; a value already written for it in `settings.yaml` 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. A stored key the schema does not list keeps its row and stays selectable there. Rows can be added and deleted and are saved in row order, while the model picker lists the levels in escalation order. The section refuses what the adapter refuses: no level besides Off — including a `reasoningEfforts:` left without a value, which shows the switch on with no rows — or a value that is missing on a level besides Off or empty on any level. A refused value marks its field invalid, and leaving that field fills in the level name. The rows keep no state of their own, so a model row reused after a deletion, a reset, or a fold shows only its own model. Routes served from the installed catalog and the DeepSeek card keep the adapter's levels and show no reasoning control.
|
|
53
|
+
|
|
44
54
|
### Adding and deleting providers
|
|
45
55
|
|
|
46
56
|
The add flow is a card carrying the dormant-directory provider select — a bare-mounted `llm-pi-ai` offers its whole installed catalog before any route exists. **Add a custom provider** declares a route pi-ai does not ship; the create card asks for a unique **Provider ID**, an endpoint, a protocol, and at least one uniquely-identified model, because nothing can default those. The protocol picker names each protocol by its product name — OpenAI Chat Completions, OpenAI Responses, Anthropic Messages — while the stored value stays the schema identifier; a protocol the adapter adds before this page names it shows that identifier. The endpoint must be a parseable HTTP or HTTPS URL; localhost, IPv4 and IPv6 literals, and custom ports remain valid. A syntax error blocks both discovery and creation at the field, while a request failure remains a separate provider error. **Fetch available models** asks the `llm/discoverModels` Remote about the endpoint the form shows, so adding a provider is one pass instead of save-then-return; the reply opens a searchable picker rather than being written, and nothing is written until **Add selected**. Each selected candidate copies its id, display name, context window, output-token cap, and disclosed input types into the editable row when disclosed, while an existing row retains its user-tuned values. Search matches model ids and optional display names without clearing hidden selections. **Select all** adds the visible results, while **Deselect all** clears the entire selection so hidden results cannot be adopted accidentally. A row is deletable only when the user layer alone carries it (removal restores the composition base), and its confirmation dialog names the provider.
|
|
@@ -73,7 +83,7 @@ Each settings write carries the card's current `revision`, so a concurrent write
|
|
|
73
83
|
|
|
74
84
|
### Onboarding coordinator
|
|
75
85
|
|
|
76
|
-
The DeepSeek step renders the existing `ProviderEditor` in credential-only mode inside this package's onboarding modal; `credentials.set` stays the only secret write, and no provider settings are changed.
|
|
86
|
+
The DeepSeek step renders the existing `ProviderEditor` in credential-only mode inside this package's onboarding modal; `credentials.set` stays the only secret write, and no provider settings are changed. The Host publishes the `credentialOnboarding` option (default `true`) with the page bootstrap; `false` leaves the API-key step to a native shell that owns credential onboarding.
|
|
77
87
|
|
|
78
88
|
</details>
|
|
79
89
|
|
package/README.zh.md
CHANGED
|
@@ -31,16 +31,26 @@ kind: "package-reference"
|
|
|
31
31
|
|
|
32
32
|
### API 密钥
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
API 密钥输入框初始为空,并使用 `autocomplete="new-password"` 提示浏览器不要自动填充已保存的登录密码。非空草稿拥有与掩码会话文本相同的显隐控件:**显示密钥**显示当前输入,**隐藏密钥**重新掩码。修改或清空输入都会重新掩码。已存储的凭据绝不会读入输入框。
|
|
35
|
+
|
|
36
|
+
编辑卡片上的主字段是单独一个 **API 密钥**输入框——页面从不询问环境变量名。键入的密钥经 `credentials.set` 以**只写**方式存入 profile 的引用之下,profile 没有引用时便派生 `<ROUTE>_API_KEY`,pi-ai profile 会把这次派生记录为 `apiKeyEnv`,因此 `settings.yaml` 从不携带密钥值。为新的 pi-ai 提供方留空密钥会保存一个不带引用的 profile,从而保留提供方原生认证(例如 Bedrock 凭据链或 Vertex ADC)。输入框的占位符与帮助提示优先使用 profile 的 `apiKeyEnv`;没有时使用路由 `nativeAuth` 的凭据变量(按可配置提供方目录报告的查找顺序,并排除 `baseURLEnv` 地址变量)。这些展示提示会忽略包含 `oauth` 的引用(不区分大小写),并按「已保存凭据在前、其后为所显示环境后备」的方式描述。此展示过滤不改变[凭据解析顺序](../../../docs/subsystems/credentials.zh.md)、适配器的完整环境列表或显式引用。被过滤的显式引用仍提供可用的密钥输入框,占位符为普通样式且无提示。没有密钥认证的原生路由会完全省略密钥输入框与认证帮助;显式引用仍会启用该输入框。profile 无引用且路由无 `nativeAuth`(例如手工声明的路由)时,显示普通密钥占位符且无提示。只有确认引用的凭据已配置时,行才会以绿色实心点标示 API 密钥状态;只有确认具名引用缺失时,才会以红色实心点标示。「应用」成功后会发出本地无障碍状态消息,且绝不回显任何机密内容。
|
|
37
|
+
|
|
38
|
+
编辑器从页面快照读取脱敏的 `CredentialInfo` 来选择「已保存凭据」占位符或环境检测,不显示凭据来源标签。卡片自身不发起凭据探测;快照刷新会更新已打开的编辑器,提示也绝不接收凭据值、绝不改变字段的可写性。
|
|
35
39
|
|
|
36
40
|
### 编辑提供方
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
留空的密钥字段在检测到已保存凭据时提供该凭据,输入框下方不显示状态文字;否则提供环境认证。来自页面快照的脱敏凭据检查区分「已检测到环境引用」「未检测到变量」和「读取状态未确认」。缺少变量的提示会给出需要配置的第一个变量名,检测到环境引用的提示会给出它找到的变量。地址配置变量不计作凭据。被隐藏的认证引用仍参与检测;笼统的「已检测到」提示不会显示它们的名称。检测不验证凭据、不测试连接,也不检查 AWS profile 或 Google 应用默认凭据等提供方管理的文件。非空输入不显示认证状态文字。页面按每批最多 64 项读取原生变量名与具名引用,且绝不把变量值读入 Client。
|
|
43
|
+
|
|
44
|
+
提供方目录报告 `baseURLEnv` 的提供方,只有在既未存储端点、目录也未报告 `defaultBaseURL` 时,才把这些配置变量名显示在 **API 地址**输入框下方;占位符首选已存储的 profile 端点,否则为目录报告的目录端点。
|
|
45
|
+
|
|
46
|
+
收起的「自定义设置」折叠区承载精选的额外字段:两个家族都有 `baseURL`(占位符显示 profile 解析到的端点——deepseek 为公共端点,pi-ai 目录路由则为可配置提供方目录报告的 `defaultBaseURL`)、各适配器自己的模型目录,以及适配器未提供的 pi-ai 路由的**显示名称**与 **API 协议**。Profile `headers` 仍是 `settings.yaml` 或 Cordis 配置中的部署配置,Models 页面不提供编辑器。Provider ID 保持固定:它是 settings 的键、其他每个 namespace 与每一条已记录会话引用的名字,也是页面读不回、因而搬不走的凭据引用词干。这里没有提供方级的推理等级字段:它是按模型的能力,提供方级的控件只可能被设成某些模型会拒绝的值。每个模型行可编辑 `id`、可选显示 `name`、可选 `contextWindow`/`maxTokens`、输入类型,以及手工声明的 pi-ai 路由上的推理等级;无关的模型字段在编辑后仍会保留。
|
|
39
47
|
|
|
40
48
|
`llm-deepseek` 的 DeepSeek 卡片编辑共用的端点、凭据和模型目录,不提供协议选择器。Cordis YAML 选择 Messages 时,官方端点占位符为 `https://api.deepseek.com/anthropic`;保存卡片不会改写协议配置。
|
|
41
49
|
|
|
42
50
|
展开**自定义设置 → 模型选项**编辑模型。两个提供方家族共用相同的模型行布局、标签和图标:上下文窗口与最大输出 token 数分为两列,**输入类型**独占下一行,提供**文本**和**图片**复选框。未声明输入类型的模型行优先显示已安装模型的输入类型,其次是提供方默认值,最后回退为文本。已知 pi-ai 提供方会加载已安装目录,不向端点发送请求;打开模型行不会写入覆盖值。显式输入选择具有优先权,包括为视觉模型设置的仅文本覆盖。修改复选框会保存所选类型,且至少保留一种。DeepSeek 写入 `inputModalities`,pi-ai 写入 `input`。DeepSeek 取消勾选图片时,还会移除 `imagePixelBudget` 和 `imageMaxBytes`,因为适配器在没有图片输入时拒绝这些限制。在 `settings.yaml` 中清除输入字段可恢复适配器继承;**恢复默认模型**会重置整个模型目录覆盖。仅声明上游模型实际能够处理的输入类型。
|
|
43
51
|
|
|
52
|
+
手工声明的 pi-ai 路由上,模型行还会编辑**推理等级**,即适配器本来就从 `settings.yaml` 读取的 `reasoningEfforts`;标签旁的 **?** 说明两列的含义。开关关闭时该字段不存在,模型不推理,模型选择器不提供任何档位;已存储的 `false` 在开关被操作前保持不变。打开开关总是从 off、low、medium 和 high 四行开始,不会恢复之前删掉的档位;要放弃修改请点**取消**。每行把一个档位选择框——可选值是 `llm-pi-ai` 配置 schema 允许作为 `reasoningEfforts` 键的档位,与协议选项一样从命名空间 schema 读取,目前为 `off`、`minimal`、`low`、`medium`、`high`、`xhigh`、`max`,每个档位只能用一次——与发送给它的 **API 参数值**配成一对,参数值初始为档位名;输入时清空的字段会存为档位名,离开字段后显示出来。Off 只表示关闭思考,因此它的参数值输入框是禁用的;`settings.yaml` 中已为它写好的值会显示并保留。修改某行的档位时,仍是旧档位名的参数值会随之重置;自定义值只在两个思考档位之间保留,切到或切离 Off 都会重置。schema 未列出的已存键会保留自己的行,并可在该行中继续选择。行可以增删,并按行的顺序保存,模型选择器则按升级顺序列出档位。本节拒绝适配器会拒绝的配置:没有 Off 以外的档位(包括未写值的 `reasoningEfforts:`,此时开关显示为打开且没有任何行),或者 Off 以外的档位缺少参数值、任意档位的参数值为空字符串。被拒绝的值会把对应输入框标为无效,离开该输入框时会填入档位名。各行不保留自己的状态,因此删除、恢复默认或折叠之后被复用的模型行只显示它自己的模型。走已安装目录的路由和 DeepSeek 卡片沿用适配器的档位,不显示推理等级控件。
|
|
53
|
+
|
|
44
54
|
### 新增与删除提供方
|
|
45
55
|
|
|
46
56
|
「新增」流程是一张承载休眠目录提供方选择框的卡片——裸挂载的 `llm-pi-ai` 在任何路由存在之前就能提供其完整的已安装 catalog。**添加自定义提供方**声明一条 pi-ai 不提供的路由;创建卡片会索要唯一的 **Provider ID**、端点、协议与至少一个可唯一识别的模型,因为没有东西能为它们兜底。协议选择框以产品名称显示各协议——OpenAI Chat Completions、OpenAI Responses、Anthropic Messages——存储的值仍是 schema 标识符;适配器新增而本页尚未命名的协议直接显示其标识符。端点必须是可解析的 HTTP 或 HTTPS URL;localhost、IPv4 与 IPv6 字面地址以及自定义端口仍然有效。语法错误会在字段处阻止询问与创建,请求失败则继续作为独立的提供方错误显示。**获取可用模型**通过 `llm/discoverModels` Remote 查询表单显示的端点,因此新增提供方一次即可完成,而非先保存再返回;回复打开的是可搜索选择器而非直接写入,只有点击**添加所选**才会写入。每个选中候选会在提供方公布相应信息时,把 id、显示名、上下文窗口、最大输出 token 数和已公布的输入类型复制进可编辑行;已经存在的行保留用户调整过的值。搜索会匹配模型 id 与可选显示名称,且不会清除隐藏项的勾选状态。**全选**会加入可见结果,而**取消全选**会清空全部勾选,以免意外采用隐藏结果。只有用户层单独携带某行时,该行才可删除(删除会恢复组合基线),其确认对话框会指名该提供方。
|
|
@@ -73,7 +83,7 @@ kind: "package-reference"
|
|
|
73
83
|
|
|
74
84
|
### 引导协调器
|
|
75
85
|
|
|
76
|
-
DeepSeek 步骤在本包的引导模态框内以仅凭据模式渲染既有 `ProviderEditor`;`credentials.set`
|
|
86
|
+
DeepSeek 步骤在本包的引导模态框内以仅凭据模式渲染既有 `ProviderEditor`;`credentials.set` 仍是唯一的机密写入,且不改变任何提供方设置。宿主随页面引导数据发布 `credentialOnboarding` 选项(默认 `true`);置为 `false` 时,API 密钥步骤交给负责凭据引导的原生壳。
|
|
77
87
|
|
|
78
88
|
</details>
|
|
79
89
|
|