dsh-aperture 0.2.0 → 0.3.0
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.en.md +93 -120
- package/README.md +83 -121
- package/client/aperture.js +1175 -1131
- package/cordis.patch.yml +33 -44
- package/icon.svg +125 -0
- package/lib/aperture.d.ts +6 -8
- package/lib/aperture.js +6 -8
- package/lib/catalog.d.ts +0 -2
- package/lib/catalog.js +0 -4
- package/lib/config.d.ts +106 -89
- package/lib/config.js +79 -37
- package/lib/index.d.ts +28 -31
- package/lib/index.js +46 -52
- package/lib/metadata/extract.d.ts +7 -13
- package/lib/metadata/extract.js +7 -25
- package/lib/metadata/modelsdev.d.ts +9 -11
- package/lib/metadata/modelsdev.js +21 -23
- package/lib/metadata/utils.d.ts +0 -2
- package/lib/metadata/utils.js +0 -14
- package/lib/panel.d.ts +29 -56
- package/lib/panel.js +83 -91
- package/lib/profile.d.ts +5 -13
- package/lib/profile.js +25 -28
- package/lib/registry.d.ts +10 -15
- package/lib/registry.js +23 -21
- package/lib/remote.d.ts +14 -29
- package/lib/remote.js +13 -37
- package/lib/report.d.ts +24 -19
- package/lib/report.js +21 -29
- package/lib/runtime.d.ts +18 -12
- package/lib/runtime.js +40 -32
- package/lib/sync.d.ts +12 -25
- package/lib/sync.js +41 -55
- package/lib/types.d.ts +3 -5
- package/lib/types.js +3 -3
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +24 -16
- package/lib/namespaces.d.ts +0 -12
- package/lib/namespaces.js +0 -12
package/README.en.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# dsh-aperture
|
|
2
2
|
|
|
3
|
-
Discover the models an [Aperture](https://tailscale.com/kb/1542/aperture) gateway serves, and publish them to DeepSeek Harness as `llm-pi-ai` provider routes — so they simply appear in the model selector.
|
|
4
|
-
|
|
5
|
-
Once installed, one Aperture address is all you configure.
|
|
3
|
+
Discover the models an [Aperture](https://tailscale.com/kb/1542/aperture) gateway serves, and publish them to DeepSeek Harness as `llm-pi-ai` provider routes — so they simply appear in the model selector. Once installed, one Aperture address is all you configure.
|
|
6
4
|
|
|
7
5
|
## Install
|
|
8
6
|
|
|
@@ -16,9 +14,7 @@ From [npm](https://www.npmjs.com/package/dsh-aperture) (recommended):
|
|
|
16
14
|
npx @deepseek-ai/dsh plugin --profile web add dsh-aperture
|
|
17
15
|
```
|
|
18
16
|
|
|
19
|
-
The published artifact ships a compiled `lib/`, so no build script has to be authorized.
|
|
20
|
-
|
|
21
|
-
To pin a commit, or to follow unreleased changes, install from git:
|
|
17
|
+
The published artifact ships a compiled `lib/`, so no build script has to be authorized. To pin a commit, or to follow unreleased changes, install from git:
|
|
22
18
|
|
|
23
19
|
```sh
|
|
24
20
|
npx @deepseek-ai/dsh plugin --profile web add github:he0119/dsh-aperture#<sha>
|
|
@@ -45,14 +41,13 @@ npx @deepseek-ai/dsh plugin --profile web add /path/to/dsh-aperture
|
|
|
45
41
|
### 2. Point it at your instance
|
|
46
42
|
|
|
47
43
|
```yaml
|
|
48
|
-
# ~/.dsh/
|
|
49
|
-
aperture
|
|
50
|
-
|
|
44
|
+
# ~/.dsh/profiles/web/cordis.patch.yml
|
|
45
|
+
- id: aperture
|
|
46
|
+
config:
|
|
47
|
+
baseUrl: https://ai.example.ts.net
|
|
51
48
|
```
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
After a restart you can also set it in the GUI: the **Aperture** tab under **Settings → Plugins** (alongside "Plugin configuration"). Its "实例地址" field edits the same `aperture.baseUrl`.
|
|
50
|
+
This layer (the profile patch document, i.e. the user layer) is this plugin's settings namespace, `aperture`. Patch layers **replace the whole row** rather than deep-merging — this row's `config` supersedes the `cordis.patch.yml` this package ships (the composition layer) outright, and since the composition row only declares the row and writes no `config`, what you write is all there is; every key's default lives in the schema, so keys you leave out fall back to the defaults. You can also fill it in from the GUI: on the **Plugins** page open this package, and the first field of its configuration page ("Instance address") writes the same `aperture.baseUrl`; saving lands in the same file.
|
|
56
51
|
|
|
57
52
|
### 3. Restart DSH
|
|
58
53
|
|
|
@@ -64,99 +59,78 @@ npx @deepseek-ai/dsh --profile web --dump-config # should show a "# == dsh-ape
|
|
|
64
59
|
|
|
65
60
|
### 4. Confirm
|
|
66
61
|
|
|
67
|
-
The models appear in the selector under the route `Aperture`.
|
|
62
|
+
The models appear in the selector under the route `Aperture`. This package's configuration page at **Plugins → dsh-aperture** is that page — the instance address and sync toggle on top, one row per discovered model below.
|
|
68
63
|
|
|
69
64
|
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
128,000 context window · text · no reasoning
|
|
92
|
-
Unserved: no endpoint this plugin can publish
|
|
93
|
-
4 models
|
|
94
|
-
gemini-2.5-flash-lite [▸ Edit]
|
|
95
|
-
Advertised endpoints: /v1beta/models/gemini-2.5-flash-lite:generateContent
|
|
65
|
+
Instance address Overridden Reset to default
|
|
66
|
+
[https://ai.example.ts.net ]
|
|
67
|
+
Where Aperture listens; leave it empty to go dormant and stop discovering models.
|
|
68
|
+
|
|
69
|
+
Sync automatically Overridden Reset to default ●━
|
|
70
|
+
After each discovery round, write the models into dsh's llm-pi-ai routes. [Save]
|
|
71
|
+
|
|
72
|
+
Saved: rediscovered and published.
|
|
73
|
+
|
|
74
|
+
Models 18 ⟳ Refresh now
|
|
75
|
+
One model per row; expand a row to edit its overrides, and Save writes only that row. The order comes from discovery, with anything no route can serve last.
|
|
76
|
+
|
|
77
|
+
● deepseek-v4-flash
|
|
78
|
+
route aperture · protocol openai-completions · context 1,048,576 · output 384,000 · modalities text+image · reasoning on · 1 overridden
|
|
79
|
+
● gemini-2.5-flash
|
|
80
|
+
route aperture · protocol openai-completions · context 128,000 · modalities text · reasoning off
|
|
81
|
+
● qwen3-vl-32b unserved
|
|
82
|
+
context 262,144 · modalities text+image · reasoning on
|
|
83
|
+
|
|
84
|
+
(expand a row and you get that row's override editor: name and protocol in one group, capacity in another,
|
|
85
|
+
modalities beside reasoning, and Save / Clear overrides / Cancel underneath)
|
|
96
86
|
```
|
|
97
87
|
|
|
98
|
-
|
|
88
|
+
**The instance address and the sync toggle** are two fields of one official settings form: where a field says "Overridden", a "Reset to default" right beside it drops that key from your settings file (the same two words in the same position as the official plugin-config page), and Save writes only the fields you actually changed. The per-model override editor is covered under [Usage](#usage). Headings and spacing separate the groups, while a model row is a card (a hairline outline with a large radius, coloured only with theme tokens this page really defines), and the only thing you can expand is a model row.
|
|
99
89
|
|
|
100
|
-
(
|
|
90
|
+
(English labels are shown above; the page itself is bilingual.)
|
|
101
91
|
|
|
102
92
|
## Usage
|
|
103
93
|
|
|
104
|
-
The interface is
|
|
94
|
+
The interface is at **Plugins → dsh-aperture**: open this plugin in the plugin list; the configuration page hangs off the package, so there is no separate Configure button. The page header's name, icon and description come from the package's `locale/*.json` and `package.json`'s `icon`; the page itself is drawn by the Plugins page. The address, the toggle and the per-model parameters stay drafts until you press Save; models are **one row at a time**, and collapsing a row does not throw its draft away — the "unsaved edits" tag stays visible.
|
|
105
95
|
|
|
106
96
|
| Where | Effect |
|
|
107
97
|
| --- | --- |
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
| Tab · 撤掉已发布的路由 | withdraw this plugin's two routes from the `llm-pi-ai` section |
|
|
114
|
-
| Tab · 模型与路由 | which route every model belongs to, and the values in effect |
|
|
115
|
-
| Tab · 编辑 | expands one model's parameters: display name, catalog alias, capacities, modalities, reasoning, protocol, each source next to the field it describes |
|
|
116
|
-
| Tab · 保存 / 取消 | write that row only, or throw that row's edits away |
|
|
117
|
-
| Tab · 撤销覆盖 | clear only the fields the report says really were overridden, falling back to discovery and the catalog right away |
|
|
98
|
+
| Configuration page · Instance address | edits `baseUrl` (written through the settings seam; when it says "Overridden", the "Reset to default" beside it falls back to the default) |
|
|
99
|
+
| Configuration page · Sync toggle | edits `sync`: off discovers without writing `llm-pi-ai`, and that round withdraws whatever this plugin had published (only the two keys it owns; every other provider in the section is left alone); carries the same "Overridden / Reset to default" pair |
|
|
100
|
+
| Configuration page · Save | below the form: writes the address and toggle drafts into the settings document; it is revision-fenced, so a form that has drifted from the settings document is refused rather than overwriting someone else's edit; it returns only once that round of re-discovery has landed, so the interface shows the new configuration right away |
|
|
101
|
+
| Configuration page · Models | one row per model, one card per row: a state dot at its head (green: this round wrote it into the routes; grey: this round synced but did not write it; amber: no route can serve it — hovering it, or a screen reader, hears exactly that), then the name with its "unserved / N overridden / unsaved edits" tags on the first line and labelled facts (route, protocol, capacities, modalities, reasoning, alias) on the second, with long names ellipsised and facts wrapping; expanded, it is that row's override editor — display name, alias and protocol as one group of text fields, context window and max output as the "capacity" group, and two modality checkboxes beside a three-way reasoning switch (follow discovery / on / off); a field keeps only one line naming where its value comes from ("Source: Aperture"), while how-to copy ("Leave it empty to use the discovered name") lives behind the "i" next to the label and only takes up room once opened; the "Refresh now" action at its top right discovers and republishes immediately, and the list and every row's status follow that round |
|
|
102
|
+
| Configuration page · Save / Clear overrides / Cancel | write that row only, clear only the fields the backend report says really were overridden, or drop that row's draft; Save likewise waits for a round of re-discovery, so what you see afterwards is the new value |
|
|
118
103
|
|
|
119
|
-
In-place edits are configuration: capacities and modalities land on the matching `aperture.models` entry, the catalog alias lands on `aperture.modelAliases[id]`, and writes merge per field — a field the interface never mentions (say `reasoningEfforts`) survives untouched, while an emptied field drops that override and falls back to discovery and the catalog. The protocol field is the only way out for an unserved model: filling it in publishes a model that only answers on its native endpoint under the matching route.
|
|
120
|
-
|
|
121
|
-
> "撤掉已发布的路由" withdraws once: the next refresh republishes according to the current configuration. To make it stick, turn the sync toggle off first (equivalent to `sync: false`).
|
|
104
|
+
In-place edits are configuration: capacities and modalities land on the matching `aperture.models` entry, the catalog alias lands on `aperture.modelAliases[id]`, and writes merge per field — a field the interface never mentions (say `reasoningEfforts`) survives untouched, while an emptied field drops that override and falls back to discovery and the catalog. Capacities accept the `1M` / `100K` spelling (decimal suffixes, the same vocabulary as the official Models page: `1M` is 1000000, not 1048576); what gets stored is still a plain token count, and the field spells it back in the shortest form that survives a round trip (`384000` → `384K`, while `1048576` is not a whole thousand and stays written out). The protocol field is the only way out for an unserved model: filling it in publishes a model that only answers on its native endpoint under the matching route.
|
|
122
105
|
|
|
123
106
|
## Configuration
|
|
124
107
|
|
|
125
|
-
Every key
|
|
108
|
+
Every key lives under that row's `config:` in the profile patch document (user layer); anything you leave out falls back to the defaults below. `baseUrl`, `sync` and the per-model parameters inside `models` and `modelAliases` can also be edited in place on the configuration page; every other key needs the file.
|
|
126
109
|
|
|
127
110
|
| Key | Default | Meaning |
|
|
128
111
|
| --- | --- | --- |
|
|
129
112
|
| `baseUrl` | `''` | Aperture instance root. A trailing `/v1` is tolerated and stripped; empty leaves the plugin dormant |
|
|
130
|
-
| `route` | `aperture` | Route key owning OpenAI-compatible models |
|
|
131
|
-
| `anthropicRoute` | `aperture-anthropic` | Route key owning Anthropic Messages models |
|
|
132
|
-
| `displayName` | `Aperture` | Selector label |
|
|
133
|
-
| `anthropicDisplayName` | `Aperture (Anthropic)` | Selector label for the Anthropic route |
|
|
113
|
+
| `route` | `aperture` | Route key owning OpenAI-compatible models; the Anthropic route is this key plus `-anthropic`, and both selector labels derive from it (`aperture` → `Aperture` / `Aperture (Anthropic)`) |
|
|
134
114
|
| `apiKeyEnv` | `''` | Credential-seam reference; non-empty suppresses the placeholder header |
|
|
135
|
-
| `placeholderCredential` | `dsh-aperture` | Placeholder value; `''` writes no placeholder header at all |
|
|
136
115
|
| `headers` | `{}` | Extra request headers; they **win over** the placeholder |
|
|
137
116
|
| `enabledModelIds` | `[]` | Non-empty restricts discovery to these ids (explicit `models` entries are exempt) |
|
|
138
117
|
| `modelAliases` | `{}` | Gateway id → models.dev id |
|
|
139
118
|
| `models` | `[]` | Per-model overrides and extras: `id`, `name`, `api`, `contextWindow`, `maxTokens`, `input`, `thinking`, `reasoningEfforts` |
|
|
140
119
|
| `modelMetadataUrl` | `https://models.dev/models.json` | Catalog URL; `''` disables enrichment |
|
|
141
|
-
| `defaultContextWindow` | `128000` | Context capacity when nothing sizes a model |
|
|
142
120
|
| `images` | `ignore` | `metadata` adopts models.dev input modalities (images) |
|
|
143
121
|
| `reasoning` | `auto` | `off` declares every model non-reasoning |
|
|
144
|
-
| `sync` | `true` | `false` discovers without writing (the
|
|
122
|
+
| `sync` | `true` | `false` discovers without writing (the configuration page still reports) |
|
|
145
123
|
| `refreshIntervalMinutes` | `0` | Periodic refresh; `0` refreshes only at load and on change |
|
|
146
|
-
| `timeoutMs` | `20000` | Per-request timeout for the gateway and the catalog |
|
|
147
124
|
|
|
148
|
-
Missing capacity and reasoning levels are filled in from Aperture's own fields → [models.dev](https://models.dev) → a conservative default. An unstated `maxTokens` is deliberately **omitted**: in `llm-pi-ai` it is also the per-request `max_tokens` cap, so inventing a value would truncate every request.
|
|
125
|
+
Missing capacity and reasoning levels are filled in from Aperture's own fields → [models.dev](https://models.dev) → a conservative default (the fallback capacity, 128000, and the 20s per-request timeout are constants in the code, not configuration). An unstated `maxTokens` is deliberately **omitted**: in `llm-pi-ai` it is also the per-request `max_tokens` cap, so inventing a value would truncate every request.
|
|
149
126
|
|
|
150
127
|
## Troubleshooting
|
|
151
128
|
|
|
152
|
-
**The first `add` from git fails, saying build scripts were ignored?**
|
|
153
|
-
Add the `allowBuilds` line from the git part of step 1, then re-run — or install from npm, which needs no authorization at all.
|
|
129
|
+
**The first `add` from git fails, saying build scripts were ignored?** Add the `allowBuilds` line from the git part of step 1, then re-run — or install from npm, which needs no authorization at all.
|
|
154
130
|
|
|
155
|
-
**`Issues with peer dependencies found` during install?**
|
|
156
|
-
Expected. The `@deepseek-ai/cordis`, `@deepseek-ai/schemastery` and `@deepseek-ai/dsh-settings` packages this plugin peers on ship with DSH and are resolved by DSH itself (they never enter the profile's `node_modules`), so pnpm not seeing them does not affect running the plugin.
|
|
131
|
+
**`Issues with peer dependencies found` during install?** Expected: the `@deepseek-ai/cordis`, `@deepseek-ai/schemastery` and `@deepseek-ai/dsh-settings` packages this plugin peers on ship with DSH and are resolved by DSH itself (they never enter the profile's `node_modules`), so pnpm not seeing them does not affect running the plugin.
|
|
157
132
|
|
|
158
|
-
**`Failed to resolve dependency: The filename, directory name, or volume label syntax is incorrect. (os error 123)`?**
|
|
159
|
-
The git spec is scp-style (`git@github.com:he0119/dsh-aperture.git`) — on Windows the colon reads as a drive letter, so it is parsed as a **local path**. Use a spec pnpm recognises: `github:he0119/dsh-aperture`, `git+https://…` or `git+ssh://…`.
|
|
133
|
+
**`Failed to resolve dependency: The filename, directory name, or volume label syntax is incorrect. (os error 123)`?** The git spec is scp-style (`git@github.com:he0119/dsh-aperture.git`) — on Windows the colon reads as a drive letter, so it is parsed as a **local path**. Use a spec pnpm recognises: `github:he0119/dsh-aperture`, `git+https://…` or `git+ssh://…`.
|
|
160
134
|
|
|
161
135
|
**git over HTTPS is unusable on this machine (schannel / `SEC_E_NO_CREDENTIALS`)?**
|
|
162
136
|
|
|
@@ -164,58 +138,63 @@ The git spec is scp-style (`git@github.com:he0119/dsh-aperture.git`) — on Wind
|
|
|
164
138
|
git config --global url."git@github.com:".insteadOf "https://github.com/"
|
|
165
139
|
```
|
|
166
140
|
|
|
167
|
-
**Some models never show up in the selector?**
|
|
168
|
-
Look at 模型与路由 on the tab (the `未服务` line). Models that only offer Gemini's native `generateContent` endpoint cannot be attached — `llm-pi-ai` speaks OpenAI-compatible and Anthropic Messages only. Using the wrong endpoint fails loudly, and Aperture names the right one:
|
|
141
|
+
**Some models never show up in the selector?** Look at the rows tagged `未服务` (unserved) in the Models section of the configuration page. Models that only offer Gemini's native `generateContent` endpoint cannot be attached — `llm-pi-ai` speaks OpenAI-compatible and Anthropic Messages only. Using the wrong endpoint fails loudly, and Aperture names the right one:
|
|
169
142
|
|
|
170
143
|
```
|
|
171
144
|
404 model "gemini-2.5-flash" is available via gemini_generate_content, not openai_chat
|
|
172
145
|
404 model "MiniMax-M3" is available via anthropic_messages, not openai_chat
|
|
173
146
|
```
|
|
174
147
|
|
|
175
|
-
**Want more reasoning levels for a model?**
|
|
176
|
-
Only two conservative levels are offered by default (DeepSeek family `off/high/max`, every other reasoning model `off/high`). Add your own:
|
|
148
|
+
**Want more reasoning levels for a model?** Only two conservative levels are offered by default (DeepSeek family `off/high/max`, every other reasoning model `off/high`). Add your own:
|
|
177
149
|
|
|
178
150
|
```yaml
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
151
|
+
# ~/.dsh/profiles/web/cordis.patch.yml
|
|
152
|
+
- id: aperture
|
|
153
|
+
config:
|
|
154
|
+
models:
|
|
155
|
+
- id: deepseek-v4-pro
|
|
156
|
+
reasoningEfforts:
|
|
157
|
+
off: disabled
|
|
158
|
+
minimal: minimal
|
|
159
|
+
low: low
|
|
160
|
+
medium: medium
|
|
161
|
+
high: high
|
|
162
|
+
max: max
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Want a model the gateway did not list?** Add it explicitly with `models` — for instance those four Gemini models, if you know they work on an OpenAI-compatible endpoint after all:
|
|
193
166
|
|
|
194
167
|
```yaml
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
168
|
+
# ~/.dsh/profiles/web/cordis.patch.yml
|
|
169
|
+
- id: aperture
|
|
170
|
+
config:
|
|
171
|
+
models:
|
|
172
|
+
- id: gemini-2.5-pro
|
|
173
|
+
api: openai-completions
|
|
199
174
|
```
|
|
200
175
|
|
|
201
|
-
**Capacity or reasoning flags were not filled in?**
|
|
202
|
-
Gateways rename things, and models.dev may not match (in practice `deepseek-flash` and `k3` are `deepseek/deepseek-v4-flash` and `moonshotai/kimi-k3` there). Bridge it explicitly:
|
|
176
|
+
**Capacity or reasoning flags were not filled in?** Gateways rename things, and models.dev may not match (in practice `deepseek-flash` and `k3` are `deepseek/deepseek-v4-flash` and `moonshotai/kimi-k3` there). Bridge it explicitly:
|
|
203
177
|
|
|
204
178
|
```yaml
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
179
|
+
# ~/.dsh/profiles/web/cordis.patch.yml
|
|
180
|
+
- id: aperture
|
|
181
|
+
config:
|
|
182
|
+
modelAliases:
|
|
183
|
+
deepseek-flash: deepseek/deepseek-v4-flash
|
|
184
|
+
k3: moonshotai/kimi-k3
|
|
209
185
|
```
|
|
210
186
|
|
|
211
|
-
**The
|
|
212
|
-
|
|
187
|
+
**The configuration page says `设置:未写入(已处于同步状态)`?** That is the normal steady state: the settings already hold the current catalog.
|
|
188
|
+
|
|
189
|
+
**Saved but not in effect?** DSH's patch layers stack: above the profile patch document sit higher-priority layers such as `$DSH_HOME/cordis.patch.yml`. If the `aperture` row is written there too, a save from the configuration page lands in the profile patch document but is shadowed by that layer (the settings service may also refuse the write outright, in which case the page says so). Delete the row from the higher-priority layer, or edit it there instead.
|
|
213
190
|
|
|
214
|
-
**
|
|
215
|
-
Aperture authenticates by network identity (Tailscale) and needs none; the plugin writes `authorization: Bearer dsh-aperture` / `x-api-key: dsh-aperture` only to make the adapter willing to send the request. It is **not a key**. When a real credential is needed, point `apiKeyEnv` at a credential-seam record and no placeholder is written.
|
|
191
|
+
**Upgrading from 0.2 — where did my `settings.yaml` go?** As of 0.1.7 settings no longer live in a file of their own; they live in the profile patch document. On the first start `$DSH_HOME/settings.yaml` is renamed to `settings.yaml.imported` and each section is moved into the patch document under its settings namespace — the `aperture:` section moves as-is, and every key and value that still passes the schema is unchanged, so the address and the per-model overrides are all still there. From then on only the patch document is read, and `settings.yaml.imported` is just an archive; editing it does nothing. A section whose values no longer validate stays in that archive too, with a line in the log saying so.
|
|
216
192
|
|
|
217
|
-
**The
|
|
218
|
-
|
|
193
|
+
**No Plugins page / no GUI in this deployment?** The configuration page only exists in the Web GUI (it works over Typert Remote endpoints). A headless profile still discovers and still writes, it just has no clickable page. If the deployment has no manageable profile at all, the `settings` service does not exist and the plugin stays `PENDING` on its hard dependency — its only job is writing settings, so with nowhere to write it deliberately does nothing.
|
|
194
|
+
|
|
195
|
+
**Need a real key instead of the placeholder header?** Aperture authenticates by network identity (Tailscale) and needs none; the plugin writes `authorization: Bearer dsh-aperture` / `x-api-key: dsh-aperture` only to make the adapter willing to send the request. It is **not a key**. When a real credential is needed, point `apiKeyEnv` at a credential-seam record and no placeholder is written.
|
|
196
|
+
|
|
197
|
+
**The old route is still there after changing `route`?** The plugin only knows the two keys it currently owns (`route` and `route` + `-anthropic`), not the names it used before, so the old key stays in `llm-pi-ai.providers`. It does no harm and simply stops refreshing; delete the entry by hand to clean it up.
|
|
219
198
|
|
|
220
199
|
## What it does
|
|
221
200
|
|
|
@@ -223,38 +202,32 @@ The plugin only knows the two keys it currently owns, not the names it used befo
|
|
|
223
202
|
GET {baseUrl}/v1/models
|
|
224
203
|
│
|
|
225
204
|
├─ per model: supported_endpoints ──► routing
|
|
226
|
-
│ /v1/chat/completions ──► route
|
|
227
|
-
│ /v1/messages ──►
|
|
205
|
+
│ /v1/chat/completions ──► route (openai-completions)
|
|
206
|
+
│ /v1/messages ──► route + -anthropic (anthropic-messages)
|
|
228
207
|
│ native generateContent only ──► not published (reported under 未服务)
|
|
229
208
|
│
|
|
230
209
|
├─ capacity: Aperture fields ─► models.dev ─► default
|
|
231
210
|
├─ reasoning: Aperture fields ─► models.dev ─► off
|
|
232
211
|
│
|
|
233
|
-
└─ llm-pi-ai providers.<route>, written
|
|
212
|
+
└─ llm-pi-ai providers.<route>, written into the profile patch document by revision
|
|
234
213
|
```
|
|
235
214
|
|
|
236
|
-
Writes touch only the two keys under `llm-pi-ai.providers` that this plugin owns: an unchanged section is not rewritten; writes are path-addressed so your hand-written providers survive untouched; a failed discovery never wipes the published catalog; a route that lost its models is removed.
|
|
237
|
-
|
|
238
|
-
Design notes — why two routes, where each fact comes from, lifecycle and dependencies, write behaviour — are in [docs/internals.md](https://github.com/he0119/dsh-aperture/blob/main/docs/internals.md) (Chinese).
|
|
215
|
+
Writes touch only the two keys under `llm-pi-ai.providers` that this plugin owns: an unchanged section is not rewritten; writes are path-addressed so your hand-written providers survive untouched; a failed discovery never wipes the published catalog; a route that lost its models is removed. Design notes — why two routes, where each fact comes from, lifecycle and dependencies, write behaviour — are in [docs/internals.md](https://github.com/he0119/dsh-aperture/blob/main/docs/internals.md) (Chinese).
|
|
239
216
|
|
|
240
217
|
## Development
|
|
241
218
|
|
|
242
219
|
```sh
|
|
243
|
-
npm install
|
|
244
|
-
npm run build
|
|
245
|
-
npm
|
|
246
|
-
npm test # offline unit tests (119; devDependencies must be installed)
|
|
247
|
-
npm run inspect # print the generated settings.yaml and its resolutions
|
|
248
|
-
|
|
249
|
-
DSH_APERTURE_LIVE_URL=https://ai.example.ts.net npm run test:live # end-to-end: real harness stack + real gateway
|
|
220
|
+
npm install
|
|
221
|
+
npm run build # tsc -> lib/
|
|
222
|
+
npm test # unit tests + end-to-end (offline; devDependencies must be installed)
|
|
250
223
|
```
|
|
251
224
|
|
|
252
|
-
|
|
225
|
+
Working on the plugin — build, tests, and a dedicated development instance — is in [docs/development.md](https://github.com/he0119/dsh-aperture/blob/main/docs/development.md) (Chinese); the release process and what the published package contains are in [docs/releasing.md](https://github.com/he0119/dsh-aperture/blob/main/docs/releasing.md) (Chinese).
|
|
253
226
|
|
|
254
227
|
## Acknowledgements
|
|
255
228
|
|
|
256
229
|
- [he0119/vscode-aperture-for-copilot](https://github.com/he0119/vscode-aperture-for-copilot): the reference implementation this plugin follows for Aperture model discovery.
|
|
257
|
-
- [xiaoyuyu6420/dsh-backup](https://github.com/xiaoyuyu6420/dsh-backup): the reference implementation this plugin follows for the interface wiring — the
|
|
230
|
+
- [xiaoyuyu6420/dsh-backup](https://github.com/xiaoyuyu6420/dsh-backup): the reference implementation this plugin follows for the interface wiring — the Remote endpoint shape comes from it, while the way the configuration page is mounted now comes from the Plugins page's slot contract as of 0.1.7.
|
|
258
231
|
- [Aperture](https://tailscale.com/kb/1542/aperture) (Tailscale): the gateway being discovered.
|
|
259
232
|
- [models.dev](https://models.dev): enriches capacity and capabilities Aperture does not declare.
|
|
260
233
|
- `@deepseek-ai/dsh-llm-pi-ai`: this plugin only discovers; the adapter does the protocol work.
|