@openclaw/pixverse-provider 2026.9.1-beta.1 → 2026.9.1
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,6 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_PIXVERSE_REGION, PIXVERSE_BASE_URL_BY_REGION, PIXVERSE_PROVIDER_ID } from "./constants.js";
|
|
2
2
|
import { asFiniteNumber, asSafeIntegerInRange, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { bufferToBlobPart } from "openclaw/plugin-sdk/blob-runtime";
|
|
4
5
|
import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
5
6
|
import { isProviderApiKeyConfigured } from "openclaw/plugin-sdk/provider-auth";
|
|
6
7
|
import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime";
|
|
@@ -34,7 +35,8 @@ function resolvePixVerseBaseUrl(req) {
|
|
|
34
35
|
const provider = req.cfg?.models?.providers?.[PIXVERSE_PROVIDER_ID];
|
|
35
36
|
const configuredBaseUrl = normalizeOptionalString(provider?.baseUrl);
|
|
36
37
|
if (configuredBaseUrl) return configuredBaseUrl;
|
|
37
|
-
|
|
38
|
+
const region = resolvePixVerseApiRegion(provider?.region);
|
|
39
|
+
return PIXVERSE_BASE_URL_BY_REGION[region];
|
|
38
40
|
}
|
|
39
41
|
function resolvePixVerseApiRegion(value) {
|
|
40
42
|
const region = normalizeOptionalString(value)?.toLowerCase();
|
|
@@ -129,9 +131,8 @@ function buildUploadImageForm(asset) {
|
|
|
129
131
|
const mimeType = normalizeOptionalString(asset.mimeType) ?? "image/png";
|
|
130
132
|
const extension = extensionForMime(mimeType)?.slice(1) ?? "png";
|
|
131
133
|
const fileName = normalizeOptionalString(asset.fileName) ?? `image.${extension}`;
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
form.set("image", new File([bytes], fileName, { type: mimeType }));
|
|
134
|
+
const file = new File([bufferToBlobPart(asset.buffer)], fileName, { type: mimeType });
|
|
135
|
+
form.set("image", file);
|
|
135
136
|
return form;
|
|
136
137
|
}
|
|
137
138
|
function buildVideoBody(req, model, imageId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/pixverse-provider",
|
|
3
|
-
"version": "2026.9.1
|
|
3
|
+
"version": "2026.9.1",
|
|
4
4
|
"description": "OpenClaw PixVerse video generation provider plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"openclaw": ">=2026.9.1
|
|
11
|
+
"openclaw": ">=2026.9.1"
|
|
12
12
|
},
|
|
13
13
|
"peerDependenciesMeta": {
|
|
14
14
|
"openclaw": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"minHostVersion": ">=2026.5.26"
|
|
27
27
|
},
|
|
28
28
|
"compat": {
|
|
29
|
-
"pluginApi": ">=2026.9.1
|
|
29
|
+
"pluginApi": ">=2026.9.1"
|
|
30
30
|
},
|
|
31
31
|
"build": {
|
|
32
|
-
"openclawVersion": "2026.9.1
|
|
32
|
+
"openclawVersion": "2026.9.1",
|
|
33
33
|
"bundledDist": false
|
|
34
34
|
},
|
|
35
35
|
"release": {
|