dsh-opencode-go 0.1.21 → 0.1.23
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/LICENSE +1 -0
- package/README.en.md +74 -194
- package/README.md +73 -184
- package/THIRD_PARTY_NOTICES.md +7 -1
- package/docs/advanced.en.md +137 -0
- package/docs/advanced.md +135 -0
- package/docs/assets/accounts.png +0 -0
- package/docs/assets/advanced-settings.png +0 -0
- package/docs/assets/model-settings.png +0 -0
- package/docs/assets/usage-panel.png +0 -0
- package/docs/development.md +65 -7
- package/docs/fork-review-2026-09-25.md +191 -0
- package/docs/independent-package.md +2 -2
- package/docs/verification.md +283 -0
- package/lib/build-info.json +8 -1
- package/lib/client.js +830 -635
- package/lib/index.js +52687 -856
- package/lib/types/account-manager.d.ts +25 -0
- package/lib/types/account-operations.d.ts +31 -0
- package/lib/types/account-policy.d.ts +16 -0
- package/lib/types/account-recovery.d.ts +2 -0
- package/lib/types/account-selection.d.ts +30 -0
- package/lib/types/account-service.d.ts +12 -0
- package/lib/types/accounts-contract.d.ts +38 -0
- package/lib/types/accounts.d.ts +8 -1
- package/lib/types/adapter.d.ts +33 -11
- package/lib/types/call-trace.d.ts +54 -0
- package/lib/types/catalog-manager.d.ts +20 -0
- package/lib/types/catalog.d.ts +6 -4
- package/lib/types/client/accounts-controller.d.ts +8 -17
- package/lib/types/client/hint-mark.d.ts +17 -0
- package/lib/types/client/host-compat.d.ts +7 -0
- package/lib/types/client/host-primitives.d.ts +11 -0
- package/lib/types/client/locales.d.ts +14 -3
- package/lib/types/client/section-controller.d.ts +11 -48
- package/lib/types/client/staged-form.d.ts +1 -3
- package/lib/types/client/usage.d.ts +1 -1
- package/lib/types/config-contract.d.ts +70 -0
- package/lib/types/config.d.ts +13 -54
- package/lib/types/conversion/context.d.ts +5 -1
- package/lib/types/conversion/image-pool.d.ts +24 -0
- package/lib/types/conversion/replay.d.ts +1 -1
- package/lib/types/conversion/stream.d.ts +1 -1
- package/lib/types/gateway-diagnostics.d.ts +22 -0
- package/lib/types/gateway-error.d.ts +2 -0
- package/lib/types/gateway-url.d.ts +7 -0
- package/lib/types/google-fetch.d.ts +6 -0
- package/lib/types/google-generative-ai.d.ts +3 -0
- package/lib/types/host-settings.d.ts +11 -0
- package/lib/types/index.d.ts +2 -2
- package/lib/types/model-metadata.d.ts +5 -3
- package/lib/types/models-contract.d.ts +7 -0
- package/lib/types/protocol-contract.d.ts +5 -0
- package/lib/types/protocol-policy.d.ts +4 -0
- package/lib/types/reasoning.d.ts +36 -6
- package/lib/types/request-control.d.ts +2 -0
- package/lib/types/sdk-types.d.ts +3156 -0
- package/lib/types/settings-bridge.d.ts +22 -0
- package/lib/vendor-licenses.txt +1861 -0
- package/package.json +7 -2
package/LICENSE
CHANGED
package/README.en.md
CHANGED
|
@@ -1,256 +1,136 @@
|
|
|
1
1
|
# dsh-opencode-go
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
[简体中文](README.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**OpenCode Go subscription usage and multiple-account management** for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), with convenient access to quotas, reset times, and account switching.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
DSH already supports OpenCode Go natively. This plugin focuses on usage inside conversations, managing multiple accounts, and dedicated model and settings controls.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- **Usage at a glance**: see usage beside the conversation input, then open the panel for five-hour, weekly, and monthly percentages and reset times.
|
|
10
|
+
- **Accounts in one place**: inspect each account's quota and key status, drag to reorder, switch inside a conversation, or enable automatic fallback.
|
|
11
|
+
- **Clearer model and settings controls**: search and filter models, adjust visibility, limits, and thinking budgets; advanced settings are grouped by purpose, with hints and a reset action.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
- **Streaming and history**: Supports streaming output, tool calls, and history replay through pi-ai.
|
|
13
|
-
- **Image input**: Supports models that advertise image capability in the catalog.
|
|
14
|
-
- **Model capacity overrides**: Override the context window and maximum output per model, with blank values inheriting the online catalog.
|
|
15
|
-
- **Per-model switches**: Control which models appear in conversations, with changes applied immediately. Ordinary models default to on and deprecated models default to off; any model can be enabled individually.
|
|
16
|
-
- **Prompt and caching**: The plugin does not add hidden system prompts; the session ID is used for gateway routing.
|
|
13
|
+
Supports Chinese and English, following DSH's interface language. The screenshots below show the Chinese interface.
|
|
17
14
|
|
|
18
|
-
##
|
|
15
|
+
## View subscription usage
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
Click the usage pill beside the conversation input to open the current account's subscription usage. Bars show the **percentage used**, turn amber near the limit, and red when exhausted. Each quota window shows its reset time.
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+

