Merge remote-tracking branch 'origin/master' into worktree/persist-web-theme-settings

# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/host/apiproxy/README.i18n.yaml
This commit is contained in:
Yichen Jiang
2026-08-07 19:39:45 +08:00
105 changed files with 1744 additions and 264 deletions

View File

@@ -577,9 +577,20 @@ Source: [`packages/hooks/hooks-codex/src/index.ts:44`](../packages/hooks/hooks-c
Requires: `agents` · `directoryPicker` · `llm` · `sessions` · `subagents` · `sessionQuery` · `tools` · `userInteraction` · `workspace`
```ts config-catalog
/** Gateway plugin config: host-level agent routing and Workspace creation root. */
/**
* Gateway plugin config: host-level agent routing and Workspace creation root.
*
* `reasoningEffort` is deliberately absent, so the section carries one field
* the composition cannot. The seam resolves a section by MERGING the user
* layer over the composition entry per field, and an absent key cannot
* override a present one — so a composition-set effort would survive every
* later switch to a model that has none, and strand it for the next session
* to fail on. Effort is a per-model fact anyway: a deployment default belongs
* on the adapter profile (`llm-pi-ai`'s `reasoning`, `llm-deepseek`'s own),
* which resolves per model rather than per gateway.
*/
export interface Config {
/** Default provider route for created/resumed agents. */
/** Default provider route for created agents. */
provider: string
/** Default model id. */
model: string
@@ -588,7 +599,7 @@ export interface Config {
}
```
Source: [`packages/host/apiproxy/src/index.ts:33`](../packages/host/apiproxy/src/index.ts)
Source: [`packages/host/apiproxy/src/index.ts:67`](../packages/host/apiproxy/src/index.ts)
## `@deepseek-ai/dsh-host-directory-picker-browse`

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/core-data-structures/core.md
core.md: 52e77be89d939eefa2b42ef5586c5798e194a303
core.zh.md: 5f0134a4c8b3dead49830b41f62e8b7238327cfa
core.md: eb96988abe096455c4f24ac220a6da3f266e690d
core.zh.md: 7334b3d3a5bd088f5467a72d7357f87c4c745487

View File

@@ -313,6 +313,15 @@ interface LlmConfigurableProvider {
* object; empty when the whole section is the profile.
*/
settingsPath: readonly string[]
/**
* Whether the owning adapter knows this route only because configuration
* declared it — a gateway or self-hosted server it ships nothing about.
* Absent means the adapter draws no such distinction; false means it does
* and this route is one of its own. Only the adapter can answer: a stored
* profile is how a user-added route AND a corrected shipped one both look
* from outside.
*/
declared?: boolean
}
```

View File

@@ -319,6 +319,15 @@ interface LlmConfigurableProvider {
* object; empty when the whole section is the profile.
*/
settingsPath: readonly string[]
/**
* Whether the owning adapter knows this route only because configuration
* declared it — a gateway or self-hosted server it ships nothing about.
* Absent means the adapter draws no such distinction; false means it does
* and this route is one of its own. Only the adapter can answer: a stored
* profile is how a user-added route AND a corrected shipped one both look
* from outside.
*/
declared?: boolean
}
```

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/guide/providers.md
providers.md: 66b6cf25c61a252fbd10a85f8c79c246eeae8abe
providers.zh.md: a2c33c90be971e09ab29e2355ca6a7ae6f947c39
providers.md: 5234f5bb03755c11652eb23f3c5d677fa3cddb40
providers.zh.md: a54819cab8524a6007c335ad70cecd6516bba25b

View File

@@ -97,16 +97,18 @@ References resolve from `$DSH_HOME/.env` — what the Models page's key fields w
A configured route appears in the web model picker and can be switched at any time, which is how most people use it.
A new session's default model comes from the `api-gateway` entry (`@deepseek-ai/dsh-host-apiproxy`) and its `provider` and `model`, which ship as `deepseek-official` and `deepseek-v4-flash`. To change that default, override the entry in `$DSH_HOME/config.yaml`:
Switching there also sets the default: the model you pick becomes the one the next new session starts on, recorded in `settings.yaml` under `api-gateway`. There is no separate gesture.
```yaml
- id: api-gateway
config:
provider: acme-gateway
model: acme-large
api-gateway:
provider: acme-gateway
model: acme-large
reasoningEffort: high # optional
```
A patch replaces that entry's whole `config`, so write out every key it needs to keep. A composition you assemble yourself — headless, for instance — sets `agent-loop`'s `agents` instead.
A session that has already run a turn is never retargeted by it — that session derives its route from its own log, so changing the default only reaches sessions that have not started. The shipped fallback under this section is the `api-gateway` composition entry (`deepseek-official` / `deepseek-v4-flash`), which a self-assembled `cordis.yml` may override; a composition you assemble yourself — headless, for instance — sets `agent-loop`'s `agents` instead.
If the provider a saved default names is later removed, the composer says **Select model** and refuses input until you pick one, rather than sending to a route nothing serves.
## Troubleshooting

View File

@@ -2,7 +2,7 @@
[English](providers.md) | 中文
Harness 出厂带 DeepSeek同时挂着一个通用的多提供方适配器,用来接入 Anthropic、OpenAI 这类内置目录里的提供方,或任何 OpenAI 兼容的网关与自建服务。你有两个入口Web 界面的**模型**页,以及 `$DSH_HOME/settings.yaml`。两者写的是同一份文档,改完下一次请求即生效,不用重启。
Harness 出厂带 DeepSeek同时预装了一个通用的多提供方适配器,用来接入 Anthropic、OpenAI 这类内置目录里的提供方,或任何 OpenAI 兼容的网关与自建服务。你有两个入口Web 界面的**模型**页,以及 `$DSH_HOME/settings.yaml`。两者写的是同一份文档,改完下一次请求即生效,不用重启。
## 提供方从哪里来
@@ -97,16 +97,18 @@ settings 段落**逐个提供方**地盖在 `cordis.yml` 的同名配置之上
配好的路由会出现在 Web 的模型选择器里,随时可切,这也是最常用的方式。
新会话的默认模型来自 `api-gateway` 那条(`@deepseek-ai/dsh-host-apiproxy`)的 `provider``model`,出厂值是 `deepseek-official``deepseek-v4-flash`。要改默认值,就在 `$DSH_HOME/config.yaml` 里覆盖该条:
在那里切换同时也就选定了默认值:你选的模型会成为下一个新会话的起点,记录在 `settings.yaml``api-gateway` 段里。没有另一个单独的手势。
```yaml
- id: api-gateway
config:
provider: acme-gateway
model: acme-large
api-gateway:
provider: acme-gateway
model: acme-large
reasoningEffort: high # optional
```
补丁会整体替换该条的 `config`,所以要把这条需要保留的键一并写出。自行组装的 `cordis.yml`(例如 headless改的则是 `agent-loop``agents`
已经跑过一轮的会话不会被它重定向——那个会话从自己的日志推导路由,因此改默认值只影响还没开始的会话。这个段落之下的出厂兜底是 `api-gateway` 组合条目(`deepseek-official` / `deepseek-v4-flash`自行组装的 `cordis.yml` 可以覆盖它;自行组装的组合(例如 headless改的则是 `agent-loop``agents`
如果某个已存默认值指向的提供方后来被删掉了,输入框会显示**选择模型**并拒绝输入,而不是把消息发给一个没人服务的路由。
## 排错