@openclaw/deepinfra-provider 2026.7.2-beta.5 → 2026.8.1-beta.2
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/cache-wrapper.js +4 -8
- package/dist/doctor-contract-api.js +2 -2
- package/dist/onboard.js +5 -16
- package/dist/{openclaw.plugin-DhzOI6DT.js → openclaw.plugin-DomWf43f.js} +16 -4
- package/dist/provider-models.js +3 -2
- package/dist/speech-provider.js +3 -2
- package/dist/video-generation-provider.js +2 -2
- package/openclaw.plugin.json +11 -4
- package/package.json +4 -4
package/dist/cache-wrapper.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { applyAnthropicEphemeralCacheControlMarkers,
|
|
1
|
+
import { applyAnthropicEphemeralCacheControlMarkers, createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
2
2
|
//#region extensions/deepinfra/cache-wrapper.ts
|
|
3
3
|
function createDeepInfraAnthropicCacheWrapper(baseStreamFn) {
|
|
4
|
-
return (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return streamWithPayloadPatch(baseStreamFn, model, context, options, (payload) => {
|
|
8
|
-
applyAnthropicEphemeralCacheControlMarkers(payload);
|
|
9
|
-
});
|
|
10
|
-
});
|
|
4
|
+
return createPayloadPatchStreamWrapper(baseStreamFn, ({ payload }) => {
|
|
5
|
+
applyAnthropicEphemeralCacheControlMarkers(payload);
|
|
6
|
+
}, { shouldPatch: ({ model }) => model.id.toLowerCase().startsWith("anthropic/") });
|
|
11
7
|
}
|
|
12
8
|
//#endregion
|
|
13
9
|
export { createDeepInfraAnthropicCacheWrapper };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as modelCatalog } from "./openclaw.plugin-
|
|
2
|
-
import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor";
|
|
1
|
+
import { t as modelCatalog } from "./openclaw.plugin-DomWf43f.js";
|
|
2
|
+
import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
3
3
|
//#region extensions/deepinfra/doctor-contract-api.ts
|
|
4
4
|
const PROVIDER_PATH = "models.providers.deepinfra";
|
|
5
5
|
const NATIVE_INFERENCE_PATH = "/v1/inference";
|
package/dist/onboard.js
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import { DEEPINFRA_DEFAULT_MODEL_REF } from "./provider-models.js";
|
|
2
|
-
import {
|
|
2
|
+
import { createAliasOnlyPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
|
|
3
3
|
//#region extensions/deepinfra/onboard.ts
|
|
4
4
|
function applyDeepInfraConfig(cfg, modelRef = DEEPINFRA_DEFAULT_MODEL_REF) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
return applyAgentDefaultModelPrimary({
|
|
11
|
-
...cfg,
|
|
12
|
-
agents: {
|
|
13
|
-
...cfg.agents,
|
|
14
|
-
defaults: {
|
|
15
|
-
...cfg.agents?.defaults,
|
|
16
|
-
models
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}, modelRef);
|
|
5
|
+
return createAliasOnlyPresetAppliers({
|
|
6
|
+
modelRef,
|
|
7
|
+
alias: "DeepInfra"
|
|
8
|
+
}).applyConfig(cfg);
|
|
20
9
|
}
|
|
21
10
|
//#endregion
|
|
22
11
|
export { applyDeepInfraConfig };
|
|
@@ -17,7 +17,10 @@ var modelCatalog = {
|
|
|
17
17
|
"cacheRead": .018,
|
|
18
18
|
"cacheWrite": 0
|
|
19
19
|
},
|
|
20
|
-
"compat": {
|
|
20
|
+
"compat": {
|
|
21
|
+
"supportsUsageInStreaming": true,
|
|
22
|
+
"codeMode": "capable"
|
|
23
|
+
}
|
|
21
24
|
},
|
|
22
25
|
{
|
|
23
26
|
"id": "deepseek-ai/DeepSeek-V4-Pro",
|
|
@@ -32,7 +35,10 @@ var modelCatalog = {
|
|
|
32
35
|
"cacheRead": .1,
|
|
33
36
|
"cacheWrite": 0
|
|
34
37
|
},
|
|
35
|
-
"compat": {
|
|
38
|
+
"compat": {
|
|
39
|
+
"supportsUsageInStreaming": true,
|
|
40
|
+
"codeMode": "capable"
|
|
41
|
+
}
|
|
36
42
|
},
|
|
37
43
|
{
|
|
38
44
|
"id": "zai-org/GLM-5.2",
|
|
@@ -47,7 +53,10 @@ var modelCatalog = {
|
|
|
47
53
|
"cacheRead": .18,
|
|
48
54
|
"cacheWrite": 0
|
|
49
55
|
},
|
|
50
|
-
"compat": {
|
|
56
|
+
"compat": {
|
|
57
|
+
"supportsUsageInStreaming": true,
|
|
58
|
+
"codeMode": "capable"
|
|
59
|
+
}
|
|
51
60
|
},
|
|
52
61
|
{
|
|
53
62
|
"id": "stepfun-ai/Step-3.7-Flash",
|
|
@@ -156,7 +165,10 @@ var modelCatalog = {
|
|
|
156
165
|
"cacheRead": .205000005,
|
|
157
166
|
"cacheWrite": 0
|
|
158
167
|
},
|
|
159
|
-
"compat": {
|
|
168
|
+
"compat": {
|
|
169
|
+
"supportsUsageInStreaming": true,
|
|
170
|
+
"codeMode": "capable"
|
|
171
|
+
}
|
|
160
172
|
},
|
|
161
173
|
{
|
|
162
174
|
"id": "stepfun-ai/Step-3.5-Flash",
|
package/dist/provider-models.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as modelCatalog } from "./openclaw.plugin-
|
|
1
|
+
import { t as modelCatalog } from "./openclaw.plugin-DomWf43f.js";
|
|
2
2
|
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
3
3
|
import { asPositiveSafeInteger } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime";
|
|
@@ -230,8 +230,8 @@ function hasDeepInfraApiKey(options) {
|
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
async function discoverDeepInfraSurfaces(options) {
|
|
233
|
-
if (process.env.VITEST) return manifestFallbackCatalog();
|
|
234
233
|
const env = options?.env ?? process.env;
|
|
234
|
+
if (env.NODE_ENV === "test" || env.VITEST) return manifestFallbackCatalog();
|
|
235
235
|
if (!(options?.hasApiKey ?? hasDeepInfraApiKey({
|
|
236
236
|
env,
|
|
237
237
|
agentDir: options?.agentDir
|
|
@@ -272,6 +272,7 @@ async function discoverDeepInfraSurfaces(options) {
|
|
|
272
272
|
}
|
|
273
273
|
async function discoverDeepInfraModels(options) {
|
|
274
274
|
const catalog = await discoverDeepInfraSurfaces(options);
|
|
275
|
+
if (!catalog.live) return DEEPINFRA_MODEL_CATALOG.map(buildDeepInfraModelDefinition);
|
|
275
276
|
const chatModels = catalog.chat.length > 0 ? catalog.chat : [...catalog.chat, ...catalog.vlm];
|
|
276
277
|
if (chatModels.length === 0) return DEEPINFRA_MODEL_CATALOG.map(buildDeepInfraModelDefinition);
|
|
277
278
|
const liveModels = chatModels.map(chatSurfaceModelToModelDefinition);
|
package/dist/speech-provider.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DEEPINFRA_BASE_URL } from "./provider-models.js";
|
|
2
2
|
import { DEEPINFRA_TTS_FALLBACK_MODELS, DEFAULT_DEEPINFRA_TTS_VOICE, normalizeDeepInfraModelRef } from "./media-models.js";
|
|
3
|
-
import {
|
|
3
|
+
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
+
import { createOpenAiCompatibleSpeechProvider } from "openclaw/plugin-sdk/speech";
|
|
4
5
|
//#region extensions/deepinfra/speech-provider.ts
|
|
5
6
|
const DEEPINFRA_TTS_RESPONSE_FORMATS = [
|
|
6
7
|
"mp3",
|
|
@@ -29,7 +30,7 @@ function buildDeepInfraSpeechProvider(options) {
|
|
|
29
30
|
normalizeModel: normalizeDeepInfraModelRef,
|
|
30
31
|
apiErrorLabel: "DeepInfra TTS API error",
|
|
31
32
|
missingApiKeyError: "DeepInfra API key missing",
|
|
32
|
-
readExtraConfig: (raw) => ({ extraBody:
|
|
33
|
+
readExtraConfig: (raw) => ({ extraBody: asOptionalRecord(raw?.extraBody) }),
|
|
33
34
|
extraJsonBodyFields: [{
|
|
34
35
|
configKey: "extraBody",
|
|
35
36
|
requestKey: "extra_body"
|
|
@@ -89,9 +89,9 @@ function buildDeepInfraVideoGenerationProvider(options) {
|
|
|
89
89
|
defaultModel,
|
|
90
90
|
models: ids,
|
|
91
91
|
resolveModelCapabilities: resolveDeepInfraVideoModelCapabilities,
|
|
92
|
-
isConfigured: (
|
|
92
|
+
isConfigured: (ctx) => isProviderApiKeyConfigured({
|
|
93
93
|
provider: "deepinfra",
|
|
94
|
-
|
|
94
|
+
...ctx
|
|
95
95
|
}),
|
|
96
96
|
capabilities: {
|
|
97
97
|
generate: {
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "deepinfra",
|
|
3
|
+
"doctorContract": {
|
|
4
|
+
"configRepair": true
|
|
5
|
+
},
|
|
3
6
|
"activation": {
|
|
4
7
|
"onStartup": false
|
|
5
8
|
},
|
|
@@ -48,7 +51,8 @@
|
|
|
48
51
|
"cacheWrite": 0
|
|
49
52
|
},
|
|
50
53
|
"compat": {
|
|
51
|
-
"supportsUsageInStreaming": true
|
|
54
|
+
"supportsUsageInStreaming": true,
|
|
55
|
+
"codeMode": "capable"
|
|
52
56
|
}
|
|
53
57
|
},
|
|
54
58
|
{
|
|
@@ -65,7 +69,8 @@
|
|
|
65
69
|
"cacheWrite": 0
|
|
66
70
|
},
|
|
67
71
|
"compat": {
|
|
68
|
-
"supportsUsageInStreaming": true
|
|
72
|
+
"supportsUsageInStreaming": true,
|
|
73
|
+
"codeMode": "capable"
|
|
69
74
|
}
|
|
70
75
|
},
|
|
71
76
|
{
|
|
@@ -82,7 +87,8 @@
|
|
|
82
87
|
"cacheWrite": 0
|
|
83
88
|
},
|
|
84
89
|
"compat": {
|
|
85
|
-
"supportsUsageInStreaming": true
|
|
90
|
+
"supportsUsageInStreaming": true,
|
|
91
|
+
"codeMode": "capable"
|
|
86
92
|
}
|
|
87
93
|
},
|
|
88
94
|
{
|
|
@@ -205,7 +211,8 @@
|
|
|
205
211
|
"cacheWrite": 0
|
|
206
212
|
},
|
|
207
213
|
"compat": {
|
|
208
|
-
"supportsUsageInStreaming": true
|
|
214
|
+
"supportsUsageInStreaming": true,
|
|
215
|
+
"codeMode": "capable"
|
|
209
216
|
}
|
|
210
217
|
},
|
|
211
218
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/deepinfra-provider",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.8.1-beta.2",
|
|
4
4
|
"description": "OpenClaw DeepInfra 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.
|
|
21
|
+
"pluginApi": ">=2026.8.1-beta.2"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.
|
|
24
|
+
"openclawVersion": "2026.8.1-beta.2",
|
|
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.
|
|
41
|
+
"openclaw": ">=2026.8.1-beta.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|