@flatkey-ai/cli 0.2.4 → 0.2.6
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/package.json +1 -1
- package/src/api.js +8 -2
- package/src/cli.js +2 -1
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -83,13 +83,15 @@ export function planVideoRequest(options) {
|
|
|
83
83
|
);
|
|
84
84
|
const resolution = validateOptionalValue(
|
|
85
85
|
options.resolution,
|
|
86
|
-
["480p", "720p", "1080p"],
|
|
86
|
+
isMiniMaxModel(model) ? ["768P", "2K"] : ["480p", "720p", "1080p"],
|
|
87
87
|
"resolution",
|
|
88
88
|
);
|
|
89
89
|
const basePayload = cleanObject({
|
|
90
90
|
model,
|
|
91
91
|
prompt: options.prompt,
|
|
92
|
-
duration:
|
|
92
|
+
duration: options.duration === undefined && isMiniMaxModel(model)
|
|
93
|
+
? 5
|
|
94
|
+
: parseOptionalInteger(options.duration),
|
|
93
95
|
aspect: ratio,
|
|
94
96
|
ratio,
|
|
95
97
|
resolution,
|
|
@@ -378,6 +380,10 @@ function isSeedanceModel(model) {
|
|
|
378
380
|
return /seedance/i.test(model);
|
|
379
381
|
}
|
|
380
382
|
|
|
383
|
+
function isMiniMaxModel(model) {
|
|
384
|
+
return /^minimax-h3$/i.test(model);
|
|
385
|
+
}
|
|
386
|
+
|
|
381
387
|
function buildSeedanceContent(options) {
|
|
382
388
|
const content = [];
|
|
383
389
|
if (options.prompt !== undefined) {
|
package/src/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
+
import { DEFAULT_BASE_URL } from "./api.js";
|
|
2
3
|
|
|
3
4
|
const COMMANDS = new Set([
|
|
4
5
|
"audio",
|
|
@@ -502,7 +503,7 @@ async function handleGenerate(command, deps) {
|
|
|
502
503
|
const options = {
|
|
503
504
|
...command.options,
|
|
504
505
|
apiKey,
|
|
505
|
-
baseUrl: routerOrigin,
|
|
506
|
+
baseUrl: routerOrigin ?? DEFAULT_BASE_URL,
|
|
506
507
|
tempMediaBaseUrl: tempMediaBaseUrl ?? DEFAULT_CONSOLE_URL,
|
|
507
508
|
env: deps.env ?? process.env,
|
|
508
509
|
fetch: deps.fetch,
|