@shop-os/modelkit 0.15.1 → 0.17.0
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/CHANGELOG.md +25 -0
- package/README.md +29 -2
- package/dist/catalog.cjs +90 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +30 -2
- package/dist/catalog.d.ts +30 -2
- package/dist/catalog.js +90 -1
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +413 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -2
- package/dist/index.d.ts +92 -2
- package/dist/index.js +408 -100
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,31 @@ header in the release PR.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.17.0] - Unreleased
|
|
13
|
+
|
|
14
|
+
Kling 4.0 Flash on fal (ENG-3743).
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- `kling-4.0-flash` (`kling/v4/flash`, aliases `kling-4-flash`, `kling-v4-flash`): routed like `kling-4.0` to `kling/v4/flash/{text,image,reference}-to-video` by its inputs. 720p only, 3-20 s (presets 5, 10, 15, 20). image-to-video takes a start frame and no end frame: the row does not support `lastFrame`, so the resolver drops one with an `option_ignored` warning and the planner refuses it; its prompt is optional there. Reference-to-video takes up to 10 images (the start frame included) and 5 videos of 3-20.05 s each, 20 s combined. Prompts up to 26,000 characters. No sound field.
|
|
18
|
+
- `kling-4.0-flash-edit` (`kling/v4/flash/video-to-video`, aliases `kling-4-flash-edit`, `kling-v4-flash-edit`): a 3-20.05 s source at 720p with up to 10 reference images and 4 reference videos (`video_urls`, which the Kling 4.0 edit does not take); the source and reference videos total 20 s at most (`sourceVideoSeconds.inReferenceTotal`). No duration renders and bills the source's length; a set 3-20 s bills that.
|
|
19
|
+
|
|
20
|
+
## [0.16.0] - Unreleased
|
|
21
|
+
|
|
22
|
+
Customer provider keys per call (BYOK, ENG-3403).
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- `CallContext.keyOverride`: a workspace's own provider keys for one call. A required name it holds is used instead of the tier's key and never falls back to it; the other names resolve through `tier` as before (a `sloosh` call still fails with `auth` for a name neither holds). Blank values count as absent, Higgsfield counts only as the key + secret pair, and `aws` is ignored (no BYOK for Bedrock). Such a call goes direct to the provider, never through the Cloudflare gateway, and a customer `anthropic` key always uses the Anthropic API. `resumeVideo`, video-tool and 3D jobs use it too.
|
|
26
|
+
- `CallContext.requireOverride`: set it on a call billed at the customer-key price. When no required key name of the call comes from `keyOverride` (missing, blank, or for another provider), the call throws a `ModelKitError` code `byok_key_missing` (`retryable: false`, with `provider` and `model`) before any provider request, so it never runs on our key. Image, video, resume, audio, video-tool, 3D, text and language-model handles all check it; a model outside the catalog always throws, since the kit resolves no key for it.
|
|
27
|
+
- `ModelKitErrorCode` `"byok_key_missing"`. It is never retried and is not a provider auth failure: the customer's key was never sent, so a caller must not record a key status for it.
|
|
28
|
+
- `UsageEvent.keySource` (`"pro" | "enterprise" | "sloosh" | "byok"`) on every usage event of a catalog call: `"byok"` when any required key came from the override, else the tier that served (an enterprise fallback is `"pro"`).
|
|
29
|
+
- `byok.ts`: `BYOK_PROVIDERS` (ark, fal, replicate, openai, google), `byokProviderForModel`, `modelsPoweredBy`, `keyOverrideFor`, and `testProviderKey`, which checks a key with one free, read-only request.
|
|
30
|
+
- `testProviderKey` returns `{ ok: true, credit }`; `credit` is `"unknown"` from every current probe (they prove the key, not a balance), so a caller must not treat a passing test as proof of credit. It takes `endpoints` and probes Ark at `endpoints.ark` (the adapter's default when unset). OpenAI and Google 403 on the models list is `unverifiable`, not `denied` (a restricted key can still generate); 401 stays `invalid`.
|
|
31
|
+
- `keyOverrideFor` and `testProviderKey` accept a stored secret with no `apiKey`: the first leaves the provider out, the second answers `invalid` without a request.
|
|
32
|
+
- `LanguageModelHandle.keySource`, the same value `generateText` and `streamText` stamp on usage.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- Ark errors read BytePlus `error.code`, also on a failed task: 403 `AccountOverdueError` / `OperationDenied.ServiceOverdue` and 429 `QuotaExceeded` are `provider_billing` (not retried; a quota 429 while polling fails at once instead of polling into the timeout); 404 `ModelNotOpen` / `InvalidEndpointOrModel.NotFound` are `provider_rejected` with the code in the message. A plain 403 stays `auth`, other 429s `rate_limited`.
|
|
36
|
+
|
|
12
37
|
## [0.15.1] - Unreleased
|
|
13
38
|
|
|
14
39
|
Model names and descriptions now match what each row offers (ENG-3364). The stored `model_catalog` rows are seeded once and never updated, so each environment needs the same edits in pro-admin; the PR lists them.
|
package/README.md
CHANGED
|
@@ -117,6 +117,33 @@ row for each. All three are in the browser-safe catalog entry.
|
|
|
117
117
|
|
|
118
118
|
Keys come from `process.env` by default: bare names for pro (`OPENAI_API_KEY`, `FAL_KEY`, `BYTEDANCE_API_KEY`, `LUMA_API_KEY` ...), the `ENTERPRISE_` prefix for enterprise and the `SLOOSH_` prefix for sloosh (sloosh reads `SLOOSH_LUMA_API_KEY` for Luma). Pass `keys: { pro, enterprise, sloosh }` to override. `tier: "sloosh"` uses the sloosh keys only: a missing key is a `ModelKitError` with code `auth`, never a fallback to pro.
|
|
119
119
|
|
|
120
|
+
## Customer keys (BYOK)
|
|
121
|
+
|
|
122
|
+
`CallContext.keyOverride` (0.16.0) carries a workspace's own provider keys for one call:
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
const override = keyOverrideFor(storedSecrets); // { ark?: string, fal?: string, ... }
|
|
126
|
+
await kit.generateVideo({ model: "seedance-2.0", prompt }, { tier, keyOverride: override });
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- A required key name the override holds is taken from it and **never** falls back to a tier key. Names it does not hold resolve through `tier` as before, so a `sloosh` call still fails with `auth` for a name neither holds. A blank value counts as absent.
|
|
130
|
+
- Higgsfield counts only as the key + secret pair. `aws` is ignored: BYOK never covers Bedrock, and a customer `anthropic` key always means the Anthropic API.
|
|
131
|
+
- A call served from the override goes direct to the provider, never through the Cloudflare gateway (whose stored secrets are the pro keys), like a sloosh call.
|
|
132
|
+
- `requireOverride: true` marks a call billed at the customer-key price. When no required key name comes from the override (missing, blank, or for another provider), the call throws `ModelKitError` code `byok_key_missing` (`retryable: false`, with `provider` and `model`) before any provider request, instead of running on our key. Every catalog method checks it, including `resumeVideo`, video-tool and 3D status/result/cancel, text and `languageModel`; a pass-through provider instance always throws. `byok_key_missing` says nothing about the customer's key, so never record a key status for it.
|
|
133
|
+
- Every usage event of a catalog call carries `keySource`: `"byok"` when any required key came from the override, else the tier that served (`"pro"`, `"enterprise"`, `"sloosh"`; an enterprise call that fell back to pro reports `"pro"`). Pass-through provider instances carry none. No key material goes into events, errors or logs.
|
|
134
|
+
|
|
135
|
+
The registry (`byok.ts`) serves a Settings page:
|
|
136
|
+
|
|
137
|
+
| Export | Use |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| `BYOK_PROVIDERS` | `ark` (BytePlus ModelArk), `fal`, `replicate`, `openai`, `google`: label, the kit key name, and the fields to store. Ark also takes optional `accessKeyId`, `secretAccessKey`, `assetGroupId` for the BytePlus asset API (verified assets), which the consumer calls itself; the kit uses only `apiKey`. |
|
|
140
|
+
| `byokProviderForModel(row)` | The provider whose key runs a row, from its adapter (`ADAPTER_KEYS`) or, for text rows, the vendor. Claude, Bedrock and every other provider give `null`. |
|
|
141
|
+
| `modelsPoweredBy(provider, rows)` | The rows that key runs ("Powers N models"). |
|
|
142
|
+
| `keyOverrideFor(secrets)` | Stored secrets to a `keyOverride`; blank or missing keys are left out (an Ark row with only the asset fields gives no `ark`). |
|
|
143
|
+
| `testProviderKey(provider, secret, { fetch, signal, endpoints })` | One free, read-only GET: `{ ok: true, credit }` or `{ ok: false, reason }`. 400/401 or no `apiKey` `invalid`, 402/403 `denied`, 429/5xx/network `unreachable`; a caller abort rethrows. Pass the kit's `config.endpoints` so the Ark probe uses the same base url as the adapter. `credit` is `"unknown"` from every current probe: they prove the key, not a balance, so never read `ok` as "the account has credit". |
|
|
144
|
+
|
|
145
|
+
Probes: Ark `GET /api/v3/contents/generations/tasks?page_num=1&page_size=1`, OpenAI `GET /v1/models`, Google `GET /v1beta/models` (key in the `x-goog-api-key` header, never in the URL), Replicate `GET /v1/account`, fal `GET https://api.fal.ai/v1/assets/collections?limit=1`. fal's `/v1/models` answers 200 for any key, so it proves nothing; the assets list needs `assets:read`, which the `API` preset holds. A fal key with a narrower custom policy gets 403 there, reported as `unverifiable`. OpenAI and Google 403 on the models list is `unverifiable` too: a restricted OpenAI key (Images write only) gets 403 there yet runs gpt-image. 401 stays `invalid`.
|
|
146
|
+
|
|
120
147
|
## Browser-safe catalog
|
|
121
148
|
|
|
122
149
|
```ts
|
|
@@ -220,7 +247,7 @@ Opt into thinking per call, for example
|
|
|
220
247
|
`providerOptions: { anthropic: { thinking: { type: "enabled", budgetTokens: 4000 } } }`.
|
|
221
248
|
|
|
222
249
|
The kit keeps its `Warning` type for coercions; the SDK's warning type is `AiWarning`.
|
|
223
|
-
`languageModel()` remains the low-level handle for Mastra and custom middleware; its `providerOptions` carry no kit-internal keys.
|
|
250
|
+
`languageModel()` remains the low-level handle for Mastra and custom middleware; its `providerOptions` carry no kit-internal keys. A caller that emits its own usage events takes `provider` from `handle.usageProvider` and `keySource` from `handle.keySource` (`"byok"` when the model runs on the call's `keyOverride`).
|
|
224
251
|
|
|
225
252
|
## Anthropic on Bedrock
|
|
226
253
|
|
|
@@ -314,7 +341,7 @@ const defaultKit = createDefaultModelKit({ keys: { pro: keysFromEnv(process.env)
|
|
|
314
341
|
| Keys | Enterprise keys win only when every key the adapter (and its route, e.g. the cloudflare token for a vendor that really goes through the gateway) needs is set on the enterprise tier; a fallback to pro keys is logged once per call. |
|
|
315
342
|
| Routing | Cloudflare AI Gateway for text only. Never for Gemini images or Omni. fal passthrough for geo-blocked regions; the fal direct route submits to the queue and polls, so `job.result({ timeoutMs, signal })` is live. |
|
|
316
343
|
| Retry | One classifier, one policy. Never on content blocks, aborts, or 4xx except 429; SDKs with their own retry (Replicate) run under a single kit attempt; a 429 on a status poll keeps polling unless `CallContext.maxRetries` is `0`. See durable media execution above. |
|
|
317
|
-
| Errors | `ModelKitError` with `code`, `provider`, `status`, `body`. Gemini `blockReason` and fal `body.detail` are lifted into `body`. A throw with no HTTP status (fetch failed, reset, DNS) is a retryable `network` error on every adapter. An out-of-credit provider account is `provider_billing` and is never retried: HTTP 402, a 4xx whose structured error code is a billing code (`insufficient_quota`, ...), or a 403/429 whose text names the exhausted account ("Exhausted balance", "Insufficient credit"). Text calls go through `ai` and surface the SDK's own error instead. |
|
|
344
|
+
| Errors | `ModelKitError` with `code`, `provider`, `status`, `body`. Gemini `blockReason` and fal `body.detail` are lifted into `body`. A throw with no HTTP status (fetch failed, reset, DNS) is a retryable `network` error on every adapter. An out-of-credit provider account is `provider_billing` and is never retried: HTTP 402, a 4xx whose structured error code is a billing code (`insufficient_quota`, ...), or a 403/429 whose text names the exhausted account ("Exhausted balance", "Insufficient credit"). BytePlus Ark codes win over the status (body `{"error":{"code","message","type"}}`, and a failed task's `error.code`): 403 `AccountOverdueError` / `OperationDenied.ServiceOverdue` and 429 `QuotaExceeded` are `provider_billing`; 404 `ModelNotOpen` / `InvalidEndpointOrModel.NotFound` are `provider_rejected` with the code in the message; a plain 403 stays `auth` and another 429 `rate_limited`. Text calls go through `ai` and surface the SDK's own error instead. |
|
|
318
345
|
| Usage | One event per call with the canonical model id and the row's `usage.unit` (adapters supply the quantity in that unit). Gemini image events carry the token counts too (`inputTokens`/`outputTokens`); Google's raw `usageMetadata` rides on `raw.providerMetadata.google`. Video usage is emitted on completion and carries the resolution the provider renders (the default it falls back to when the request has none), because pricing is keyed by it; Seedance keeps `usage`, `duration`, `framespersecond` and `resolution` from the poll on `raw`. Audio: Lyria 3 returns no duration, so it emits `unit: "images", quantity: 1` (token counts ride along as `inputTokens`/`outputTokens`); Replicate audio (Lyria 2, MMAudio) emits `unit: "compute_seconds"` with the prediction time. |
|
|
319
346
|
| Media parts | `prepareMediaPart` turns a `MediaRef` into an AI SDK file part. Google inlines bytes up to 10 MiB (base64 makes them ~4/3 larger inside Gemini's 20 MB request cap) and uploads larger payloads through the Files API; call the returned `cleanup` after the request. Other providers get the reference inline. |
|
|
320
347
|
|
package/dist/catalog.cjs
CHANGED
|
@@ -5149,6 +5149,7 @@ var KLING_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
|
|
|
5149
5149
|
var H3_PROMPT = { referenceSyntax: "numbered", maxChars: 5e4 };
|
|
5150
5150
|
var KLING_V4_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
|
|
5151
5151
|
var KLING_V4_AUDIO = "always";
|
|
5152
|
+
var KLING_V4_FLASH_PROMPT = { referenceSyntax: "numbered", maxChars: 26e3 };
|
|
5152
5153
|
var NO_REFERENCES = { images: 0, videos: 0, audios: 0 };
|
|
5153
5154
|
function klingMotionControl(tier) {
|
|
5154
5155
|
const label = tier === "pro" ? "Pro" : "Standard";
|
|
@@ -5326,6 +5327,85 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5326
5327
|
},
|
|
5327
5328
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5328
5329
|
},
|
|
5330
|
+
{
|
|
5331
|
+
// https://fal.ai/models/kling/v4/flash/reference-to-video/api (+ /text-to-video,
|
|
5332
|
+
// /image-to-video): routed like kling-4.0, at 720p only and 3-20 s. image-to-video takes
|
|
5333
|
+
// a start frame (300 px min, ratio 0.40-2.50) and no end frame; its prompt is optional.
|
|
5334
|
+
// Reference images: 10, the start frame included. Reference videos: 5, 3-20.05 s each
|
|
5335
|
+
// and 20 s combined, 700 px min. Prompts up to 26,000 characters. No sound switch.
|
|
5336
|
+
id: "kling-4.0-flash",
|
|
5337
|
+
aliases: ["kling-4-flash", "kling-v4-flash"],
|
|
5338
|
+
label: "Kling 4.0 Flash",
|
|
5339
|
+
type: "video",
|
|
5340
|
+
adapter: "fal",
|
|
5341
|
+
providerModelId: "kling/v4/flash",
|
|
5342
|
+
lifecycle: "active",
|
|
5343
|
+
exposure: ["cowork", "space_builder"],
|
|
5344
|
+
constraints: {
|
|
5345
|
+
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5346
|
+
resolutions: ["720p"],
|
|
5347
|
+
durations: { min: 3, max: 20 },
|
|
5348
|
+
durationPresets: [5, 10, 15, 20],
|
|
5349
|
+
references: {
|
|
5350
|
+
...NO_REFERENCES,
|
|
5351
|
+
images: 10,
|
|
5352
|
+
videos: 5,
|
|
5353
|
+
videoSeconds: { min: 3, max: 20.05, total: 20 },
|
|
5354
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5355
|
+
},
|
|
5356
|
+
supports: [],
|
|
5357
|
+
prompt: KLING_V4_FLASH_PROMPT,
|
|
5358
|
+
audio: KLING_V4_AUDIO
|
|
5359
|
+
},
|
|
5360
|
+
defaults: { durationSeconds: 5, resolution: "720p", aspectRatio: "16:9" },
|
|
5361
|
+
usage: { ...VIDEO_USAGE },
|
|
5362
|
+
pricingKind: "video_per_second",
|
|
5363
|
+
display: {
|
|
5364
|
+
provider: "kuaishou",
|
|
5365
|
+
logo: KLING_LOGO,
|
|
5366
|
+
description: "Kuaishou Kling 4.0 Flash: fast text-to-video, a start frame, or reference-to-video from up to 10 images and 5 videos (20 seconds combined), 3 to 20 seconds at 720p. Prompts name references @Image1, @Video1."
|
|
5367
|
+
}
|
|
5368
|
+
},
|
|
5369
|
+
{
|
|
5370
|
+
// https://fal.ai/models/kling/v4/flash/video-to-video/api: source 3-20.05 s (700 px
|
|
5371
|
+
// min, 23.9-60.05 fps), up to 10 reference images and 4 reference videos; the source
|
|
5372
|
+
// and reference videos total 20 s at most. duration 3-20, or left out for the source's
|
|
5373
|
+
// length. The prompt names the source @Video1, reference videos @Video2 on, images @Image1.
|
|
5374
|
+
id: "kling-4.0-flash-edit",
|
|
5375
|
+
aliases: ["kling-4-flash-edit", "kling-v4-flash-edit"],
|
|
5376
|
+
label: "Kling 4.0 Flash Edit",
|
|
5377
|
+
type: "video",
|
|
5378
|
+
adapter: "fal",
|
|
5379
|
+
providerModelId: "kling/v4/flash/video-to-video",
|
|
5380
|
+
lifecycle: "active",
|
|
5381
|
+
exposure: ["cowork", "space_builder"],
|
|
5382
|
+
constraints: {
|
|
5383
|
+
resolutions: ["720p"],
|
|
5384
|
+
durations: { min: 3, max: 20 },
|
|
5385
|
+
references: {
|
|
5386
|
+
...NO_REFERENCES,
|
|
5387
|
+
images: 10,
|
|
5388
|
+
videos: 4,
|
|
5389
|
+
videoSeconds: { min: 3, max: 20.05, total: 20 },
|
|
5390
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5391
|
+
},
|
|
5392
|
+
requires: ["sourceVideo"],
|
|
5393
|
+
sourceVideoSeconds: { min: 3, max: 20.05, inReferenceTotal: true },
|
|
5394
|
+
sourceVideoPixels: { minWidth: 700, minHeight: 700 },
|
|
5395
|
+
supports: [],
|
|
5396
|
+
prompt: KLING_V4_FLASH_PROMPT,
|
|
5397
|
+
audio: KLING_V4_AUDIO
|
|
5398
|
+
},
|
|
5399
|
+
defaults: { resolution: "720p" },
|
|
5400
|
+
usage: { ...VIDEO_USAGE },
|
|
5401
|
+
pricingKind: "video_per_second",
|
|
5402
|
+
display: {
|
|
5403
|
+
provider: "kuaishou",
|
|
5404
|
+
logo: KLING_LOGO,
|
|
5405
|
+
description: "Kuaishou Kling 4.0 Flash video edit: change a 3-20 second clip with a prompt, up to 10 reference images and 4 reference videos (20 seconds in all with the source), at 720p, as long as the source or a set 3-20 seconds. Prompts name the source @Video1."
|
|
5406
|
+
},
|
|
5407
|
+
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5408
|
+
},
|
|
5329
5409
|
{
|
|
5330
5410
|
// https://fal.ai/models/minimax/h3-max-turbo/text-to-video/api (+ /image-to-video).
|
|
5331
5411
|
// image-to-video takes a start frame, an end frame, or both, and no aspect_ratio.
|
|
@@ -9085,6 +9165,8 @@ var O3_REFERENCE = "fal-ai/kling-video/o3/pro/reference-to-video";
|
|
|
9085
9165
|
var O3_EDIT = "fal-ai/kling-video/o3/pro/video-to-video/edit";
|
|
9086
9166
|
var KLING_V4 = "kling/v4";
|
|
9087
9167
|
var KLING_V4_EDIT = "kling/v4/video-to-video/edit";
|
|
9168
|
+
var KLING_V4_FLASH = "kling/v4/flash";
|
|
9169
|
+
var KLING_V4_FLASH_EDIT = "kling/v4/flash/video-to-video";
|
|
9088
9170
|
var H3_TURBO = "minimax/h3-max-turbo";
|
|
9089
9171
|
var H3_RECAST = "minimax/h3-max/recast";
|
|
9090
9172
|
var H3_RELIGHT = "minimax/h3-max/relight";
|
|
@@ -9166,6 +9248,11 @@ function klingV4(req) {
|
|
|
9166
9248
|
}
|
|
9167
9249
|
return needsPrompt(req);
|
|
9168
9250
|
}
|
|
9251
|
+
function klingV4Flash(req) {
|
|
9252
|
+
if (req.lastFrame !== void 0) return unsupported2("takes no end frame");
|
|
9253
|
+
if (!hasReferences(req) && req.firstFrame !== void 0) return void 0;
|
|
9254
|
+
return klingV4(req);
|
|
9255
|
+
}
|
|
9169
9256
|
function h3Turbo(req) {
|
|
9170
9257
|
if (count(req.referenceImages) + count(req.referenceVideos) > 0) {
|
|
9171
9258
|
return unsupported2("takes no reference images or videos");
|
|
@@ -9246,6 +9333,8 @@ var RULES = /* @__PURE__ */ new Map([
|
|
|
9246
9333
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9247
9334
|
[KLING_V4, klingV4],
|
|
9248
9335
|
[KLING_V4_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9336
|
+
[KLING_V4_FLASH, klingV4Flash],
|
|
9337
|
+
[KLING_V4_FLASH_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9249
9338
|
[H3_TURBO, h3Turbo],
|
|
9250
9339
|
[MINIMAX_H3_INSERT, h3Insert],
|
|
9251
9340
|
[H3_RECAST, h3Recast],
|
|
@@ -9295,7 +9384,7 @@ function applyFalVideoRules(model, req, callerRatio, warnings) {
|
|
|
9295
9384
|
warnings.push(viduSilentWarning(model));
|
|
9296
9385
|
req.generateAudio = false;
|
|
9297
9386
|
}
|
|
9298
|
-
if (id === KLING_V4 && req.firstFrame !== void 0 && !hasReferences(req)) {
|
|
9387
|
+
if ((id === KLING_V4 || id === KLING_V4_FLASH) && req.firstFrame !== void 0 && !hasReferences(req)) {
|
|
9299
9388
|
if (req.aspectRatio !== void 0) {
|
|
9300
9389
|
if (callerRatio !== void 0) {
|
|
9301
9390
|
warnings.push({
|