@openclaw/deepseek-provider 2026.7.2-beta.7 → 2026.7.33
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/dist/.setup/models-BP0TFm69.mjs +106 -0
- package/dist/api.js +2 -2
- package/dist/index.js +20 -9
- package/dist/models.js +2 -2
- package/dist/onboard.js +19 -15
- package/dist/provider-catalog.js +2 -2
- package/dist/provider-policy-api.js +4 -67
- package/dist/stream.js +1 -1
- package/dist/thinking.js +1 -1
- package/openclaw.plugin.json +66 -17
- package/package.json +4 -4
- package/dist/models-Cps6DQet.js +0 -107
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region extensions/deepseek/models.ts
|
|
4
|
+
const DEEPSEEK_MANIFEST_PROVIDER = buildManifestModelProviderConfig({
|
|
5
|
+
providerId: "deepseek",
|
|
6
|
+
catalog: {
|
|
7
|
+
"providers": { "deepseek": {
|
|
8
|
+
"baseUrl": "https://api.deepseek.com",
|
|
9
|
+
"api": "openai-completions",
|
|
10
|
+
"models": [
|
|
11
|
+
{
|
|
12
|
+
"id": "deepseek-v4-flash",
|
|
13
|
+
"name": "DeepSeek V4 Flash",
|
|
14
|
+
"reasoning": true,
|
|
15
|
+
"input": ["text"],
|
|
16
|
+
"contextWindow": 1e6,
|
|
17
|
+
"maxTokens": 384e3,
|
|
18
|
+
"cost": {
|
|
19
|
+
"input": .14,
|
|
20
|
+
"output": .28,
|
|
21
|
+
"cacheRead": .028,
|
|
22
|
+
"cacheWrite": 0
|
|
23
|
+
},
|
|
24
|
+
"compat": {
|
|
25
|
+
"supportsUsageInStreaming": true,
|
|
26
|
+
"supportsReasoningEffort": true,
|
|
27
|
+
"maxTokensField": "max_tokens"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "deepseek-v4-pro",
|
|
32
|
+
"name": "DeepSeek V4 Pro",
|
|
33
|
+
"reasoning": true,
|
|
34
|
+
"input": ["text"],
|
|
35
|
+
"contextWindow": 1e6,
|
|
36
|
+
"maxTokens": 384e3,
|
|
37
|
+
"cost": {
|
|
38
|
+
"input": 1.74,
|
|
39
|
+
"output": 3.48,
|
|
40
|
+
"cacheRead": .145,
|
|
41
|
+
"cacheWrite": 0
|
|
42
|
+
},
|
|
43
|
+
"compat": {
|
|
44
|
+
"supportsUsageInStreaming": true,
|
|
45
|
+
"supportsReasoningEffort": true,
|
|
46
|
+
"maxTokensField": "max_tokens"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "deepseek-chat",
|
|
51
|
+
"name": "DeepSeek Chat",
|
|
52
|
+
"input": ["text"],
|
|
53
|
+
"contextWindow": 131072,
|
|
54
|
+
"maxTokens": 8192,
|
|
55
|
+
"cost": {
|
|
56
|
+
"input": .28,
|
|
57
|
+
"output": .42,
|
|
58
|
+
"cacheRead": .028,
|
|
59
|
+
"cacheWrite": 0
|
|
60
|
+
},
|
|
61
|
+
"compat": {
|
|
62
|
+
"supportsUsageInStreaming": true,
|
|
63
|
+
"maxTokensField": "max_tokens"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "deepseek-reasoner",
|
|
68
|
+
"name": "DeepSeek Reasoner",
|
|
69
|
+
"reasoning": true,
|
|
70
|
+
"input": ["text"],
|
|
71
|
+
"contextWindow": 131072,
|
|
72
|
+
"maxTokens": 65536,
|
|
73
|
+
"cost": {
|
|
74
|
+
"input": .28,
|
|
75
|
+
"output": .42,
|
|
76
|
+
"cacheRead": .028,
|
|
77
|
+
"cacheWrite": 0
|
|
78
|
+
},
|
|
79
|
+
"compat": {
|
|
80
|
+
"supportsUsageInStreaming": true,
|
|
81
|
+
"supportsReasoningEffort": false,
|
|
82
|
+
"maxTokensField": "max_tokens"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
} },
|
|
87
|
+
"discovery": { "deepseek": "static" }
|
|
88
|
+
}.providers.deepseek
|
|
89
|
+
});
|
|
90
|
+
const DEEPSEEK_BASE_URL = DEEPSEEK_MANIFEST_PROVIDER.baseUrl;
|
|
91
|
+
const DEEPSEEK_MODEL_CATALOG = DEEPSEEK_MANIFEST_PROVIDER.models;
|
|
92
|
+
function buildDeepSeekModelDefinition(model) {
|
|
93
|
+
return {
|
|
94
|
+
...model,
|
|
95
|
+
api: "openai-completions"
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
const DEEPSEEK_V4_MODEL_IDS = /* @__PURE__ */ new Set(["deepseek-v4-flash", "deepseek-v4-pro"]);
|
|
99
|
+
function isDeepSeekV4ModelId(modelId) {
|
|
100
|
+
return DEEPSEEK_V4_MODEL_IDS.has(modelId.toLowerCase());
|
|
101
|
+
}
|
|
102
|
+
function isDeepSeekV4ModelRef(model) {
|
|
103
|
+
return model.provider === "deepseek" && typeof model.id === "string" && isDeepSeekV4ModelId(model.id);
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { isDeepSeekV4ModelRef as a, isDeepSeekV4ModelId as i, DEEPSEEK_MODEL_CATALOG as n, buildDeepSeekModelDefinition as r, DEEPSEEK_BASE_URL as t };
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DEEPSEEK_MODEL_CATALOG, t as DEEPSEEK_BASE_URL } from "
|
|
1
|
+
import { n as DEEPSEEK_MODEL_CATALOG, r as buildDeepSeekModelDefinition, t as DEEPSEEK_BASE_URL } from "./.setup/models-BP0TFm69.mjs";
|
|
2
2
|
import { buildDeepSeekProvider } from "./provider-catalog.js";
|
|
3
3
|
import { createDeepSeekV4ThinkingWrapper } from "./stream.js";
|
|
4
|
-
export { DEEPSEEK_BASE_URL, DEEPSEEK_MODEL_CATALOG, buildDeepSeekProvider, createDeepSeekV4ThinkingWrapper };
|
|
4
|
+
export { DEEPSEEK_BASE_URL, DEEPSEEK_MODEL_CATALOG, buildDeepSeekModelDefinition, buildDeepSeekProvider, createDeepSeekV4ThinkingWrapper };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as openclaw_plugin_default } from "./models-Cps6DQet.js";
|
|
2
|
-
import { applyDeepSeekConfig } from "./onboard.js";
|
|
3
1
|
import { buildDeepSeekProvider } from "./provider-catalog.js";
|
|
4
2
|
import { createDeepSeekV4ThinkingWrapper } from "./stream.js";
|
|
3
|
+
import { DEEPSEEK_DEFAULT_MODEL_REF, applyDeepSeekConfig } from "./onboard.js";
|
|
5
4
|
import { resolveDeepSeekV4ThinkingProfile } from "./thinking.js";
|
|
6
5
|
import { readConfiguredProviderCatalogEntries } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
7
6
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
@@ -14,16 +13,28 @@ var deepseek_default = defineSingleProviderPluginEntry({
|
|
|
14
13
|
id: PROVIDER_ID,
|
|
15
14
|
name: "DeepSeek Provider",
|
|
16
15
|
description: "Bundled DeepSeek provider plugin",
|
|
17
|
-
manifest: openclaw_plugin_default,
|
|
18
16
|
provider: {
|
|
19
17
|
label: "DeepSeek",
|
|
20
18
|
docsPath: "/providers/deepseek",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
auth: [{
|
|
20
|
+
methodId: "api-key",
|
|
21
|
+
label: "DeepSeek API key",
|
|
22
|
+
hint: "API key",
|
|
23
|
+
optionKey: "deepseekApiKey",
|
|
24
|
+
flagName: "--deepseek-api-key",
|
|
25
|
+
envVar: "DEEPSEEK_API_KEY",
|
|
26
|
+
promptMessage: "Enter DeepSeek API key",
|
|
27
|
+
defaultModel: DEEPSEEK_DEFAULT_MODEL_REF,
|
|
28
|
+
applyConfig: (cfg) => applyDeepSeekConfig(cfg),
|
|
29
|
+
wizard: {
|
|
30
|
+
choiceId: "deepseek-api-key",
|
|
31
|
+
choiceLabel: "DeepSeek API key",
|
|
32
|
+
groupId: "deepseek",
|
|
33
|
+
groupLabel: "DeepSeek",
|
|
34
|
+
groupHint: "API key"
|
|
35
|
+
}
|
|
36
|
+
}],
|
|
37
|
+
catalog: { buildProvider: buildDeepSeekProvider },
|
|
27
38
|
augmentModelCatalog: ({ config }) => readConfiguredProviderCatalogEntries({
|
|
28
39
|
config,
|
|
29
40
|
providerId: PROVIDER_ID
|
package/dist/models.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { DEEPSEEK_BASE_URL, DEEPSEEK_MODEL_CATALOG, isDeepSeekV4ModelId, isDeepSeekV4ModelRef };
|
|
1
|
+
import { a as isDeepSeekV4ModelRef, i as isDeepSeekV4ModelId, n as DEEPSEEK_MODEL_CATALOG, r as buildDeepSeekModelDefinition, t as DEEPSEEK_BASE_URL } from "./.setup/models-BP0TFm69.mjs";
|
|
2
|
+
export { DEEPSEEK_BASE_URL, DEEPSEEK_MODEL_CATALOG, buildDeepSeekModelDefinition, isDeepSeekV4ModelId, isDeepSeekV4ModelRef };
|
package/dist/onboard.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { n as DEEPSEEK_MODEL_CATALOG, r as buildDeepSeekModelDefinition, t as DEEPSEEK_BASE_URL } from "./.setup/models-BP0TFm69.mjs";
|
|
2
|
+
import "./api.js";
|
|
3
|
+
import { applyAgentDefaultModelPrimary, applyProviderConfigWithModelCatalog } from "openclaw/plugin-sdk/provider-onboard";
|
|
4
4
|
//#region extensions/deepseek/onboard.ts
|
|
5
|
-
const DEEPSEEK_DEFAULT_MODEL_REF =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const DEEPSEEK_DEFAULT_MODEL_REF = "deepseek/deepseek-v4-flash";
|
|
6
|
+
function applyDeepSeekProviderConfig(cfg) {
|
|
7
|
+
const models = { ...cfg.agents?.defaults?.models };
|
|
8
|
+
models[DEEPSEEK_DEFAULT_MODEL_REF] = {
|
|
9
|
+
...models[DEEPSEEK_DEFAULT_MODEL_REF],
|
|
10
|
+
alias: models["deepseek/deepseek-v4-flash"]?.alias ?? "DeepSeek"
|
|
11
|
+
};
|
|
12
|
+
return applyProviderConfigWithModelCatalog(cfg, {
|
|
13
|
+
agentModels: models,
|
|
9
14
|
providerId: "deepseek",
|
|
10
15
|
api: "openai-completions",
|
|
11
16
|
baseUrl: DEEPSEEK_BASE_URL,
|
|
12
|
-
catalogModels:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
17
|
+
catalogModels: DEEPSEEK_MODEL_CATALOG.map(buildDeepSeekModelDefinition)
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function applyDeepSeekConfig(cfg) {
|
|
21
|
+
return applyAgentDefaultModelPrimary(applyDeepSeekProviderConfig(cfg), DEEPSEEK_DEFAULT_MODEL_REF);
|
|
22
|
+
}
|
|
19
23
|
//#endregion
|
|
20
|
-
export { applyDeepSeekConfig };
|
|
24
|
+
export { DEEPSEEK_DEFAULT_MODEL_REF, applyDeepSeekConfig };
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as DEEPSEEK_MODEL_CATALOG, t as DEEPSEEK_BASE_URL } from "
|
|
1
|
+
import { n as DEEPSEEK_MODEL_CATALOG, r as buildDeepSeekModelDefinition, t as DEEPSEEK_BASE_URL } from "./.setup/models-BP0TFm69.mjs";
|
|
2
2
|
//#region extensions/deepseek/provider-catalog.ts
|
|
3
3
|
function buildDeepSeekProvider() {
|
|
4
4
|
return {
|
|
5
5
|
baseUrl: DEEPSEEK_BASE_URL,
|
|
6
6
|
api: "openai-completions",
|
|
7
|
-
models:
|
|
7
|
+
models: DEEPSEEK_MODEL_CATALOG.map(buildDeepSeekModelDefinition)
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
@@ -1,54 +1,6 @@
|
|
|
1
|
-
import { n as DEEPSEEK_MODEL_CATALOG } from "
|
|
1
|
+
import { n as DEEPSEEK_MODEL_CATALOG } from "./.setup/models-BP0TFm69.mjs";
|
|
2
2
|
import { resolveDeepSeekV4ThinkingProfile } from "./thinking.js";
|
|
3
3
|
//#region extensions/deepseek/provider-policy-api.ts
|
|
4
|
-
const PREVIOUS_BUNDLED_METADATA = {
|
|
5
|
-
"deepseek-v4-flash": {
|
|
6
|
-
contextWindow: 1e6,
|
|
7
|
-
maxTokens: 384e3,
|
|
8
|
-
cost: {
|
|
9
|
-
input: .14,
|
|
10
|
-
output: .28,
|
|
11
|
-
cacheRead: .028,
|
|
12
|
-
cacheWrite: 0
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"deepseek-v4-pro": {
|
|
16
|
-
contextWindow: 1e6,
|
|
17
|
-
maxTokens: 384e3,
|
|
18
|
-
cost: {
|
|
19
|
-
input: 1.74,
|
|
20
|
-
output: 3.48,
|
|
21
|
-
cacheRead: .145,
|
|
22
|
-
cacheWrite: 0
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"deepseek-chat": {
|
|
26
|
-
contextWindow: 131072,
|
|
27
|
-
maxTokens: 8192,
|
|
28
|
-
cost: {
|
|
29
|
-
input: .28,
|
|
30
|
-
output: .42,
|
|
31
|
-
cacheRead: .028,
|
|
32
|
-
cacheWrite: 0
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"deepseek-reasoner": {
|
|
36
|
-
contextWindow: 131072,
|
|
37
|
-
maxTokens: 65536,
|
|
38
|
-
cost: {
|
|
39
|
-
input: .28,
|
|
40
|
-
output: .42,
|
|
41
|
-
cacheRead: .028,
|
|
42
|
-
cacheWrite: 0
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const ZERO_COST = {
|
|
47
|
-
input: 0,
|
|
48
|
-
output: 0,
|
|
49
|
-
cacheRead: 0,
|
|
50
|
-
cacheWrite: 0
|
|
51
|
-
};
|
|
52
4
|
/**
|
|
53
5
|
* Build a lookup from the bundled DeepSeek model catalog so we can hydrate
|
|
54
6
|
* missing metadata (contextWindow, cost, maxTokens) into user-configured
|
|
@@ -67,19 +19,6 @@ function hasCostValues(cost) {
|
|
|
67
19
|
const c = cost;
|
|
68
20
|
return typeof c.input === "number" || typeof c.output === "number" || typeof c.cacheRead === "number" || typeof c.cacheWrite === "number";
|
|
69
21
|
}
|
|
70
|
-
function hasSameCost(left, right) {
|
|
71
|
-
if (!left || typeof left !== "object" || !right) return false;
|
|
72
|
-
const cost = left;
|
|
73
|
-
if (Object.hasOwn(cost, "tieredPricing")) return false;
|
|
74
|
-
return cost.input === right.input && cost.output === right.output && cost.cacheRead === right.cacheRead && cost.cacheWrite === right.cacheWrite;
|
|
75
|
-
}
|
|
76
|
-
function isShippedZeroCostAliasSnapshot(raw, previous) {
|
|
77
|
-
return (raw.id === "deepseek-chat" || raw.id === "deepseek-reasoner") && raw.contextWindow === previous?.contextWindow && raw.maxTokens === previous?.maxTokens && hasSameCost(raw.cost, ZERO_COST);
|
|
78
|
-
}
|
|
79
|
-
function isPreviousBundledMetadataSnapshot(raw, previous) {
|
|
80
|
-
if (!previous) return false;
|
|
81
|
-
return raw.contextWindow === previous.contextWindow && raw.maxTokens === previous.maxTokens && (hasSameCost(raw.cost, previous.cost) || isShippedZeroCostAliasSnapshot(raw, previous));
|
|
82
|
-
}
|
|
83
22
|
/**
|
|
84
23
|
* Provider policy surface for DeepSeek.
|
|
85
24
|
*
|
|
@@ -95,19 +34,17 @@ function normalizeConfig(params) {
|
|
|
95
34
|
const raw = model;
|
|
96
35
|
const catalogEntry = catalog.get(raw.id);
|
|
97
36
|
if (!catalogEntry) return model;
|
|
98
|
-
const previousEntry = PREVIOUS_BUNDLED_METADATA[raw.id];
|
|
99
|
-
const hasPreviousBundledMetadata = isPreviousBundledMetadataSnapshot(raw, previousEntry);
|
|
100
37
|
let modelMutated = false;
|
|
101
38
|
const patched = {};
|
|
102
|
-
if (
|
|
39
|
+
if (!isPositiveNumber(raw.contextWindow) && isPositiveNumber(catalogEntry.contextWindow)) {
|
|
103
40
|
patched.contextWindow = catalogEntry.contextWindow;
|
|
104
41
|
modelMutated = true;
|
|
105
42
|
}
|
|
106
|
-
if (
|
|
43
|
+
if (!isPositiveNumber(raw.maxTokens) && isPositiveNumber(catalogEntry.maxTokens)) {
|
|
107
44
|
patched.maxTokens = catalogEntry.maxTokens;
|
|
108
45
|
modelMutated = true;
|
|
109
46
|
}
|
|
110
|
-
if (
|
|
47
|
+
if (!hasCostValues(raw.cost) && hasCostValues(catalogEntry.cost)) {
|
|
111
48
|
patched.cost = catalogEntry.cost;
|
|
112
49
|
modelMutated = true;
|
|
113
50
|
}
|
package/dist/stream.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as isDeepSeekV4ModelRef } from "./.setup/models-BP0TFm69.mjs";
|
|
2
2
|
import { createDeepSeekV4OpenAICompatibleThinkingWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
3
3
|
//#region extensions/deepseek/stream.ts
|
|
4
4
|
function createDeepSeekV4ThinkingWrapper(baseStreamFn, thinkingLevel) {
|
package/dist/thinking.js
CHANGED
package/openclaw.plugin.json
CHANGED
|
@@ -5,15 +5,21 @@
|
|
|
5
5
|
"onStartup": false
|
|
6
6
|
},
|
|
7
7
|
"enabledByDefault": true,
|
|
8
|
-
"providerCatalogEntry": "./provider-discovery.
|
|
9
|
-
"providers": [
|
|
8
|
+
"providerCatalogEntry": "./dist/provider-discovery.js",
|
|
9
|
+
"providers": [
|
|
10
|
+
"deepseek"
|
|
11
|
+
],
|
|
10
12
|
"contracts": {
|
|
11
|
-
"usageProviders": [
|
|
13
|
+
"usageProviders": [
|
|
14
|
+
"deepseek"
|
|
15
|
+
]
|
|
12
16
|
},
|
|
13
17
|
"providerEndpoints": [
|
|
14
18
|
{
|
|
15
19
|
"endpointClass": "deepseek-native",
|
|
16
|
-
"hosts": [
|
|
20
|
+
"hosts": [
|
|
21
|
+
"api.deepseek.com"
|
|
22
|
+
]
|
|
17
23
|
}
|
|
18
24
|
],
|
|
19
25
|
"providerRequest": {
|
|
@@ -28,60 +34,103 @@
|
|
|
28
34
|
"deepseek": {
|
|
29
35
|
"baseUrl": "https://api.deepseek.com",
|
|
30
36
|
"api": "openai-completions",
|
|
31
|
-
"defaultModel": "deepseek-v4-pro",
|
|
32
37
|
"models": [
|
|
33
38
|
{
|
|
34
39
|
"id": "deepseek-v4-flash",
|
|
35
40
|
"name": "DeepSeek V4 Flash",
|
|
36
41
|
"reasoning": true,
|
|
37
|
-
"input": [
|
|
42
|
+
"input": [
|
|
43
|
+
"text"
|
|
44
|
+
],
|
|
38
45
|
"contextWindow": 1000000,
|
|
39
46
|
"maxTokens": 384000,
|
|
40
47
|
"cost": {
|
|
41
48
|
"input": 0.14,
|
|
42
49
|
"output": 0.28,
|
|
43
|
-
"cacheRead": 0.
|
|
50
|
+
"cacheRead": 0.028,
|
|
44
51
|
"cacheWrite": 0
|
|
45
52
|
},
|
|
46
53
|
"compat": {
|
|
47
54
|
"supportsUsageInStreaming": true,
|
|
48
55
|
"supportsReasoningEffort": true,
|
|
49
|
-
"maxTokensField": "max_tokens"
|
|
50
|
-
"codeMode": "preferred"
|
|
56
|
+
"maxTokensField": "max_tokens"
|
|
51
57
|
}
|
|
52
58
|
},
|
|
53
59
|
{
|
|
54
60
|
"id": "deepseek-v4-pro",
|
|
55
61
|
"name": "DeepSeek V4 Pro",
|
|
56
62
|
"reasoning": true,
|
|
57
|
-
"input": [
|
|
63
|
+
"input": [
|
|
64
|
+
"text"
|
|
65
|
+
],
|
|
58
66
|
"contextWindow": 1000000,
|
|
59
67
|
"maxTokens": 384000,
|
|
60
68
|
"cost": {
|
|
61
|
-
"input":
|
|
62
|
-
"output":
|
|
63
|
-
"cacheRead": 0.
|
|
69
|
+
"input": 1.74,
|
|
70
|
+
"output": 3.48,
|
|
71
|
+
"cacheRead": 0.145,
|
|
64
72
|
"cacheWrite": 0
|
|
65
73
|
},
|
|
66
74
|
"compat": {
|
|
67
75
|
"supportsUsageInStreaming": true,
|
|
68
76
|
"supportsReasoningEffort": true,
|
|
69
|
-
"maxTokensField": "max_tokens"
|
|
70
|
-
|
|
77
|
+
"maxTokensField": "max_tokens"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "deepseek-chat",
|
|
82
|
+
"name": "DeepSeek Chat",
|
|
83
|
+
"input": [
|
|
84
|
+
"text"
|
|
85
|
+
],
|
|
86
|
+
"contextWindow": 131072,
|
|
87
|
+
"maxTokens": 8192,
|
|
88
|
+
"cost": {
|
|
89
|
+
"input": 0.28,
|
|
90
|
+
"output": 0.42,
|
|
91
|
+
"cacheRead": 0.028,
|
|
92
|
+
"cacheWrite": 0
|
|
93
|
+
},
|
|
94
|
+
"compat": {
|
|
95
|
+
"supportsUsageInStreaming": true,
|
|
96
|
+
"maxTokensField": "max_tokens"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "deepseek-reasoner",
|
|
101
|
+
"name": "DeepSeek Reasoner",
|
|
102
|
+
"reasoning": true,
|
|
103
|
+
"input": [
|
|
104
|
+
"text"
|
|
105
|
+
],
|
|
106
|
+
"contextWindow": 131072,
|
|
107
|
+
"maxTokens": 65536,
|
|
108
|
+
"cost": {
|
|
109
|
+
"input": 0.28,
|
|
110
|
+
"output": 0.42,
|
|
111
|
+
"cacheRead": 0.028,
|
|
112
|
+
"cacheWrite": 0
|
|
113
|
+
},
|
|
114
|
+
"compat": {
|
|
115
|
+
"supportsUsageInStreaming": true,
|
|
116
|
+
"supportsReasoningEffort": false,
|
|
117
|
+
"maxTokensField": "max_tokens"
|
|
71
118
|
}
|
|
72
119
|
}
|
|
73
120
|
]
|
|
74
121
|
}
|
|
75
122
|
},
|
|
76
123
|
"discovery": {
|
|
77
|
-
"deepseek": "
|
|
124
|
+
"deepseek": "static"
|
|
78
125
|
}
|
|
79
126
|
},
|
|
80
127
|
"setup": {
|
|
81
128
|
"providers": [
|
|
82
129
|
{
|
|
83
130
|
"id": "deepseek",
|
|
84
|
-
"envVars": [
|
|
131
|
+
"envVars": [
|
|
132
|
+
"DEEPSEEK_API_KEY"
|
|
133
|
+
]
|
|
85
134
|
}
|
|
86
135
|
]
|
|
87
136
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/deepseek-provider",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.33",
|
|
4
4
|
"description": "OpenClaw DeepSeek provider plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.6.8"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.7.
|
|
21
|
+
"pluginApi": ">=2026.7.33"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.7.
|
|
24
|
+
"openclawVersion": "2026.7.33",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"openclaw": ">=2026.7.
|
|
41
|
+
"openclaw": ">=2026.7.33"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|
package/dist/models-Cps6DQet.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { buildManifestModelDefinition } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
2
|
-
//#region extensions/deepseek/openclaw.plugin.json
|
|
3
|
-
var openclaw_plugin_default = {
|
|
4
|
-
id: "deepseek",
|
|
5
|
-
icon: "https://cdn.simpleicons.org/deepseek",
|
|
6
|
-
activation: { "onStartup": false },
|
|
7
|
-
enabledByDefault: true,
|
|
8
|
-
providerCatalogEntry: "./provider-discovery.ts",
|
|
9
|
-
providers: ["deepseek"],
|
|
10
|
-
contracts: { "usageProviders": ["deepseek"] },
|
|
11
|
-
providerEndpoints: [{
|
|
12
|
-
"endpointClass": "deepseek-native",
|
|
13
|
-
"hosts": ["api.deepseek.com"]
|
|
14
|
-
}],
|
|
15
|
-
providerRequest: { "providers": { "deepseek": { "family": "deepseek" } } },
|
|
16
|
-
modelCatalog: {
|
|
17
|
-
"providers": { "deepseek": {
|
|
18
|
-
"baseUrl": "https://api.deepseek.com",
|
|
19
|
-
"api": "openai-completions",
|
|
20
|
-
"defaultModel": "deepseek-v4-pro",
|
|
21
|
-
"models": [{
|
|
22
|
-
"id": "deepseek-v4-flash",
|
|
23
|
-
"name": "DeepSeek V4 Flash",
|
|
24
|
-
"reasoning": true,
|
|
25
|
-
"input": ["text"],
|
|
26
|
-
"contextWindow": 1e6,
|
|
27
|
-
"maxTokens": 384e3,
|
|
28
|
-
"cost": {
|
|
29
|
-
"input": .14,
|
|
30
|
-
"output": .28,
|
|
31
|
-
"cacheRead": .0028,
|
|
32
|
-
"cacheWrite": 0
|
|
33
|
-
},
|
|
34
|
-
"compat": {
|
|
35
|
-
"supportsUsageInStreaming": true,
|
|
36
|
-
"supportsReasoningEffort": true,
|
|
37
|
-
"maxTokensField": "max_tokens",
|
|
38
|
-
"codeMode": "preferred"
|
|
39
|
-
}
|
|
40
|
-
}, {
|
|
41
|
-
"id": "deepseek-v4-pro",
|
|
42
|
-
"name": "DeepSeek V4 Pro",
|
|
43
|
-
"reasoning": true,
|
|
44
|
-
"input": ["text"],
|
|
45
|
-
"contextWindow": 1e6,
|
|
46
|
-
"maxTokens": 384e3,
|
|
47
|
-
"cost": {
|
|
48
|
-
"input": .435,
|
|
49
|
-
"output": .87,
|
|
50
|
-
"cacheRead": .003625,
|
|
51
|
-
"cacheWrite": 0
|
|
52
|
-
},
|
|
53
|
-
"compat": {
|
|
54
|
-
"supportsUsageInStreaming": true,
|
|
55
|
-
"supportsReasoningEffort": true,
|
|
56
|
-
"maxTokensField": "max_tokens",
|
|
57
|
-
"codeMode": "preferred"
|
|
58
|
-
}
|
|
59
|
-
}]
|
|
60
|
-
} },
|
|
61
|
-
"discovery": { "deepseek": "refreshable" }
|
|
62
|
-
},
|
|
63
|
-
setup: { "providers": [{
|
|
64
|
-
"id": "deepseek",
|
|
65
|
-
"envVars": ["DEEPSEEK_API_KEY"]
|
|
66
|
-
}] },
|
|
67
|
-
providerAuthChoices: [{
|
|
68
|
-
"provider": "deepseek",
|
|
69
|
-
"method": "api-key",
|
|
70
|
-
"choiceId": "deepseek-api-key",
|
|
71
|
-
"appGuidedSecret": true,
|
|
72
|
-
"choiceLabel": "DeepSeek API key",
|
|
73
|
-
"groupId": "deepseek",
|
|
74
|
-
"groupLabel": "DeepSeek",
|
|
75
|
-
"groupHint": "API key",
|
|
76
|
-
"optionKey": "deepseekApiKey",
|
|
77
|
-
"cliFlag": "--deepseek-api-key",
|
|
78
|
-
"cliOption": "--deepseek-api-key <key>",
|
|
79
|
-
"cliDescription": "DeepSeek API key"
|
|
80
|
-
}],
|
|
81
|
-
configSchema: {
|
|
82
|
-
"type": "object",
|
|
83
|
-
"additionalProperties": false,
|
|
84
|
-
"properties": {}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region extensions/deepseek/models.ts
|
|
89
|
-
const DEEPSEEK_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.deepseek;
|
|
90
|
-
const DEEPSEEK_BASE_URL = DEEPSEEK_MANIFEST_CATALOG.baseUrl;
|
|
91
|
-
const DEEPSEEK_MODEL_CATALOG = DEEPSEEK_MANIFEST_CATALOG.models.map(buildManifestModelDefinition({
|
|
92
|
-
providerId: "deepseek",
|
|
93
|
-
catalog: DEEPSEEK_MANIFEST_CATALOG,
|
|
94
|
-
decorate: (model) => ({
|
|
95
|
-
...model,
|
|
96
|
-
api: "openai-completions"
|
|
97
|
-
})
|
|
98
|
-
}));
|
|
99
|
-
const DEEPSEEK_V4_MODEL_IDS = /* @__PURE__ */ new Set(["deepseek-v4-flash", "deepseek-v4-pro"]);
|
|
100
|
-
function isDeepSeekV4ModelId(modelId) {
|
|
101
|
-
return DEEPSEEK_V4_MODEL_IDS.has(modelId.toLowerCase());
|
|
102
|
-
}
|
|
103
|
-
function isDeepSeekV4ModelRef(model) {
|
|
104
|
-
return model.provider === "deepseek" && typeof model.id === "string" && isDeepSeekV4ModelId(model.id);
|
|
105
|
-
}
|
|
106
|
-
//#endregion
|
|
107
|
-
export { openclaw_plugin_default as a, isDeepSeekV4ModelRef as i, DEEPSEEK_MODEL_CATALOG as n, isDeepSeekV4ModelId as r, DEEPSEEK_BASE_URL as t };
|