|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
While visible, usage refreshes every minute. Periodic queries pause while the page is hidden and resume with a refresh when it becomes visible. Temporary failures show a warning; retained readings are marked as previous data. Click **Retry now** after a failure, or **Refresh accounts** in the Settings account card.
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
2. Enter `dsh-opencode-go` and click **Install**.
|
|
28
|
-
3. If prompted after installation, click **Enable now**.
|
|
29
|
-
|
|
30
|
-

|
|
31
|
-
|
|
32
|
-
Then open **Settings → OpenCode Go**, enter and save your API key, and select an OpenCode Go model in a conversation.
|
|
33
|
-
|
|
34
|
-
The plugin can also be installed by entering this Git repository URL:
|
|
35
|
-
|
|
36
|
-
```text
|
|
37
|
-
https://github.com/Duskriver/dsh-opencode-go
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
The current default branch includes the compiled plugin. Installation needs neither a local build nor a plugin-specific `allowBuilds` entry. URLs pinned to older commits retain those commits' installation behavior; update them to the current branch.
|
|
23
|
+
Under **Settings → OpenCode Go → Advanced settings → Usage display**, choose:
|
|
41
24
|
|
|
42
|
-
|
|
25
|
+
| Mode | Behavior |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| Auto (default) | Show while a **DSH OpenCode Go** model is selected |
|
|
28
|
+
| Always | Also show configured OpenCode Go account usage while using other models |
|
|
29
|
+
| Off | Hide the conversation pill and stop its polling |
|
|
43
30
|
|
|
44
|
-
|
|
31
|
+
## Manage multiple accounts
|
|
45
32
|
|
|
46
|
-
|
|
47
|
-
dsh plugin --profile web add dsh-opencode-go
|
|
48
|
-
```
|
|
33
|
+
Open **Settings → OpenCode Go → Accounts** to manage accounts:
|
|
49
34
|
|
|
50
|
-
|
|
35
|
+

