@openclaw/deepinfra-provider 2026.7.2-beta.7 → 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.
@@ -1,13 +1,9 @@
1
- import { applyAnthropicEphemeralCacheControlMarkers, streamWithPayloadPatch } from "openclaw/plugin-sdk/provider-stream";
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 ((model, context, options) => {
5
- const modelIdRaw = model.id;
6
- if (!(typeof modelIdRaw === "string" ? modelIdRaw.toLowerCase() : "").startsWith("anthropic/")) return baseStreamFn(model, context, options);
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
1
  import { t as modelCatalog } from "./openclaw.plugin-DomWf43f.js";
2
- import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor";
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 { applyAgentDefaultModelPrimary } from "openclaw/plugin-sdk/provider-onboard";
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
- const models = { ...cfg.agents?.defaults?.models };
6
- models[modelRef] = {
7
- ...models[modelRef],
8
- alias: models[modelRef]?.alias ?? "DeepInfra"
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 };
@@ -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 { asObject, createOpenAiCompatibleSpeechProvider } from "openclaw/plugin-sdk/speech";
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: asObject(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: ({ agentDir }) => isProviderApiKeyConfigured({
92
+ isConfigured: (ctx) => isProviderApiKeyConfigured({
93
93
  provider: "deepinfra",
94
- agentDir
94
+ ...ctx
95
95
  }),
96
96
  capabilities: {
97
97
  generate: {
@@ -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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/deepinfra-provider",
3
- "version": "2026.7.2-beta.7",
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.7.2-beta.7"
21
+ "pluginApi": ">=2026.8.1-beta.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.7.2-beta.7",
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.7.2-beta.7"
41
+ "openclaw": ">=2026.8.1-beta.2"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "openclaw": {