@openclaw/deepinfra-provider 2026.9.3 → 2026.9.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/dist/api.js +2 -2
- package/dist/index.js +3 -2
- package/dist/onboard.js +1 -1
- package/dist/provider-catalog.js +2 -9
- package/dist/provider-discovery.js +5 -2
- package/dist/provider-models.js +4 -23
- package/dist/provider-static-catalog.js +33 -0
- package/openclaw.plugin.json +5 -0
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { deepinfraEmbeddingProviderAdapter } from "./embedding-adapter.js";
|
|
2
2
|
import { buildDeepInfraImageGenerationProvider } from "./image-generation-provider.js";
|
|
3
3
|
import { deepinfraMediaUnderstandingProvider } from "./media-understanding-provider.js";
|
|
4
|
-
import { DEEPINFRA_DEFAULT_MODEL_REF } from "./provider-
|
|
4
|
+
import { DEEPINFRA_DEFAULT_MODEL_REF, buildStaticDeepInfraProvider } from "./provider-static-catalog.js";
|
|
5
5
|
import { applyDeepInfraConfig } from "./onboard.js";
|
|
6
|
-
import { buildDeepInfraProvider
|
|
6
|
+
import { buildDeepInfraProvider } from "./provider-catalog.js";
|
|
7
7
|
import { buildDeepInfraSpeechProvider } from "./speech-provider.js";
|
|
8
8
|
import { buildDeepInfraVideoGenerationProvider } from "./video-generation-provider.js";
|
|
9
9
|
export { DEEPINFRA_DEFAULT_MODEL_REF, applyDeepInfraConfig, buildDeepInfraImageGenerationProvider, buildDeepInfraProvider, buildDeepInfraSpeechProvider, buildDeepInfraVideoGenerationProvider, buildStaticDeepInfraProvider, deepinfraEmbeddingProviderAdapter, deepinfraMediaUnderstandingProvider };
|
package/dist/index.js
CHANGED
|
@@ -2,9 +2,10 @@ import { createDeepInfraAnthropicCacheWrapper } from "./cache-wrapper.js";
|
|
|
2
2
|
import { buildDeepInfraEmbeddingAdapter } from "./embedding-adapter.js";
|
|
3
3
|
import { buildDeepInfraImageGenerationProvider } from "./image-generation-provider.js";
|
|
4
4
|
import { buildDeepInfraMediaUnderstandingProvider } from "./media-understanding-provider.js";
|
|
5
|
-
import { DEEPINFRA_DEFAULT_MODEL_REF,
|
|
5
|
+
import { DEEPINFRA_DEFAULT_MODEL_REF, buildStaticDeepInfraProvider } from "./provider-static-catalog.js";
|
|
6
6
|
import { applyDeepInfraConfig } from "./onboard.js";
|
|
7
|
-
import {
|
|
7
|
+
import { getDeepInfraSurfaceFallbackCatalog } from "./provider-models.js";
|
|
8
|
+
import { buildDeepInfraApiKeyCatalog } from "./provider-catalog.js";
|
|
8
9
|
import { buildDeepInfraSpeechProvider } from "./speech-provider.js";
|
|
9
10
|
import { listDeepInfraImageGenCatalog, listDeepInfraVideoGenCatalog } from "./surface-model-catalogs.js";
|
|
10
11
|
import { buildDeepInfraVideoGenerationProvider } from "./video-generation-provider.js";
|
package/dist/onboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEEPINFRA_DEFAULT_MODEL_REF } from "./provider-
|
|
1
|
+
import { DEEPINFRA_DEFAULT_MODEL_REF } from "./provider-static-catalog.js";
|
|
2
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) {
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { DEEPINFRA_BASE_URL } from "./media-models.js";
|
|
2
|
-
import {
|
|
2
|
+
import { discoverDeepInfraModels } from "./provider-models.js";
|
|
3
3
|
import { runLiveProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
4
4
|
import { buildSingleProviderApiKeyCatalog } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
5
5
|
//#region extensions/deepinfra/provider-catalog.ts
|
|
6
|
-
function buildStaticDeepInfraProvider() {
|
|
7
|
-
return {
|
|
8
|
-
baseUrl: DEEPINFRA_BASE_URL,
|
|
9
|
-
api: "openai-completions",
|
|
10
|
-
models: DEEPINFRA_MODEL_CATALOG.map(buildDeepInfraModelDefinition)
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
6
|
async function buildDeepInfraProvider(options) {
|
|
14
7
|
const models = await discoverDeepInfraModels({
|
|
15
8
|
...options,
|
|
@@ -37,4 +30,4 @@ function buildDeepInfraApiKeyCatalog(ctx) {
|
|
|
37
30
|
});
|
|
38
31
|
}
|
|
39
32
|
//#endregion
|
|
40
|
-
export { buildDeepInfraApiKeyCatalog, buildDeepInfraProvider
|
|
33
|
+
export { buildDeepInfraApiKeyCatalog, buildDeepInfraProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildStaticDeepInfraProvider } from "./provider-static-catalog.js";
|
|
2
2
|
//#region extensions/deepinfra/provider-discovery.ts
|
|
3
3
|
const deepinfraProviderDiscovery = {
|
|
4
4
|
id: "deepinfra",
|
|
@@ -7,7 +7,10 @@ const deepinfraProviderDiscovery = {
|
|
|
7
7
|
auth: [],
|
|
8
8
|
catalog: {
|
|
9
9
|
order: "simple",
|
|
10
|
-
run: (ctx) =>
|
|
10
|
+
run: async (ctx) => {
|
|
11
|
+
const { buildDeepInfraApiKeyCatalog } = await import("./provider-catalog.js");
|
|
12
|
+
return await buildDeepInfraApiKeyCatalog(ctx);
|
|
13
|
+
}
|
|
11
14
|
},
|
|
12
15
|
staticCatalog: {
|
|
13
16
|
order: "simple",
|
package/dist/provider-models.js
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
import { t as modelCatalog } from "./openclaw.plugin-BRaVociw.js";
|
|
2
2
|
import { DEEPINFRA_BASE_URL, DEEPINFRA_TTS_FALLBACK_CATALOG } from "./media-models.js";
|
|
3
|
+
import { DEEPINFRA_MODEL_CATALOG, buildDeepInfraModelDefinition } from "./provider-static-catalog.js";
|
|
3
4
|
import { parseDeepInfraPricingCatalog } from "./pricing-api.js";
|
|
4
5
|
import { asPositiveSafeInteger, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
import { fetchLiveProviderModelRows } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
7
|
+
import { getCachedLiveCatalogValue } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
5
8
|
import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime";
|
|
6
9
|
import { isProviderApiKeyConfigured } from "openclaw/plugin-sdk/provider-auth";
|
|
7
|
-
import { fetchLiveProviderModelRows } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
8
|
-
import { buildManifestModelProviderConfig, getCachedLiveCatalogValue } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
9
10
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
10
11
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
11
12
|
//#region extensions/deepinfra/provider-models.ts
|
|
12
13
|
const log = createSubsystemLogger("deepinfra-models");
|
|
13
|
-
const DEEPINFRA_MANIFEST_PROVIDER = buildManifestModelProviderConfig({
|
|
14
|
-
providerId: "deepinfra",
|
|
15
|
-
catalog: modelCatalog.providers.deepinfra
|
|
16
|
-
});
|
|
17
14
|
const DEEPINFRA_MODELS_URL = `${DEEPINFRA_BASE_URL}/models?sort_by=openclaw&filter=with_meta`;
|
|
18
15
|
const DEEPINFRA_PRICING_URL = "https://api.deepinfra.com/models/list";
|
|
19
|
-
const DEEPINFRA_DEFAULT_MODEL_REF = `deepinfra/deepseek-ai/DeepSeek-V4-Flash`;
|
|
20
16
|
const DEEPINFRA_DEFAULT_CONTEXT_WINDOW = 128e3;
|
|
21
17
|
const DEEPINFRA_DEFAULT_MAX_TOKENS = 8192;
|
|
22
|
-
const DEEPINFRA_MODEL_CATALOG = DEEPINFRA_MANIFEST_PROVIDER.models;
|
|
23
18
|
const DISCOVERY_TIMEOUT_MS = 5e3;
|
|
24
19
|
const DISCOVERY_CACHE_TTL_MS = 3e5;
|
|
25
20
|
const SURFACE_FOR_TAG = {
|
|
@@ -162,20 +157,6 @@ function manifestFallbackCatalog() {
|
|
|
162
157
|
function getDeepInfraSurfaceFallbackCatalog() {
|
|
163
158
|
return manifestFallbackCatalog();
|
|
164
159
|
}
|
|
165
|
-
function resolveDeepInfraThinkingFormat(modelId) {
|
|
166
|
-
return (modelId ?? "").toLowerCase().split("/")[0] === "deepseek-ai" ? "deepseek" : void 0;
|
|
167
|
-
}
|
|
168
|
-
function buildDeepInfraModelDefinition(model) {
|
|
169
|
-
const thinkingFormat = model.compat?.thinkingFormat ?? resolveDeepInfraThinkingFormat(model.id);
|
|
170
|
-
return {
|
|
171
|
-
...model,
|
|
172
|
-
compat: {
|
|
173
|
-
...model.compat,
|
|
174
|
-
supportsUsageInStreaming: model.compat?.supportsUsageInStreaming ?? true,
|
|
175
|
-
...thinkingFormat ? { thinkingFormat } : {}
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
160
|
function chatSurfaceModelToModelDefinition(model) {
|
|
180
161
|
const manifestModel = DEEPINFRA_MODEL_CATALOG.find((entry) => entry.id === model.id);
|
|
181
162
|
const input = model.tags.includes("vlm") ? ["text", "image"] : ["text"];
|
|
@@ -294,4 +275,4 @@ async function discoverDeepInfraModels(options) {
|
|
|
294
275
|
}));
|
|
295
276
|
}
|
|
296
277
|
//#endregion
|
|
297
|
-
export {
|
|
278
|
+
export { discoverDeepInfraModels, discoverDeepInfraSurfaces, getDeepInfraSurfaceFallbackCatalog };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { t as modelCatalog } from "./openclaw.plugin-BRaVociw.js";
|
|
2
|
+
import { DEEPINFRA_BASE_URL } from "./media-models.js";
|
|
3
|
+
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-model-metadata";
|
|
4
|
+
//#region extensions/deepinfra/provider-static-catalog.ts
|
|
5
|
+
const DEEPINFRA_MANIFEST_PROVIDER = buildManifestModelProviderConfig({
|
|
6
|
+
providerId: "deepinfra",
|
|
7
|
+
catalog: modelCatalog.providers.deepinfra
|
|
8
|
+
});
|
|
9
|
+
const DEEPINFRA_DEFAULT_MODEL_REF = `deepinfra/deepseek-ai/DeepSeek-V4-Flash`;
|
|
10
|
+
const DEEPINFRA_MODEL_CATALOG = DEEPINFRA_MANIFEST_PROVIDER.models;
|
|
11
|
+
function resolveDeepInfraThinkingFormat(modelId) {
|
|
12
|
+
return (modelId ?? "").toLowerCase().split("/")[0] === "deepseek-ai" ? "deepseek" : void 0;
|
|
13
|
+
}
|
|
14
|
+
function buildDeepInfraModelDefinition(model) {
|
|
15
|
+
const thinkingFormat = model.compat?.thinkingFormat ?? resolveDeepInfraThinkingFormat(model.id);
|
|
16
|
+
return {
|
|
17
|
+
...model,
|
|
18
|
+
compat: {
|
|
19
|
+
...model.compat,
|
|
20
|
+
supportsUsageInStreaming: model.compat?.supportsUsageInStreaming ?? true,
|
|
21
|
+
...thinkingFormat ? { thinkingFormat } : {}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function buildStaticDeepInfraProvider() {
|
|
26
|
+
return {
|
|
27
|
+
baseUrl: DEEPINFRA_BASE_URL,
|
|
28
|
+
api: "openai-completions",
|
|
29
|
+
models: DEEPINFRA_MODEL_CATALOG.map(buildDeepInfraModelDefinition)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { DEEPINFRA_DEFAULT_MODEL_REF, DEEPINFRA_MODEL_CATALOG, buildDeepInfraModelDefinition, buildStaticDeepInfraProvider };
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/deepinfra-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.4",
|
|
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.9.
|
|
21
|
+
"pluginApi": ">=2026.9.4"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.9.
|
|
24
|
+
"openclawVersion": "2026.9.4",
|
|
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.9.
|
|
41
|
+
"openclaw": ">=2026.9.4"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|