|
|
51
36
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
37
|
+
- Add, rename, replace keys, or remove accounts; up to 20 accounts are supported.
|
|
38
|
+
- See key status, five-hour usage, and a reset countdown in each row; expand it for full usage and account actions.
|
|
39
|
+
- Drag a row's handle to reorder accounts. The first row becomes current, and the order determines automatic fallback priority.
|
|
40
|
+
- Click **Switch** in the conversation usage panel to move the selected account first for subsequent requests in this profile. The other accounts keep their relative order.
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
With **Automatic fallback** enabled, an exhausted quota or unusable key causes the plugin to try other accounts in order before output begins. A fallback account that starts producing output moves first and becomes current, and the usage panel shows a switch notice. Requests that have already produced output, recorded token usage, or been canceled are not automatically resent through another account.
|
|
57
43
|
|
|
58
|
-
|
|
44
|
+
Keys are saved through DSH's credential service. Settings never displays an already saved key.
|
|
59
45
|
|
|
60
|
-
|
|
61
|
-
dsh plugin --profile headless add dsh-opencode-go
|
|
62
|
-
```
|
|
46
|
+
## Install and get started
|
|
63
47
|
|
|
64
|
-
|
|
48
|
+
Requires DSH `0.1.5-rc.1` or later. See the [compatibility matrix](docs/development.md#installed-package-matrix) for verified host versions.
|
|
65
49
|
|
|
66
|
-
|
|
67
|
-
- id: agent-default-model
|
|
68
|
-
config:
|
|
69
|
-
provider: dsh-opencode-go
|
|
70
|
-
model: deepseek-v4.1-flash
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Read the API key in Bash or Zsh, then run a task:
|
|
50
|
+
### Install from DSH
|
|
74
51
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
dsh --profile headless --patch ./headless.patch.yml "Hello"
|
|
79
|
-
```
|
|
52
|
+
1. Open **Plugins → Add plugin**.
|
|
53
|
+
2. Enter `dsh-opencode-go` and click **Install**.
|
|
54
|
+
3. Click **Enable now** after installation.
|
|
80
55
|
|
|
81
|
-
|
|
56
|
+

