dsh-any-deepseek 0.0.2 → 0.0.3

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/lib/adapter.d.ts CHANGED
@@ -103,11 +103,21 @@ export declare class AnyDeepSeekAdapter extends LlmAdapter {
103
103
  constructor(deps: AdapterDeps);
104
104
  providerInfo(provider: string): LlmProviderInfo;
105
105
  /**
106
- * Advertise exactly one model.
106
+ * Advertise exactly one model — **unconditionally**.
107
107
  *
108
- * A relay that is missing a key still gets no catalog entry — the picker then hides the whole
109
- * group, which is the harness's own convention for a dormant provider — but the settings page
110
- * keeps its entry, so the user can go fix it.
108
+ * 🔴 **This used to require a resolvable key, and that was wrong.**
109
+ *
110
+ * The old rule was "a relay with no key gets no catalog entry; the picker then hides the whole
111
+ * group, which is the harness's convention for a dormant provider." That reasoning leaks the
112
+ * provider's *credentials* into its *identity*: the provider disappeared from the model picker
113
+ * exactly when the user most needed to see it — during first-run setup, before any key exists.
114
+ * Measured on a real host (owner report, 2026-10-19): with the only channel disabled, the
115
+ * catalog came back `[]`, so `any-deepseek` was registered but *invisible*, which reads as
116
+ * "the plugin did not install" no matter what the schema or the routes say.
117
+ *
118
+ * ⇒ The catalog answers "what does this provider serve", which is a property of the plugin.
119
+ * Key presence is answered per request (`MISSING_CREDENTIAL`) and per row in the panel
120
+ * (`keyConfigured`), where the user can actually act on it.
111
121
  */
112
122
  listModels(_provider: string): Promise<LlmModelInfo[]>;
113
123
  resolveModel(provider: string, model: string, _signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
package/lib/index.js CHANGED
@@ -897,28 +897,32 @@ var AnyDeepSeekAdapter = class extends LlmAdapter {
897
897
  };
898
898
  }
899
899
  /**
900
- * Advertise exactly one model.
900
+ * Advertise exactly one model — **unconditionally**.
901
901
  *
902
- * A relay that is missing a key still gets no catalog entry — the picker then hides the whole
903
- * group, which is the harness's own convention for a dormant provider — but the settings page
904
- * keeps its entry, so the user can go fix it.
902
+ * 🔴 **This used to require a resolvable key, and that was wrong.**
903
+ *
904
+ * The old rule was "a relay with no key gets no catalog entry; the picker then hides the whole
905
+ * group, which is the harness's convention for a dormant provider." That reasoning leaks the
906
+ * provider's *credentials* into its *identity*: the provider disappeared from the model picker
907
+ * exactly when the user most needed to see it — during first-run setup, before any key exists.
908
+ * Measured on a real host (owner report, 2026-10-19): with the only channel disabled, the
909
+ * catalog came back `[]`, so `any-deepseek` was registered but *invisible*, which reads as
910
+ * "the plugin did not install" no matter what the schema or the routes say.
911
+ *
912
+ * ⇒ The catalog answers "what does this provider serve", which is a property of the plugin.
913
+ * Key presence is answered per request (`MISSING_CREDENTIAL`) and per row in the panel
914
+ * (`keyConfigured`), where the user can actually act on it.
905
915
  */
906
916
  async listModels(_provider) {
907
- const channels = this.deps.channels();
908
- const withKey = [];
909
- for (const channel of channels) {
910
- const key = await this.deps.resolveKey(channel.apiKeyEnv);
911
- if (key !== void 0 && key !== "") {
912
- withKey.push({
913
- provider: PROVIDER_ID,
914
- id: ADVERTISED_MODEL_ID,
915
- name: ADVERTISED_MODEL_NAME,
916
- description: `via ${channel.label}`
917
- });
918
- break;
919
- }
920
- }
921
- return withKey;
917
+ const selected = this.selected();
918
+ const first = this.deps.channels()[0];
919
+ const label = selected?.label ?? first?.label;
920
+ return [{
921
+ provider: PROVIDER_ID,
922
+ id: ADVERTISED_MODEL_ID,
923
+ name: ADVERTISED_MODEL_NAME,
924
+ description: label === void 0 ? "no channel configured yet" : `via ${label}`
925
+ }];
922
926
  }
923
927
  async resolveModel(provider, model, _signal) {
924
928
  const channel = this.selected();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-any-deepseek",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "One DeepSeek V4.1 Flash provider for DeepSeek Harness: paste a key per channel, switch channels manually, token usage booked per real upstream.",
5
5
  "license": "MIT",
6
6
  "repository": {