dsh-modellix 0.1.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.
@@ -0,0 +1,546 @@
1
+ [English](USER_GUIDE.md) | [简体中文](../zh-CN/USER_GUIDE.md)
2
+
3
+ # dsh-modellix User Guide
4
+
5
+ This guide is for Harness users who install and use `dsh-modellix`. `README.md` is the default English entry, a complete Chinese edition is available alongside it, and plugin UI text follows the current Harness locale.
6
+
7
+ `dsh-modellix` uses one Modellix API Key for three independently controlled capabilities:
8
+
9
+ | Capability | Entry point | Purpose |
10
+ | --- | --- | --- |
11
+ | Design | The Design view in Harness | Select an image, video, or audio model, use a prompt, parameter form, or natural-language adjustment, and review results |
12
+ | LLM | The Harness model selector and Modellix settings | Synchronize the live Modellix model catalog and switch models quickly |
13
+ | Web | Native Harness Web Tools | Run `web_search` and `web_fetch` through the Modellix provider |
14
+
15
+ ## Installation and verification
16
+
17
+ ### Requirements
18
+
19
+ - DeepSeek Harness `0.1.1-rc.2`
20
+ - Published-package runtime: Node.js `^22.19.0 || >=24.0.0`
21
+ - Source development and release verification: Node.js `24.18.1` and pnpm `11.24.0` (see `.nvmrc` and `packageManager`)
22
+ - A valid [Modellix API Key](https://docs.modellix.ai/get-started)
23
+
24
+ The Bundle contains its own Harness integration. `modellix-cli` is neither installed nor invoked as a runtime dependency.
25
+
26
+ Harness and this plugin currently use prerelease interfaces. Before upgrading Harness, inspect the plugin version, peer dependencies, and repository changelog.
27
+
28
+ ### Install the published package
29
+
30
+ The examples below use the `web` profile. Replace that name consistently if your profile differs:
31
+
32
+ ```sh
33
+ dsh plugin --profile web add dsh-modellix
34
+ dsh --profile web --dump-config
35
+ dsh --profile web
36
+ ```
37
+
38
+ Inspect `--dump-config` and confirm that it contains:
39
+
40
+ - the `dsh-modellix` Bundle configuration layer;
41
+ - a plugin row whose id is `modellix`;
42
+ - Web configuration that selects the `modellix` Search/Fetch provider and enables the native Harness Search/Fetch tools.
43
+
44
+ After installing or updating the Client Bundle, restart the corresponding Harness Web profile. Refreshing the browser alone does not load a new Bundle.
45
+
46
+ ### Install a tarball built from source
47
+
48
+ Build only from trusted source:
49
+
50
+ ```sh
51
+ pnpm install --frozen-lockfile
52
+ pnpm run verify:release:static
53
+ pnpm pack
54
+ dsh plugin --profile web add ./dsh-modellix-0.1.0.tgz
55
+ ```
56
+
57
+ `pnpm run check` includes environment verification, type checking, lint, the complete unit/contract suite, global hard coverage thresholds, and file-specific regression floors for the Host runtime and Design parameter planner. `verify:release:static` also performs the production dependency audit, build, exact artifact verification, an isolated Node 24 tarball installation, and a mandatory Node.js `^22.19.0` tarball runtime smoke. It does not replace real-browser and real API/Agent acceptance. Installing TypeScript source directly from Git requires the install phase to create `lib/`. Without a verified `prepare` flow, use the published package or a prebuilt tarball.
58
+
59
+ ### Complete release evidence gate
60
+
61
+ Before an actual release, commit the final code, documentation, and screenshots and keep the worktree clean. Create the following two Secret-free JSON files outside the repository. Each must be under 32 KiB, target the current package name/version and lowercase 40-character HEAD, and use a canonical UTC ISO-8601 `completedAt` no more than 72 hours old.
62
+
63
+ Browser evidence must attest onboarding, settings, Design, LLM, Web, 401 Credential recovery, accessibility, themes, and viewport acceptance:
64
+
65
+ ```json
66
+ {
67
+ "version": 1,
68
+ "kind": "browser",
69
+ "status": "passed",
70
+ "package": { "name": "dsh-modellix", "version": "0.1.0" },
71
+ "commit": "<current-40-character-lowercase-git-head>",
72
+ "completedAt": "<canonical-utc-iso-8601>",
73
+ "checks": {
74
+ "onboarding": "passed",
75
+ "settings": "passed",
76
+ "design": "passed",
77
+ "llm": "passed",
78
+ "web": "passed",
79
+ "401": "passed",
80
+ "a11y": "passed",
81
+ "theme": "passed",
82
+ "viewports": "passed"
83
+ }
84
+ }
85
+ ```
86
+
87
+ Real API/Agent evidence must cover catalogs, parameter planning, image, video, audio, the LLM Agent, and Web. An operator must explicitly trigger every real billed call. The Boolean field records only that authorization; never include a Key, Authorization header, Credential, request header, or other Secret in evidence:
88
+
89
+ ```json
90
+ {
91
+ "version": 1,
92
+ "kind": "api-agent",
93
+ "status": "passed",
94
+ "package": { "name": "dsh-modellix", "version": "0.1.0" },
95
+ "commit": "<current-40-character-lowercase-git-head>",
96
+ "completedAt": "<canonical-utc-iso-8601>",
97
+ "checks": {
98
+ "catalogs": "passed",
99
+ "planner": "passed",
100
+ "image": "passed",
101
+ "video": "passed",
102
+ "audio": "passed",
103
+ "llm-agent": "passed",
104
+ "web": "passed"
105
+ },
106
+ "billedCallsExplicitlyAuthorized": true
107
+ }
108
+ ```
109
+
110
+ For a live run, first complete one Modellix-backed DSH Agent turn in an isolated Web profile. Have the acceptance process provide `MODELLIX_API_KEY` directly from a controlled source, set `MODELLIX_ALLOW_BILLED_E2E=1`, `MODELLIX_REAL_AGENT_ATTESTED=1`, and absolute outside-repository paths in `MODELLIX_REAL_E2E_OUTPUT_DIR` and `MODELLIX_API_AGENT_E2E_EVIDENCE_FILE`, then run `pnpm run test:real:modellix`. The runner uses no Mock transport: it performs live catalogs and Schema planning, submits one image/video/audio POST each, uses bounded task reads, calls real Web Search/Fetch, saves downloaded media for independent decoding checks, and writes Secret-free evidence. It does not accept a Key on the command line.
111
+
112
+ Run the complete gate with absolute paths:
113
+
114
+ ```sh
115
+ MODELLIX_BROWSER_EVIDENCE_FILE=/absolute/path/browser-evidence.json \
116
+ MODELLIX_API_AGENT_E2E_EVIDENCE_FILE=/absolute/path/api-agent-evidence.json \
117
+ pnpm run verify:release
118
+ ```
119
+
120
+ The gate does not execute or retry billed calls. It fails for a missing, failed, or unknown fixed check; in-repository or stale evidence; package/commit mismatch; unavailable Node 22; or a dirty worktree. Node 22 is discovered from NVM or can be supplied by absolute `MODELLIX_NODE22_BINARY`; it is never silently skipped.
121
+
122
+ ## First-time setup
123
+
124
+ When the plugin has no usable Credential and setup has not been deferred, the Harness Web UI displays the “Connect Modellix” dialog.
125
+
126
+ ![Chinese-language Modellix first-time setup dialog with an empty API Key field and Design, LLM, and Web switches enabled](../assets/onboarding-defaults.webp)
127
+
128
+ ### Standard flow
129
+
130
+ 1. Enter the Key in the “Modellix API Key” field. The field is masked by default.
131
+ 2. Review the Design, LLM, and Web feature switches. All three are on by default on a fresh installation.
132
+ 3. Select “Save and enable.” The plugin stores the Key through the Harness Credential boundary before it stores non-secret settings.
133
+ 4. After a successful save, the draft is cleared. The UI shows only configured status and source; it never reveals the stored Key.
134
+
135
+ Use the “Show API Key / Hide API Key” button to inspect only the current unsaved draft. The button cannot read a stored Credential.
136
+
137
+ ### Configure later
138
+
139
+ Selecting “Configure later” stores the current feature switches and closes this onboarding request. It does not create a Credential or mark any Modellix capability as Ready.
140
+
141
+ - You can configure the Key directly from Modellix settings at any time.
142
+ - The next explicit use of an enabled Modellix capability that needs a Credential creates a new recovery request and prompts again.
143
+ - A single recovery request displays only one Credential dialog; concurrent 401 responses do not stack dialogs.
144
+
145
+ A mandatory Credential dialog cannot close implicitly through Escape or the backdrop, but “Configure later” remains visible and keyboard accessible.
146
+
147
+ ## Credential sources and security
148
+
149
+ ### Two sources
150
+
151
+ | Source | Configuration | Can the UI replace/remove it? | How to update it |
152
+ | --- | --- | --- | --- |
153
+ | Local Harness Credential | Enter during first-time setup or in Modellix settings | Depends on whether the Credential store is writable; normally yes | Select “Replace API Key” or “Remove API Key” in settings |
154
+ | Environment variable | Provide `MODELLIX_API_KEY` in the Harness launch environment | No; it is read-only in the UI | Update the external launch environment or secret manager, then restart Harness |
155
+
156
+ If a usable environment Credential already exists, first-time setup normally does not ask for another Key. If that environment Key receives an explicit 401, the UI explains that it cannot be overridden. Update the launch environment and restart Harness.
157
+
158
+ Do not write a Key value directly into documentation, shell history, or launch arguments. Use the operating system, service manager, or a controlled Secret mechanism to inject `MODELLIX_API_KEY` into the Harness process.
159
+
160
+ ### Security boundary
161
+
162
+ - A stored Key is resolved only inside the Harness Host Credential boundary; the Client never reads its bytes.
163
+ - An unsaved draft exists only in the current form state and is cleared on save, cancel, “Configure later,” or component unmount.
164
+ - After save, the Credential value never returns to the Client or enters a URL, query, hash, settings document, Design task record, prompt, model context, Tool argument, user-facing diagnostic, DOM, ARIA, log, or screenshot.
165
+ - Public model Schema requests carry no Authorization. Authenticated requests are limited to fixed Modellix HTTPS origins.
166
+ - Design revalidates the exact Modellix endpoint from the Schema and rejects cross-origin redirects.
167
+ - Persisted Design records contain only request/task identifiers, model, state, and result URLs—not the Key or prompt.
168
+
169
+ Screenshots and issue reports must never contain a real Key, Network request details, HAR, Credential files, sensitive Console context, or persistent recordings of a real-Secret flow.
170
+
171
+ ## Modellix settings
172
+
173
+ ![Chinese-language Modellix settings showing a verified Credential, three feature switches, and LLM catalog status](../assets/settings-ready.webp)
174
+
175
+ The settings page has three primary cards.
176
+
177
+ ### API Key
178
+
179
+ The status area shows both Credential source and verification state:
180
+
181
+ - “Not configured”: no usable Key exists;
182
+ - “Configured in the local Credential store”: a local Credential is the source;
183
+ - “Configured by a read-only environment variable”: `MODELLIX_API_KEY` is the source;
184
+ - “Waiting for verification / Verified / Invalid Key”: the current verification state.
185
+
186
+ For a writable local Credential, settings always retains a “Configure/Replace API Key” action. A configured local Credential also has “Remove API Key.” After removal, an enabled capability requests configuration on its next explicit call.
187
+
188
+ An environment-sourced Key cannot be replaced or removed in the UI.
189
+
190
+ ### Feature switches
191
+
192
+ Design, LLM, and Web can be toggled independently. You must select “Save changes” before an edit takes effect:
193
+
194
+ - With Design off, the Design view retains an explanation but cannot select models or submit generations.
195
+ - With LLM off, the plugin no longer maintains the Modellix LLM catalog and manual refresh is unavailable.
196
+ - With Web off, the Modellix Web provider is unavailable.
197
+
198
+ Disabling a feature does not delete existing upstream tasks, account data, or an external Key.
199
+
200
+ ### LLM model catalog
201
+
202
+ This card shows catalog health, available model count, and last refresh time. Manual refresh is available only when LLM is enabled and a Credential is configured.
203
+
204
+ A catalog refresh failure does not create a static replacement list or misreport a 402, 429, network failure, or 5xx as an invalid Key.
205
+
206
+ ## Design: image, video, and audio generation
207
+
208
+ ### Left/right layout
209
+
210
+ ![Chinese-language Modellix Design desktop layout with model, prompt, and parameters on the left and generation results on the right](../assets/design-desktop.webp)
211
+
212
+ Design uses a “conversation and parameters on the left, results on the right” two-column layout on desktop:
213
+
214
+ - The left workspace contains model search and filters, model selection, the primary prompt, Schema parameters, the natural-language parameter assistant, and the single primary media-generation action.
215
+ - The right results pane contains task states, media previews, expiry, download actions, and diagnostics.
216
+
217
+ When the Design container is `992px` wide or narrower—for example, because the Harness sidebar reduces the available slot—the columns become one: the workspace comes first and Results follows. A viewport fallback also stacks the layout at `768px` and below. Content scrolls vertically, so horizontal scrolling is not required to reach a key action.
218
+
219
+ ### Select a model
220
+
221
+ Design uses the current Modellix catalog instead of a static list assumed to remain valid forever.
222
+
223
+ 1. Search by model name, provider, or model id.
224
+ 2. Filter by All types, Image, Video, or Audio.
225
+ 3. Select a target in the model list. Models marked featured by the catalog have a star.
226
+ 4. Select “Refresh models” when you need the latest catalog. If live refresh fails while a cached result remains usable, the UI explicitly states that it is showing the most recent result.
227
+
228
+ The plugin first restores the most recently selected model if it remains available. Otherwise, it chooses a preferred available model from the current catalog. Select again if a model is removed or becomes unavailable.
229
+
230
+ ### Schema parameters and defaults
231
+
232
+ After model selection, the plugin reads its public `api_schema` and turns supported structures into a form:
233
+
234
+ | Schema information | UI behavior |
235
+ | --- | --- |
236
+ | Primary prompt field | A required multiline prompt field |
237
+ | `default` | Materialized into the draft and submitted unless the user overrides it |
238
+ | `required` | Marked required; a missing value prevents generation |
239
+ | `enum` | Select control |
240
+ | `boolean` | Switch |
241
+ | `number` / `integer` | Numeric input with minimum, maximum, and step constraints |
242
+ | String | Single-line or multiline text input with length constraints |
243
+ | Array or object | JSON editor with separate syntax-error and Schema-constraint messages |
244
+ | An unsupported structure that cannot be interpreted safely | The field is disabled or the model cannot submit, with an explanation |
245
+
246
+ Optional parameters are collapsed under “Advanced parameters” by default. The Schema is an invocation contract, not a hint: Design rereads and compares it before generation. If the model definition changed, the old draft is rejected; refresh and confirm parameters again.
247
+
248
+ ### Three editing methods
249
+
250
+ #### 1. Enter only a prompt
251
+
252
+ For a model such as GPT Image 2 whose public Schema supplies the other defaults, the common path is:
253
+
254
+ 1. Select the model.
255
+ 2. Enter a prompt.
256
+ 3. Review the default parameters.
257
+ 4. Select “Confirm and generate.”
258
+
259
+ The live model Schema always determines actual required fields. This guide does not assume that every model needs only a prompt.
260
+
261
+ #### 2. Edit exact parameters
262
+
263
+ Directly edit dimensions, aspect ratio, duration, count, format, or other model-advertised parameters. User values override defaults; the plugin does not send arbitrary fields absent from the Schema.
264
+
265
+ If JSON cannot be parsed, the UI reports a JSON syntax error. If JSON parses but fails the current field constraints, it reports a parameter constraint error. Any invalid field or missing required field disables generation.
266
+
267
+ #### 3. Adjust parameters in natural language
268
+
269
+ Under “Adjust parameters by chat,” enter an instruction such as “make it 16:9, eight seconds, and more cinematic,” then select “Propose parameter changes.”
270
+
271
+ This action:
272
+
273
+ - uses the same Modellix Key with the fixed `openai/gpt-5.6-luna` model;
274
+ - may incur separate LLM usage;
275
+ - can change only parameters declared by the current Schema;
276
+ - returns a summary, before-and-after field changes, and any conflicts;
277
+ - neither applies changes nor starts media generation automatically.
278
+
279
+ ![Chinese-language Design parameter proposal showing before-and-after changes with Apply and Reject actions](../assets/design-proposal.webp)
280
+
281
+ After review, select “Apply changes” or “Reject.” Resolve conflicts first. If parameters or the Schema changed after proposal creation, the stale proposal is rejected; create another proposal.
282
+
283
+ ### Worked Design example: a premium cliffside library
284
+
285
+ Use this as a reproducible image-generation pattern, while treating the selected model's live Schema as authoritative:
286
+
287
+ | Input | Example value |
288
+ | --- | --- |
289
+ | Model | `openai/gpt-image-2`, only when it is currently listed as available and its live Schema exposes the fields below |
290
+ | Prompt used in acceptance | `A premium editorial architectural photograph of a quiet cliffside library above a misty alpine lake at blue hour, carved pale stone arches, warm amber reading lamps, one thoughtful reader, subtle greenery, natural reflections, cinematic but realistic lighting, restrained navy and ivory palette, precise composition, no text, no logo.` |
291
+ | `quality` | `high` |
292
+ | `size` | `1536x1024` |
293
+
294
+ 1. Select the available image model and wait for its parameters and defaults to load.
295
+ 2. Enter the prompt. Set `quality` to `high` and `size` to `1536x1024`; leave every unrelated field at the current Schema default.
296
+ 3. Either edit those controls directly, or enter “Set quality to high and size to 1536x1024” in the parameter assistant. The assistant returns a reviewable two-field proposal; it does not generate the image.
297
+ 4. Review the proposal and form, apply the changes if needed, and confirm model, output count, balance, and account-side pricing.
298
+ 5. Select “Confirm and generate” once, then follow the task in the right results pane.
299
+
300
+ The parameter proposal may incur separate LLM usage. The final media request is also potentially billed and is submitted exactly once; the plugin does not automatically retry it. If the live Schema does not expose `quality`, `size`, or either example value, do not add or force them—use only the controls and values advertised by that model.
301
+
302
+ The 2026-08-26 real acceptance run used controlled credentials without exposing them to the browser. It completed the high-quality `openai/gpt-image-2` Design flow shown below, a 6-second 768P `minimax/hailuo-2.3-t2v` task, an `alibaba/qwen-audio-3.0-tts-plus` narration, a Modellix-backed DSH Agent turn, real Web Search/Fetch calls, and a separate native `deepseek-official` DSH Agent baseline. The downloaded video decoded as H.264 at 1366×768 and 5.875 seconds; the narration decoded as mono MP3 at 22.05 kHz and 7.94 seconds. Release evidence remains outside the repository and contains no Secret.
303
+
304
+ ### Confirmation and one-shot billed submission
305
+
306
+ “Confirm and generate” starts the actual media generation and may incur a charge. Before submitting, confirm that:
307
+
308
+ - the model is correct;
309
+ - the prompt and every required field are complete;
310
+ - no parameter has a syntax or constraint error;
311
+ - the account balance, pricing rules, and expected output count are acceptable.
312
+
313
+ Each click performs one billed POST. The plugin never retries that POST automatically and never follows a cross-origin redirect. Task status reads are separate read-only operations with bounded safe retries for transient failures.
314
+
315
+ If the connection ends during submission and the plugin cannot know whether upstream accepted the request, it records “Submission outcome unknown.” This is a replay fence, not proof of failure. Check the right pane or Modellix-side records before deciding whether to start a new generation manually.
316
+
317
+ ### Results, previews, and expiry
318
+
319
+ ![Chinese-language Design results pane showing the image created during real acceptance, its expiry, and download action](../assets/design-results-media.webp)
320
+
321
+ When you reopen Design or enter a new Harness session, the results pane reloads Host-persisted records, so unexpired resources remain available. Results are sorted by most recent update. The UI shows at most the latest 1,000 current persisted records, grouped as:
322
+
323
+ - Running: submitted, queued, or in-progress tasks;
324
+ - Succeeded: successful tasks with an available resource;
325
+ - Diagnostics: failed, canceled, unknown-submission, expired, or refresh-blocked tasks.
326
+
327
+ Images have a thumbnail and full-image viewer. Video and audio use native browser playback controls. Every available resource has a download action. External links open with no-referrer safety attributes.
328
+
329
+ Result URLs are upstream Modellix resources:
330
+
331
+ - An upstream resource or task expiry takes precedence when present.
332
+ - If upstream provides no expiry, the plugin uses a seven-day local display limit from completion or the last update.
333
+ - After expiry, the resource is no longer presented as available.
334
+ - The local limit does not renew, proxy, or permanently store the upstream file.
335
+
336
+ After replacing an API Key, a running task owned by an earlier Credential epoch may no longer refresh, while its existing non-secret record can still show the appropriate diagnostic.
337
+
338
+ ## LLM: synchronize and switch models
339
+
340
+ LLM reuses the same Key and does not require a separate Credential per model.
341
+
342
+ 1. In Modellix settings, confirm that LLM is enabled and the Credential is usable.
343
+ 2. Review “LLM model catalog” status and select “Refresh LLM models” when needed.
344
+ 3. Open the native Harness model selector.
345
+ 4. Select a target from the current catalog under the Modellix provider.
346
+ 5. The new model applies from the next model call.
347
+
348
+ Switching models does not replay an earlier call. Each new Harness model call may incur Modellix usage, and the provider retry limit remains `0`. If the desired model is missing, refresh the catalog in settings instead of typing an unverified model id.
349
+
350
+ ![English-language Harness model selector expanded to the Modellix provider with multiple LLM models synchronized from the live catalog](../assets/llm-model-selector.webp)
351
+
352
+ The plugin safely merges the live catalog into the Harness `llm-pi-ai` route while preserving unknown fields and user model metadata it does not own. The protocol configuration is:
353
+
354
+ - provider id: `modellix`;
355
+ - OpenAI Completions-compatible protocol;
356
+ - base URL: `https://llm.modellix.ai/v1`;
357
+ - default input: text;
358
+ - plugin-layer automatic retries: `0`.
359
+
360
+ When the catalog is unavailable, its status is error or unavailable. The plugin does not guess model ids or build a static fallback catalog. LLM calls may be billed under Modellix account rules.
361
+
362
+ ## Web: native search and fetch
363
+
364
+ When Web is enabled and a Credential is usable, the plugin registers:
365
+
366
+ - the Modellix Search provider for native `web_search`;
367
+ - the Modellix Fetch provider for native `web_fetch`.
368
+
369
+ It does not create duplicate custom tools. Harness continues to own tool arguments, presentation, and lifecycle; the Bundle only selects the `modellix` provider.
370
+
371
+ ![English-language Harness conversation showing native web_search and web_fetch completed by the Modellix provider for a Chinese public-documentation request](../assets/web-tools.webp)
372
+
373
+ For a typical flow, ask Harness to search a public topic, inspect the native `web_search` sources, and then fetch only the result you need with `web_fetch`. The provider is unavailable when Web is disabled, the Key is removed, or the Key is explicitly invalid. Web requests may incur Modellix usage. The provider does not automatically retry a request; when a potentially billed Fetch outcome is unknown, inspect the Harness transcript or Modellix-side record before manually repeating it. Do not put Secrets, private data, or content that should not be sent to a third party in a query or target page.
374
+
375
+ ## States, errors, and recovery
376
+
377
+ | State or error | Meaning | Recommended action |
378
+ | --- | --- | --- |
379
+ | Missing API Key | An enabled capability has no usable Credential | Configure it in recovery or Modellix settings, or choose Configure later |
380
+ | HTTP 401 / invalid Key | Modellix explicitly rejected the Credential | Replace a local Key; update `MODELLIX_API_KEY` and restart Harness for an environment source |
381
+ | HTTP 402 | Billing is unavailable or blocked | Check balance and billing; do not replace an otherwise valid Key to hide the issue |
382
+ | HTTP 429 | The request was rate limited | Wait as instructed and retry manually; a billed submission is not replayed automatically |
383
+ | Offline or DNS/connection failure | Harness Host cannot currently reach Modellix | Check network, proxy, and fixed HTTPS origins, then retry manually |
384
+ | Timeout | The request did not complete within its bound | Retry reads later; for an unknown billed submission, check records first |
385
+ | 5xx | Modellix is temporarily unavailable | Retry manually later; the Key is not marked invalid |
386
+ | Policy blocked | Account or environment policy rejects the operation | Check Harness and Modellix account policy |
387
+ | Schema unavailable/unsupported | The model contract cannot be interpreted safely | Refresh or select another model; do not bypass validation |
388
+ | Schema changed | A pre-submit reread found an old draft contract | Reselect/refresh the model and confirm parameters again |
389
+ | Submission outcome unknown | The billed POST outcome cannot be determined | Check Results or Modellix-side records before another billed action |
390
+ | Resource expired | The upstream URL or local display period ended | The plugin cannot renew it; generate again if needed |
391
+ | LLM catalog unavailable | Catalog read or materialization failed | Check switch, Key, network, and policy, then refresh manually |
392
+ | Credential changed | The task belongs to an earlier Credential epoch | The old running task may not refresh; inspect diagnostics and do not auto-resubmit |
393
+
394
+ ### Credential recovery flow
395
+
396
+ 1. Only an explicit 401 marks the Key invalid and creates a recovery request. Concurrent 401 responses are coalesced into one Credential dialog.
397
+ 2. If a local Key editor is already open, it upgrades in place to mandatory recovery wording. If an ordinary plugin dialog such as Remove API Key or the full-image viewer is open, recovery waits until that dialog closes instead of stacking a second modal.
398
+ 3. For a writable local Credential, enter a replacement and save it. The stored Key remains write-only, and the plugin does not replay the failed or billed operation; retry the intended capability explicitly after recovery.
399
+ 4. For an environment source, update `MODELLIX_API_KEY` outside Harness and restart the profile because the UI cannot replace it.
400
+ 5. “Configure later” dismisses only the current request. A timer does not repeatedly steal focus; another prompt appears only after a later explicit capability call still needs a Credential.
401
+
402
+ A 402, 429, offline failure, timeout, or 5xx remains distinct and does not open invalid-Key recovery.
403
+
404
+ ![Chinese-language Modellix recovery dialog after an invalid API Key with an empty field and Configure later action](../assets/credential-recovery.webp)
405
+
406
+ ## Accessibility, keyboard, and responsive behavior
407
+
408
+ ### Keyboard interaction
409
+
410
+ - When a Credential dialog opens, initial focus moves to the API Key field.
411
+ - `Tab` and `Shift+Tab` wrap inside the dialog while background content is inert.
412
+ - Show/Hide Key is a native button with a dynamic accessible name and `aria-pressed` state.
413
+ - Enter in the Key field can save. During save, the button retains action text, is marked busy, and blocks duplicate submission.
414
+ - Ordinary confirmation dialogs support Escape. A mandatory Credential gate does not close implicitly with Escape, but Configure later remains focusable.
415
+ - When a dialog closes, focus returns to the trigger or a reasonable primary-content location.
416
+
417
+ Fields use real labels; help and errors are linked through stable relationships, and invalid fields expose `aria-invalid`. Asynchronous progress and result changes use polite live regions without treating an entire interactive region as an alert.
418
+
419
+ ### Display and touch
420
+
421
+ - Design has two columns when its container is wider than `992px`; narrower host slots use one column, with a viewport fallback at `768px`.
422
+ - Below `560px`, model tools and action buttons stack and fill available width.
423
+ - The layout targets `320 CSS px` and 200% text zoom. Long URLs, environment variable names, and Chinese/English copy can wrap.
424
+ - In coarse-pointer environments, inputs, selects, disclosure summaries, links, and action buttons provide at least a 48px target.
425
+ - Harness semantic tokens adapt the UI to light, dark, and Windows forced-colors modes.
426
+ - `prefers-reduced-motion: reduce` disables unnecessary animation and transitions.
427
+
428
+ ![English-language Modellix Design in a single-column layout at 320 pixels with the workspace above Results](../assets/design-mobile-en.webp)
429
+
430
+ ## Cost and security checklist
431
+
432
+ Distinguish reads from actions that may incur usage:
433
+
434
+ | Action | May incur Modellix usage? | Plugin retry behavior |
435
+ | --- | --- | --- |
436
+ | Save/validate Key, read catalogs, or read public Schema | Normally a read or validation action; current Modellix rules apply | Runs inside the safe boundary and never mixes in a billed generation submission |
437
+ | Design natural-language parameter proposal | Yes; it calls a fixed LLM | The model call is not retried automatically |
438
+ | Design “Confirm and generate” | Yes; media generation | Exactly one billed POST, no automatic retry |
439
+ | Design task status read | Normally read-only | Transient failures may use bounded retries |
440
+ | A Modellix LLM call in Harness | Yes | Provider retry limit is `0` |
441
+ | `web_search` / `web_fetch` | Possibly | A user or agent should not automatically repeat a sensitive operation after an unknown outcome |
442
+
443
+ Before every generation, review model, parameters, count, and account-side pricing. Prefer no-cost read APIs during real validation. An operator must explicitly trigger any billed E2E call.
444
+
445
+ Use only an empty Key or an explicitly fake Key in security reports and documentation screenshots. Do not rely on blurring a captured real Secret later. If a real Key is ever captured, discard the image and rotate the Key under the incident process.
446
+
447
+ ## Troubleshooting
448
+
449
+ ### The first-time setup dialog did not appear
450
+
451
+ - A local or environment Credential may already exist; inspect Modellix settings.
452
+ - You may have selected Configure later. Configure directly in settings, or explicitly open an enabled Modellix capability to create a new recovery request.
453
+ - If settings itself failed to load, use Retry in the dialog and inspect the Harness Host connection.
454
+
455
+ ### Design has no models
456
+
457
+ 1. Confirm that the Design switch was saved as enabled.
458
+ 2. Confirm that a Credential is configured and not in 401 invalid state.
459
+ 3. Select “Refresh models.”
460
+ 4. Check Host network access to Modellix over HTTPS.
461
+ 5. If the catalog works but one model cannot submit, its Schema may not be supported; select another model.
462
+
463
+ ### “Confirm and generate” is unavailable
464
+
465
+ Check for a missing Key, disabled Design, unavailable model, empty required field, JSON syntax error, Schema constraint violation, or a blocking unsupported Schema structure. The UI displays a nearby reason while the action is unavailable.
466
+
467
+ ### A parameter proposal cannot be applied
468
+
469
+ - Resolve conflicts shown in the proposal card first.
470
+ - If you edited parameters after creating the proposal, reject the old proposal and create another.
471
+ - If the Schema or model changed, refresh and enter the instruction again.
472
+
473
+ ### A task stays Running or enters Diagnostics
474
+
475
+ - A 429, network failure, or 5xx lets safe read-only polling continue later, with a diagnostic in the UI.
476
+ - Repeated read failures can reach the polling bound; after connectivity returns, reopen or refresh the view.
477
+ - Replacing the Key can stop refresh for a task from an older Credential epoch.
478
+ - Do not click the billed generation action again merely because the page did not update immediately.
479
+
480
+ ### A completed result is missing
481
+
482
+ Check whether the task is under Diagnostics, whether the resource expired, and whether the upstream URL remains available. The plugin stores no media copy and cannot recover an expired resource.
483
+
484
+ ### An LLM model is absent from the selector
485
+
486
+ Confirm the LLM switch and Key, inspect catalog health in settings, and refresh manually. After successful materialization, reopen the Harness model selector. There is no fabricated fallback catalog after a catalog failure.
487
+
488
+ ### Web Tools are unavailable
489
+
490
+ Confirm that the Web switch was saved, the Credential is usable, and `dsh --profile web --dump-config` selects `modellix` for Search/Fetch. Restart the profile after updating the Bundle.
491
+
492
+ ### An environment Key cannot be changed in the UI
493
+
494
+ This is expected. The environment source is read-only. Update `MODELLIX_API_KEY` in the external Harness launch environment or secret manager, then restart Harness.
495
+
496
+ ## Uninstallation
497
+
498
+ 1. For a local writable Credential, select “Remove API Key” in Modellix settings first.
499
+ 2. For an environment source, revoke `MODELLIX_API_KEY` in the external launch environment or secret manager.
500
+ 3. Remove the plugin from the target profile and inspect the configuration:
501
+
502
+ ```sh
503
+ dsh plugin --profile web remove dsh-modellix
504
+ dsh --profile web --dump-config
505
+ dsh --profile web
506
+ ```
507
+
508
+ 4. Confirm that `--dump-config` no longer contains the `dsh-modellix` Bundle layer or `modellix` plugin row.
509
+
510
+ Uninstallation does not promise to delete upstream Modellix tasks, external environment variables, or every piece of persisted Harness data. If your organization requires complete cleanup, inspect Credential storage, Harness profile data, and Modellix account records separately.
511
+
512
+ ## Current limitations
513
+
514
+ - The natural-language parameter assistant modifies only fields declared by the current Schema; it does not run an open-ended agent workflow.
515
+ - There is no upstream cancellation API, and the UI has no generation cancellation button.
516
+ - Results are upstream URLs plus task metadata, not a permanent local media library.
517
+ - An unsupported complex Schema blocks submission instead of guessing or silently dropping constraints.
518
+ - LLM depends on the live catalog and provides no fabricated model when the catalog is unavailable.
519
+ - Web uses the native Harness Tool seam; the plugin has no duplicate custom Tool UI.
520
+
521
+ ## Included screenshots and safe-capture checklist
522
+
523
+ These images were captured in an isolated acceptance profile and checked for Secrets. Most plugin copy is Chinese; `design-mobile-en.webp` and `llm-model-selector.webp` use English Harness chrome, while `web-tools.webp` uses English Harness chrome around a Chinese public-documentation request and response. Both guides reuse the same safe set with language-appropriate alt text:
524
+
525
+ | Suggested file | Alt text | Capture focus |
526
+ | --- | --- | --- |
527
+ | `docs/assets/onboarding-defaults.webp` | Chinese-language Modellix first-time setup dialog with an empty API Key field and Design, LLM, and Web switches enabled | Empty password field, three default switches, Configure later and Save actions |
528
+ | `docs/assets/settings-ready.webp` | Chinese-language Modellix settings showing a verified Credential, three feature switches, and LLM catalog status | Show configured status only, never the Key |
529
+ | `docs/assets/design-desktop.webp` | Chinese-language Modellix Design desktop layout with model, prompt, and parameters on the left and generation results on the right | 1440px, generic prompt, non-sensitive result |
530
+ | `docs/assets/design-proposal.webp` | Chinese-language Design parameter proposal showing before-and-after changes with Apply and Reject actions | No personal data; make clear that a proposal does not generate automatically |
531
+ | `docs/assets/design-results-media.webp` | Chinese-language Design results pane showing the image created during real acceptance, its expiry, and download action | The image uses a public test prompt; video and audio passed separate real API acceptance and are not mixed into this screenshot |
532
+ | `docs/assets/design-mobile-en.webp` | English-language Modellix Design in a single-column layout at 320 pixels with the workspace above Results | 320px, longest English copy, no clipped key action, and visible English localization |
533
+ | `docs/assets/credential-recovery.webp` | Chinese-language Modellix recovery dialog after an invalid API Key with an empty field and Configure later action | Simulated 401 only; never show a real Key |
534
+ | `docs/assets/llm-model-selector.webp` | English-language Harness model selector expanded to the Modellix provider with models synchronized from the live catalog | Show only public model names, with no account or call content |
535
+ | `docs/assets/web-tools.webp` | English-language Harness conversation showing native web_search and web_fetch completed for a Chinese public-documentation request | Use public documentation; do not show private URLs, Cookies, or request details |
536
+
537
+ These screenshots show only an empty Key, an explicitly fake Key, public model names, public URLs, and generic test prompts. The real Key was read directly by the acceptance process and never entered the browser, screenshots, Network/HAR, Console, Credential files, or persistent recordings. Future screenshot updates must preserve the same rule.
538
+
539
+ ## References
540
+
541
+ - [English README](../../README.md)
542
+ - [Chinese README](../../README.zh-CN.md)
543
+ - [Modellix getting started](https://docs.modellix.ai/get-started)
544
+ - [Modellix LLM overview](https://docs.modellix.ai/llm/overview)
545
+ - [Modellix GPT Image 2 example](https://www.modellix.ai/zh_CN/models/openai/gpt-image-2)
546
+ - [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)