|
|
82
57
|
|
|
83
|
-
|
|
58
|
+
You can also enter the repository URL:
|
|
84
59
|
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
npm run compile
|
|
88
|
-
npm pack
|
|
89
|
-
dsh plugin --profile web add ./dsh-opencode-go-0.1.21.tgz
|
|
60
|
+
```text
|
|
61
|
+
https://github.com/Duskriver/dsh-opencode-go
|
|
90
62
|
```
|
|
91
63
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
### Development and verification
|
|
64
|
+
Command-line installation:
|
|
95
65
|
|
|
96
66
|
```sh
|
|
97
|
-
|
|
98
|
-
npm test # Core tests, rebuilding the plugin first
|
|
99
|
-
npm run check:dist # Verify shipped artifacts match the source
|
|
100
|
-
npm run test:compat # One tarball tested in 9 independent DSH environments
|
|
101
|
-
npm run test:install # npm / pnpm Git installs without plugin build approval
|
|
102
|
-
npm run verify # All of the above
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Compatibility and installation checks download dependencies, use system temporary directories, and clean up afterward. To check one host, run `npm run test:compat -- v017-rc2`. See the [development guide](docs/development.md) for maintaining host versions.
|
|
106
|
-
|
|
107
|
-
## Updating the plugin
|
|
108
|
-
|
|
109
|
-
Update the plugin in the Web profile to the latest npm version:
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
dsh plugin --profile web update dsh-opencode-go --latest
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Restart `dsh web` and refresh the browser afterwards. For Headless, replace `web` with `headless`; if both profiles have the plugin installed, update each one separately.
|
|
116
|
-
|
|
117
|
-
After updating the desktop plugin, fully quit and reopen DeepSeek Harness to load the updated plugin code.
|
|
118
|
-
|
|
119
|
-
## Multiple accounts and switching
|
|
120
|
-
|
|
121
|
-
Open **Settings → OpenCode Go → Accounts** to add up to 20 named API keys. Adding, renaming, replacing a key, removing, and selecting a preferred account take effect immediately. Model capacities and advanced fields still use Save. Existing `apiKeyEnv` configuration appears as the default account without re-entering its key.
|
|
122
|
-
|
|
123
|
-
Each account shows its rolling, weekly, and monthly usage, reset times, and last successful update. Usage refreshes every minute while the settings page is visible. The conversation usage panel also lets you switch accounts; it immediately clears the old account's data and rejects late responses. Temporary failures retain data only for the same account and key.
|
|
124
|
-
|
|
125
|
-
The preferred account is shared by conversations in the current profile and affects subsequent new requests. Requests already generating retain their resolved key. Account metadata and preference survive restart. Web and Headless profiles keep their own configuration. Save or discard a key draft before changing accounts; if another surface switches accounts, the draft remains addressed to the original account.
|
|
126
|
-
|
|
127
|
-
Keys are stored through the host credential service and never returned to the page. Configuration contains account names, IDs, and credential references. Read-only environment keys can be selected but cannot be replaced in the UI. Removing accounts created here also removes their dedicated credential; existing external references are retained. Removing every account withdraws the provider until another account is added.
|
|
128
|
-
|
|
129
|
-
**Automatic fallback** is off by default. When enabled, missing/rejected keys or exhausted quota can trigger attempts with the other accounts in list order, before any content or tool call is emitted and only when no token usage was reported. Each account is tried at most once per request. The preferred account stays selected; a successful fallback is reported in the usage panel with its reason and time. Partial responses, permission errors, ordinary rate limits, network errors, and server errors stay with host recovery. Cancellation stops further attempts. Quotas remain controlled by the upstream subscriptions.
|
|
130
|
-
|
|
131
|
-
For Headless or manual configuration, put the following under the plugin's `config`:
|
|
132
|
-
|
|
133
|
-
```yaml
|
|
134
|
-
apiKeyEnv: OPENCODE_API_KEY
|
|
135
|
-
accounts:
|
|
136
|
-
- id: primary
|
|
137
|
-
name: Primary
|
|
138
|
-
apiKeyEnv: OPENCODE_API_KEY
|
|
139
|
-
- id: backup
|
|
140
|
-
name: Backup
|
|
141
|
-
apiKeyEnv: OPENCODE_GO_BACKUP_KEY
|
|
142
|
-
autoSwitch: false
|
|
67
|
+
dsh plugin --profile web add dsh-opencode-go
|
|
143
68
|
```
|
|
144
69
|
|
|
145
|
-
|
|
70
|
+
Start or restart `dsh web` after command-line installation. Web and Headless use separate profiles; install and update each individually.
|
|
146
71
|
|
|
147
|
-
|
|
72
|
+
### Get started
|
|
148
73
|
|
|
149
|
-
|
|
74
|
+
1. Open **Settings → OpenCode Go**, enter your OpenCode Go subscription API key and save, or add an account in **Accounts**.
|
|
75
|
+
2. Select a model under **DSH OpenCode Go** in the conversation model picker.
|
|
76
|
+
3. Start chatting and check usage beside the input. With multiple accounts, open the panel to switch.
|
|
150
77
|
|
|
151
|
-
|
|
78
|
+
The plugin registers its own **DSH OpenCode Go** model provider. Selecting a native DSH provider does not automatically use this plugin's account switching. **Always** mode can still show usage for accounts configured in this plugin.
|
|
152
79
|
|
|
153
|
-
|
|
154
|
-
http://127.0.0.1:7890
|
|
155
|
-
socks5://127.0.0.1:1080
|
|
156
|
-
```
|
|
80
|
+
## Models and settings
|
|
157
81
|
|
|
158
|
-
|
|
82
|
+
### Select models and adjust parameters
|
|
159
83
|
|
|
160
|
-
|
|
84
|
+
Search **Available models** by name or ID, or filter by **New in 7 days**, **Customized**, or **Deprecated**. Click **Refresh** to check the latest catalog.
|
|
161
85
|
|
|
162
|
-
|
|
86
|
+

