dsh-any-deepseek 0.0.2 → 0.0.4
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 +14 -4
- package/lib/index.js +29 -23
- package/package.json +1 -1
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
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
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,31 +897,40 @@ 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
|
-
*
|
|
903
|
-
*
|
|
904
|
-
*
|
|
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
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
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();
|
|
929
|
+
const efforts = Object.keys(channel?.reasoningEfforts ?? {});
|
|
930
|
+
const reasoning = efforts.length === 0 ? {} : { reasoning: { efforts: efforts.map((id) => ({
|
|
931
|
+
id: ReasoningEffortId(id),
|
|
932
|
+
name: id
|
|
933
|
+
})) } };
|
|
925
934
|
return {
|
|
926
935
|
provider,
|
|
927
936
|
id: model,
|
|
@@ -929,10 +938,7 @@ var AnyDeepSeekAdapter = class extends LlmAdapter {
|
|
|
929
938
|
description: channel === void 0 ? void 0 : `via ${channel.label}`,
|
|
930
939
|
context: { contextWindow: channel?.contextWindow ?? 1e6 },
|
|
931
940
|
defaultMaxTokens: channel?.maxTokens,
|
|
932
|
-
...
|
|
933
|
-
id: ReasoningEffortId(id),
|
|
934
|
-
name: id
|
|
935
|
-
})) } }
|
|
941
|
+
...reasoning
|
|
936
942
|
};
|
|
937
943
|
}
|
|
938
944
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-any-deepseek",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
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": {
|