|
|
163
87
|
|
|
164
|
-
|
|
88
|
+
- Each model's switch controls its visibility in the conversation picker and takes effect immediately.
|
|
89
|
+
- Select a model to inspect its catalog context window, maximum output, and input modalities. Save limit overrides to apply them; empty values use defaults.
|
|
90
|
+
- Reasoning models offer the applicable switch, effort, or token budget options. Budget-based models also accept custom budgets that become available after saving.
|
|
165
91
|
|
|
166
|
-
|
|
92
|
+
Streaming, reasoning, tool calls, and image input depend on model capabilities. Input modalities shown in Settings come from online model metadata; this plugin currently converts and forwards only image attachments.
|
|
167
93
|
|
|
168
|
-
|
|
94
|
+
### Grouped advanced settings
|
|
169
95
|
|
|
170
|
-
|
|
96
|
+
Advanced settings are grouped into **Usage and protocol**, **Connection**, **Cache and timeouts**, and **Image handling**. Hover over a question mark for help. **Reset all to defaults** clears the card's custom overrides; save to apply the reset. The current account selection is preserved.
|
|
171
97
|
|
|
172
|
-
|
|
98
|
+

|
|
173
99
|
|
|
174
|
-
|
|
100
|
+
HTTP, HTTPS, and SOCKS5 proxies are supported. After saving, subsequent conversations, catalog updates, and usage queries use the proxy. Connections originate from the machine running DSH; on a remote deployment, `127.0.0.1` refers to that server.
|
|
175
101
|
|
|
176
|
-
|
|
102
|
+
The DeepSeek V4.1 Flash Responses option is experimental, applies only to new requests, and does not promise lower latency. See the [advanced guide](docs/advanced.en.md) for full configuration and usage instructions.
|
|
177
103
|
|
|
178
|
-
|
|
104
|
+
Screenshots illustrate the interface. Actual models, quotas, and timestamps depend on your account and the current online catalog.
|
|
179
105
|
|
|
180
|
-
|
|
106
|
+
## Updates and common questions
|
|
181
107
|
|
|
182
|
-
|
|
108
|
+
Update to the latest npm release:
|
|
183
109
|
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
your-model-id: false
|
|
187
|
-
your-deprecated-model-id: true
|
|
110
|
+
```sh
|
|
111
|
+
dsh plugin --profile web update dsh-opencode-go --latest
|
|
188
112
|
```
|
|
189
113
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
The older `showDeprecatedModels` and `visibleModelIds` fields no longer control visibility. Use the individual switches or `modelVisibility`; retaining old fields does not prevent the plugin from loading.
|
|
193
|
-
|
|
194
|
-
## Image count cap
|
|
195
|
-
|
|
196
|
-
Under **Settings → OpenCode Go → Advanced settings**, set `maxImages` to a positive integer and save; no restart is needed. It is unset by default, with no image-count cap. Clearing or resetting removes the user override and inherits the base configuration; if the base has no cap either, the count is unlimited.
|
|
197
|
-
|
|
198
|
-
The count covers the full history sent in one request, including tool-result images. Repeated occurrences of the same attachment count separately. With a cap of `30`, 30 images pass through; 31 images cause the oldest occurrence to be offloaded before the request continues. Offloading replaces image content with a text placeholder and keeps the original attachment, but the model cannot see the offloaded image content in that request.
|
|
199
|
-
|
|
200
|
-
DSH 0.1.5 offloads only for the current request. DSH 0.1.6 and later record offloaded occurrences and retry through the host's image-offload mechanism; raising or clearing the cap does not automatically restore images already offloaded from history. Existing payload, pixel, and per-image byte budgets still apply independently and may require more images to be offloaded. This optional compatibility setting does not change upstream service limits.
|
|
201
|
-
|
|
202
|
-
## FAQ
|
|
114
|
+
Restart `dsh web` and reload the page afterward. For desktop DSH, quit and reopen the application. Headless users should replace `web` with `headless`. The repository's default branch may contain changes not yet released to npm.
|
|
203
115
|
|
|
204
|
-
|
|
116
|
+
**Why is usage hidden?** Auto mode shows it only for **DSH OpenCode Go** models. Check that the plugin is enabled, a key is configured, and the display mode is appropriate. Choose Always to show usage with other providers.
|
|
205
117
|
|
|
206
|
-
|
|
118
|
+
**What if usage queries or account additions fail?** Retry in the usage panel or refresh usage in the account card. An added account whose key was not saved can be repaired with a key or removed. See [account operations and saving](docs/advanced.en.md#account-operations-and-saving) for recovery behavior.
|
|
207
119
|
|
|
208
|
-
|
|
120
|
+
**Why does an old conversation need its model selected again?** When upgrading from `0.1.16` or earlier, select **DSH OpenCode Go** again in existing conversations or Agent presets. Manual configurations use `provider: dsh-opencode-go`.
|
|
209
121
|
|
|
210
|
-
|
|
122
|
+
**Which hosts are verified?** Installed compatibility covers ten host versions from `0.1.5-rc.1` through `0.2.1-alpha.1`. Later versions need verification. Developer messages, dynamic tool additions/removals, and deferred tool loading are explicitly rejected; see [development and compatibility](docs/development.md).
|
|
211
123
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
Confirm that the plugin is enabled and an API key is configured, then refresh the model list in Settings. Settings reads and refreshes request the gateway's `/models` endpoint and synchronize the OpenCode Go configuration from [models.dev](https://models.dev/api.json). Conversation pickers respect the catalog cache lifetime, so model switch changes do not force another gateway request. Protocol support, context length, output limit, and image capability come from the online configuration, so new models do not require a release of this plugin or pi-ai.
|
|
215
|
-
|
|
216
|
-
Models that are present in the gateway and have an entry using Anthropic Messages, OpenAI Chat Completions, or OpenAI Responses are discovered on the next Settings refresh or after the catalog cache expires. A Settings refresh bypasses the cache and notifies open conversation pickers to use the same updated catalog; a direct request for a previously unseen model also triggers an immediate resynchronization. The Settings page shows the complete discovery result.
|
|
217
|
-
|
|
218
|
-
A gateway model ID with no usable protocol or capability configuration is marked “Configuration missing” in Settings, with its switch off and disabled, and is kept out of the conversation picker, so one unconfigured model cannot block the rest of the list. Direct requests report the reason. Refresh after the upstream configuration is corrected. A model ID alone is not enough to reliably infer its transport; new protocols or protocol-specific exceptions may still require adapter changes.
|
|
219
|
-
|
|
220
|
-
If online configuration cannot be loaded, models without usable cached or built-in configuration are marked “Configuration unavailable”, with the configuration source error shown on the page. Check access to `https://models.dev/api.json` from the machine running DSH and review the error details, then refresh. When retrying a retained model list, its previous failure stays visible until a successful refresh clears it; configured models remain usable.
|
|
221
|
-
|
|
222
|
-
A reasoning-capable model without adjustable reasoning levels (for example, `union-alpha`) remains selectable and usable; it simply has no reasoning-strength control.
|
|
223
|
-
|
|
224
|
-
MiMo V2.6 Flash's gateway catalog does not yet list its controls. Based on direct OpenCode Go probes, the plugin offers **Off / Low / Medium / High**: Default omits `reasoning_effort` and preserves gateway-default reasoning; Off sends `none`, and the other levels send their matching values. This rule applies only to the verified model and protocol, not other MiMo models. Low / Medium / High were accepted and returned reasoning content, but are not guaranteed to produce increasing amounts of reasoning.
|
|
225
|
-
|
|
226
|
-
Online effort declarations determine selectable strengths. Toggle or budget declarations produce controls only for established native switch or budget protocols; they do not imply `off` or `high` effort parameters on a generic OpenAI-compatible route. An explicit empty control list does not gain an Off choice just because the model can reason.
|
|
227
|
-
|
|
228
|
-
A model that does offer adjustable levels also declares a default effort (`high` when the model offers it, otherwise the highest level it offers) whenever its transport would answer an unset effort with an explicit disable (`deepseek`, `zai`, `qwen`, `qwen-chat-template`). DSH uses that default when no level has been chosen, so leaving the control unset still sends a reasoning level instead of turning thinking off. Transports that leave the choice to the provider declare no default and are unchanged, and an explicitly chosen level always wins.
|
|
229
|
-
|
|
230
|
-
If the online configuration is temporarily unavailable, the plugin prefers previously fetched configuration, including disk data from before a restart, and falls back to pi-ai's built-in metadata. If a gateway catalog refresh fails, ongoing requests and Settings retain the last successful list from the current process. A failure from either source shows a warning, its cause, and the last successful checks of the model listing and model configuration separately. An initial gateway failure never invents a model list from cached metadata.
|
|
231
|
-
|
|
232
|
-
Model configuration is saved to `$DSH_HOME/cache/dsh-opencode-go/models.dev.api.json`, or `~/.dsh/cache/dsh-opencode-go/models.dev.api.json` when `DSH_HOME` is unset. This contains only public metadata, its ETag, and the last successful check time; it excludes API keys and gateway listings. After a restart, ordinary reads verify the gateway listing and use disk configuration while revalidating metadata in the background. The completed refresh updates conversation pickers. Corrupt caches fall back to the network, and write failures do not discard online results. Settings refreshes always wait for online verification, retaining old configuration with a diagnostic on failure; a disk hit is not reported as an online success. To clear the disk cache, exit DSH and delete this file.
|
|
233
|
-
|
|
234
|
-
`refreshMinutes` controls the cache lifetime after a successful refresh. Failed refreshes become eligible for retry on the next read after 5, 10, 20, 40, then at most 60 seconds; there is no background polling when nothing reads the catalog. Explicit Settings refreshes and previously unknown model requests bypass this delay. Cancelling model resolution or generation immediately ends that caller's catalog wait while other callers can continue sharing the same refresh.
|
|
235
|
-
|
|
236
|
-
Verified model configurations can serve generation immediately for five minutes after their cache lifetime expires, while triggering one shared background refresh. This window is measured from each source's last successful check; failed retries do not extend it. Beyond that window, requests wait for the next due refresh, retaining the existing fallback behavior if it fails. Initial loads without a disk cache, unknown models, and manual refreshes wait for online results. Listing requests have a 10-second deadline; the larger model metadata download has its own 30-second deadline and negotiates gzip to reduce transfer size on slow connections. If an HTTP/2 host compatibility issue delivers raw gzip bytes, the plugin asynchronously decompresses them within the same deadline, limiting both the delivered bytes and decoded result to 16 MiB. Model listing and usage requests continue to use uncompressed transfer.
|
|
237
|
-
|
|
238
|
-
Continuation, retries, and restored sessions reuse the Host's durable session ID. Forks and subagent sessions use their own IDs, separate from the parent. Standalone requests without a session ID receive a fresh random identifier each time.
|
|
239
|
-
|
|
240
|
-
## Uninstall
|
|
241
|
-
|
|
242
|
-
Remove the plugin from the relevant profile and restart the application:
|
|
124
|
+
Uninstall:
|
|
243
125
|
|
|
244
126
|
```sh
|
|
245
127
|
dsh plugin --profile web remove dsh-opencode-go
|
|
246
|
-
# or
|
|
247
|
-
dsh plugin --profile headless remove dsh-opencode-go
|
|
248
128
|
```
|
|
249
129
|
|
|
250
|
-
##
|
|
251
|
-
|
|
252
|
-
Please open an issue for bugs or feature requests.
|
|
253
|
-
|
|
254
|
-
## License
|
|
130
|
+
## More documentation
|
|
255
131
|
|
|
256
|
-
[
|
|
132
|
+
- [Advanced guide: Headless, proxies, manual configuration, and error diagnostics](docs/advanced.en.md)
|
|
133
|
+
- [Development and testing](docs/development.md)
|
|
134
|
+
- [Verification notes](docs/verification.md)
|
|
135
|
+
- [Issues and suggestions](https://github.com/Duskriver/dsh-opencode-go/issues)
|
|
136
|
+
- [MIT license](LICENSE)
|