@nodaro/shared 3.56.0 → 3.58.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/dist/{chunk-PFXPAWPQ.cjs → chunk-4UUX62S3.cjs} +12 -12
- package/dist/{chunk-PFXPAWPQ.cjs.map → chunk-4UUX62S3.cjs.map} +1 -1
- package/dist/{chunk-CGZLENU4.cjs → chunk-4ZZ6SVIQ.cjs} +90 -6
- package/dist/chunk-4ZZ6SVIQ.cjs.map +1 -0
- package/dist/{chunk-33P5FI2U.cjs → chunk-5PJC4ZWO.cjs} +6 -6
- package/dist/{chunk-33P5FI2U.cjs.map → chunk-5PJC4ZWO.cjs.map} +1 -1
- package/dist/{chunk-TSKYEREJ.cjs → chunk-5UVBFY2G.cjs} +11 -11
- package/dist/{chunk-TSKYEREJ.cjs.map → chunk-5UVBFY2G.cjs.map} +1 -1
- package/dist/{chunk-2AR3OXAA.js → chunk-6CYS7VRH.js} +89 -7
- package/dist/chunk-6CYS7VRH.js.map +1 -0
- package/dist/{chunk-4O5STV7N.js → chunk-6TFWFYYI.js} +3 -3
- package/dist/{chunk-4O5STV7N.js.map → chunk-6TFWFYYI.js.map} +1 -1
- package/dist/{chunk-DURFRWAW.js → chunk-A5ESI2NY.js} +8 -8
- package/dist/{chunk-DURFRWAW.js.map → chunk-A5ESI2NY.js.map} +1 -1
- package/dist/{chunk-62ZQQA7L.js → chunk-BSENM6HM.js} +3 -3
- package/dist/{chunk-62ZQQA7L.js.map → chunk-BSENM6HM.js.map} +1 -1
- package/dist/{chunk-RX7WII6I.js → chunk-CNSRCZYY.js} +5 -5
- package/dist/{chunk-RX7WII6I.js.map → chunk-CNSRCZYY.js.map} +1 -1
- package/dist/{chunk-2J6NTA5I.js → chunk-DC2QPACA.js} +5 -5
- package/dist/chunk-DC2QPACA.js.map +1 -0
- package/dist/{chunk-HWJE4FNS.cjs → chunk-DCP7JFSE.cjs} +5 -5
- package/dist/{chunk-HWJE4FNS.cjs.map → chunk-DCP7JFSE.cjs.map} +1 -1
- package/dist/{chunk-AZDVL7IM.js → chunk-HEUWAIXG.js} +6 -6
- package/dist/chunk-HEUWAIXG.js.map +1 -0
- package/dist/{chunk-JO3XSUO2.cjs → chunk-I7NG2D6X.cjs} +21 -21
- package/dist/{chunk-JO3XSUO2.cjs.map → chunk-I7NG2D6X.cjs.map} +1 -1
- package/dist/{chunk-FCQYMPUQ.cjs → chunk-IKOKRJDI.cjs} +4 -4
- package/dist/{chunk-FCQYMPUQ.cjs.map → chunk-IKOKRJDI.cjs.map} +1 -1
- package/dist/{chunk-ZYITB47P.js → chunk-IQBIH3AE.js} +3 -3
- package/dist/{chunk-ZYITB47P.js.map → chunk-IQBIH3AE.js.map} +1 -1
- package/dist/{chunk-55FQBILM.js → chunk-JUEFRVHZ.js} +4 -4
- package/dist/{chunk-55FQBILM.js.map → chunk-JUEFRVHZ.js.map} +1 -1
- package/dist/{chunk-4ONS6QRT.js → chunk-K6UMB37V.js} +3 -3
- package/dist/{chunk-4ONS6QRT.js.map → chunk-K6UMB37V.js.map} +1 -1
- package/dist/{chunk-IKP4GOWZ.cjs → chunk-KYHDKKUJ.cjs} +8 -8
- package/dist/{chunk-IKP4GOWZ.cjs.map → chunk-KYHDKKUJ.cjs.map} +1 -1
- package/dist/{chunk-7DGJDISO.js → chunk-L26G7B27.js} +3 -3
- package/dist/{chunk-7DGJDISO.js.map → chunk-L26G7B27.js.map} +1 -1
- package/dist/{chunk-JHTYULY2.js → chunk-M7SMSAOU.js} +4 -4
- package/dist/{chunk-JHTYULY2.js.map → chunk-M7SMSAOU.js.map} +1 -1
- package/dist/{chunk-6GGHM33Z.js → chunk-ODTZV3BW.js} +4 -4
- package/dist/{chunk-6GGHM33Z.js.map → chunk-ODTZV3BW.js.map} +1 -1
- package/dist/{chunk-MROKQP4U.js → chunk-OMUYZKRB.js} +3 -3
- package/dist/{chunk-MROKQP4U.js.map → chunk-OMUYZKRB.js.map} +1 -1
- package/dist/{chunk-AKDJKMAL.cjs → chunk-PK4ZR2SK.cjs} +4 -4
- package/dist/{chunk-AKDJKMAL.cjs.map → chunk-PK4ZR2SK.cjs.map} +1 -1
- package/dist/chunk-QCW6J6BQ.cjs +27 -0
- package/dist/chunk-QCW6J6BQ.cjs.map +1 -0
- package/dist/{chunk-ZXDH3L3P.cjs → chunk-QPBBIRLF.cjs} +40 -39
- package/dist/{chunk-ZXDH3L3P.cjs.map → chunk-QPBBIRLF.cjs.map} +1 -1
- package/dist/{chunk-ILMHITHK.cjs → chunk-QVPIO2NU.cjs} +5 -5
- package/dist/{chunk-ILMHITHK.cjs.map → chunk-QVPIO2NU.cjs.map} +1 -1
- package/dist/{chunk-EWARI452.cjs → chunk-S5VBJJUT.cjs} +46 -46
- package/dist/chunk-S5VBJJUT.cjs.map +1 -0
- package/dist/{chunk-ST4WQ6ND.js → chunk-SEQ5L72K.js} +52 -11
- package/dist/chunk-SEQ5L72K.js.map +1 -0
- package/dist/{chunk-EAKO7PGC.js → chunk-VVGSIWNL.js} +5 -4
- package/dist/{chunk-EAKO7PGC.js.map → chunk-VVGSIWNL.js.map} +1 -1
- package/dist/{chunk-O7DXNX5J.cjs → chunk-VZXRDSWA.cjs} +74 -28
- package/dist/chunk-VZXRDSWA.cjs.map +1 -0
- package/dist/{chunk-WKCFTWLO.cjs → chunk-WBERPAXE.cjs} +6 -6
- package/dist/{chunk-WKCFTWLO.cjs.map → chunk-WBERPAXE.cjs.map} +1 -1
- package/dist/{chunk-H7VMJBNZ.cjs → chunk-WLFT5UVV.cjs} +8 -8
- package/dist/{chunk-H7VMJBNZ.cjs.map → chunk-WLFT5UVV.cjs.map} +1 -1
- package/dist/{chunk-4JODLC2N.js → chunk-ZMH56CLL.js} +3 -3
- package/dist/{chunk-4JODLC2N.js.map → chunk-ZMH56CLL.js.map} +1 -1
- package/dist/{chunk-CLKU3ZIU.cjs → chunk-ZX6RRM6R.cjs} +43 -43
- package/dist/{chunk-CLKU3ZIU.cjs.map → chunk-ZX6RRM6R.cjs.map} +1 -1
- package/dist/entries/apps.cjs +42 -42
- package/dist/entries/apps.js +7 -7
- package/dist/entries/credits.cjs +150 -150
- package/dist/entries/credits.d.cts +1 -1
- package/dist/entries/credits.d.ts +1 -1
- package/dist/entries/credits.js +7 -7
- package/dist/entries/llm-models.d.cts +1 -1
- package/dist/entries/llm-models.d.ts +1 -1
- package/dist/entries/model-catalog.cjs +76 -68
- package/dist/entries/model-catalog.d.cts +2 -2
- package/dist/entries/model-catalog.d.ts +2 -2
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +303 -283
- package/dist/entries/models.d.cts +3 -3
- package/dist/entries/models.d.ts +3 -3
- package/dist/entries/models.js +4 -4
- package/dist/entries/nodes.cjs +206 -206
- package/dist/entries/nodes.d.cts +1 -1
- package/dist/entries/nodes.d.ts +1 -1
- package/dist/entries/nodes.js +8 -8
- package/dist/entries/pipeline.cjs +152 -152
- package/dist/entries/pipeline.d.cts +1 -1
- package/dist/entries/pipeline.d.ts +1 -1
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +117 -117
- package/dist/entries/video.js +4 -4
- package/dist/index.cjs +1093 -1065
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -17
- package/dist/{model-catalog-vQ3NWn24.d.cts → model-catalog-CCsA1isC.d.cts} +58 -13
- package/dist/{model-catalog-vQ3NWn24.d.ts → model-catalog-CCsA1isC.d.ts} +58 -13
- package/dist/{model-constants-QZVHZX25.d.ts → model-constants-BtXkUsX3.d.cts} +36 -9
- package/dist/{model-constants-QZVHZX25.d.cts → model-constants-BtXkUsX3.d.ts} +36 -9
- package/package.json +1 -1
- package/src/__tests__/auto-aspect-source.test.ts +93 -0
- package/src/__tests__/gvp-supported-providers.test.ts +2 -0
- package/src/__tests__/normalize-model-input.test.ts +62 -8
- package/src/__tests__/resolutions-by-aspect-ratio.test.ts +134 -0
- package/src/__tests__/seedance-25-catalog-modes.test.ts +35 -0
- package/src/__tests__/video-frame-slot.test.ts +5 -0
- package/src/credit-identifiers.ts +3 -1
- package/src/entries/model-catalog.ts +2 -0
- package/src/entries/models.ts +5 -0
- package/src/model-catalog.ts +161 -20
- package/src/model-constants.ts +79 -7
- package/src/node-default-mappings.ts +1 -0
- package/src/video-ui-defaults.ts +2 -1
- package/dist/chunk-2AR3OXAA.js.map +0 -1
- package/dist/chunk-2J6NTA5I.js.map +0 -1
- package/dist/chunk-AZDVL7IM.js.map +0 -1
- package/dist/chunk-CGZLENU4.cjs.map +0 -1
- package/dist/chunk-EWARI452.cjs.map +0 -1
- package/dist/chunk-O7DXNX5J.cjs.map +0 -1
- package/dist/chunk-ST4WQ6ND.js.map +0 -1
- package/dist/chunk-XPUGMYAJ.cjs +0 -27
- package/dist/chunk-XPUGMYAJ.cjs.map +0 -1
package/src/model-constants.ts
CHANGED
|
@@ -226,6 +226,19 @@ export const PROMPT_HARD_CEILING = 30000
|
|
|
226
226
|
*/
|
|
227
227
|
export const LLM_TEXT_INPUT_MAX = 100_000
|
|
228
228
|
|
|
229
|
+
/**
|
|
230
|
+
* Ceiling for the `system` prompt of the structured-output routes
|
|
231
|
+
* (`POST /v1/llm/structured` and `POST /v1/llm/structured/jobs`). A client
|
|
232
|
+
* that has the model write in its own vocabulary sends that vocabulary as the
|
|
233
|
+
* system prompt, and it grows with the client's catalogs (Nodaro Studio's
|
|
234
|
+
* production format is close to 100,000 chars), so this is twice
|
|
235
|
+
* {@link LLM_TEXT_INPUT_MAX}. The routes' `input`, and every other LLM text
|
|
236
|
+
* field, stay at LLM_TEXT_INPUT_MAX. 200,000 chars is roughly 50,000 to
|
|
237
|
+
* 100,000 tokens, and a body at both ceilings still fits the API's 1 MB
|
|
238
|
+
* request limit.
|
|
239
|
+
*/
|
|
240
|
+
export const LLM_STRUCTURED_SYSTEM_MAX = 200_000
|
|
241
|
+
|
|
229
242
|
/**
|
|
230
243
|
* Per-provider maximum VIDEO prompt length (chars), VERIFIED against each model's
|
|
231
244
|
* official docs.kie.ai schema (2026-06). Absent → {@link VIDEO_PROMPT_MAX} (8000)
|
|
@@ -255,6 +268,8 @@ export const MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER: Record<string, number> = {
|
|
|
255
268
|
// Gemini Omni Flash 1.1 — same 20000-char prompt surface as the pro sibling
|
|
256
269
|
// (docs.kie.ai/market/google/gemini-omni-flash-1-1).
|
|
257
270
|
"gemini-omni-flash": 20000,
|
|
271
|
+
// (docs.kie.ai/market/google/gemini-omni-flash-1-2).
|
|
272
|
+
"gemini-omni-flash-1-2": 20000,
|
|
258
273
|
// Wan 3.0 / 3.0 Prime — 20000 chars, excess truncated by the provider
|
|
259
274
|
// (docs.kie.ai/market/wan/3-0-video and /3-0-video-prime).
|
|
260
275
|
"wan-3": 20000,
|
|
@@ -972,6 +987,7 @@ export const IMAGE_TO_VIDEO_PROVIDERS = [
|
|
|
972
987
|
"kling-3-omni",
|
|
973
988
|
"gemini-omni-video",
|
|
974
989
|
"gemini-omni-flash",
|
|
990
|
+
"gemini-omni-flash-1-2",
|
|
975
991
|
// Wan 3.0 family — one id per SKU serves BOTH modes (no t2v twin, no alias),
|
|
976
992
|
// so each id is listed in this array AND in TEXT_TO_VIDEO_PROVIDERS.
|
|
977
993
|
"wan-3",
|
|
@@ -1023,6 +1039,7 @@ export const TEXT_TO_VIDEO_PROVIDERS = [
|
|
|
1023
1039
|
"runway-kie",
|
|
1024
1040
|
"gemini-omni-video",
|
|
1025
1041
|
"gemini-omni-flash",
|
|
1042
|
+
"gemini-omni-flash-1-2",
|
|
1026
1043
|
// Wan 3.0 family — REAL t2v (prompt-only runs are the documented default
|
|
1027
1044
|
// mode), so they belong in this main section and must NOT be gated by
|
|
1028
1045
|
// VIDEO_PROVIDERS_REQUIRING_IMAGE.
|
|
@@ -1190,7 +1207,7 @@ export function resolveVideoModeForInputs(
|
|
|
1190
1207
|
}
|
|
1191
1208
|
|
|
1192
1209
|
/** The prompt syntax a video provider addresses its images in, by array order. */
|
|
1193
|
-
export type VideoReferenceSyntax = "@image_N" | "@image(n)" | "[Image N]"
|
|
1210
|
+
export type VideoReferenceSyntax = "@image_N" | "@image(n)" | "[Image N]" | "image N"
|
|
1194
1211
|
|
|
1195
1212
|
/**
|
|
1196
1213
|
* The syntax this video model's frame / identity binding sentences are written
|
|
@@ -1880,6 +1897,10 @@ export const DURATION_PRICED_PROVIDERS = new Set([
|
|
|
1880
1897
|
// video rate on `kling-4`, see VIDEO_REF_RATE_PROVIDERS).
|
|
1881
1898
|
"kling-4",
|
|
1882
1899
|
"kling-4-keyframes",
|
|
1900
|
+
// Gemini Omni Flash 1.2 — per-second billing at four resolution rates. The
|
|
1901
|
+
// only Omni SKU here: the per-clip SKUs price in their own branch of
|
|
1902
|
+
// buildVideoCreditModelIdentifier.
|
|
1903
|
+
"gemini-omni-flash-1-2",
|
|
1883
1904
|
])
|
|
1884
1905
|
|
|
1885
1906
|
/**
|
|
@@ -2085,12 +2106,38 @@ export function kling4KeyframeFrameCap(durationSec: number | string | undefined)
|
|
|
2085
2106
|
export const GEMINI_OMNI_PROVIDERS = new Set<string>([
|
|
2086
2107
|
"gemini-omni-video",
|
|
2087
2108
|
"gemini-omni-flash",
|
|
2109
|
+
// Own request builder and per-second price: GEMINI_OMNI_PER_SECOND_PROVIDERS.
|
|
2110
|
+
"gemini-omni-flash-1-2",
|
|
2088
2111
|
])
|
|
2089
2112
|
|
|
2090
2113
|
export function isGeminiOmniProvider(provider: string | undefined): boolean {
|
|
2091
2114
|
return !!provider && GEMINI_OMNI_PROVIDERS.has(provider)
|
|
2092
2115
|
}
|
|
2093
2116
|
|
|
2117
|
+
/**
|
|
2118
|
+
* The Gemini Omni SKUs billed per second of video (Gemini Omni Flash 1.2). What
|
|
2119
|
+
* the family shares (V2V through the i2v handle, the panels) comes from
|
|
2120
|
+
* {@link GEMINI_OMNI_PROVIDERS}. These differ in two ways: the price is a
|
|
2121
|
+
* `:<N>s:<res>` ladder, and a run with a source video bills that clip's own
|
|
2122
|
+
* seconds and nothing else (the output follows the clip), so they also answer
|
|
2123
|
+
* {@link billsReferenceVideoSeconds}.
|
|
2124
|
+
*/
|
|
2125
|
+
export const GEMINI_OMNI_PER_SECOND_PROVIDERS = new Set<string>([
|
|
2126
|
+
"gemini-omni-flash-1-2",
|
|
2127
|
+
])
|
|
2128
|
+
|
|
2129
|
+
export function isGeminiOmniPerSecondProvider(provider: string | undefined): boolean {
|
|
2130
|
+
return !!provider && GEMINI_OMNI_PER_SECOND_PROVIDERS.has(provider)
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
/** The longest source clip Gemini Omni Flash 1.2 takes (docs.kie.ai/market/google/gemini-omni-flash-1-2). */
|
|
2134
|
+
export const GEMINI_OMNI_12_MAX_SOURCE_SEC = 15
|
|
2135
|
+
|
|
2136
|
+
/** The widest trim window a request may set on a Gemini Omni source clip, in seconds. */
|
|
2137
|
+
export function videoSourceTrimMaxSec(provider: string | undefined): number {
|
|
2138
|
+
return isGeminiOmniPerSecondProvider(provider) ? GEMINI_OMNI_12_MAX_SOURCE_SEC : 10
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2094
2141
|
/**
|
|
2095
2142
|
* Video models that are CATALOGUED and priced but have NO working dispatch
|
|
2096
2143
|
* path today — selecting one fails at the router, not at validation.
|
|
@@ -2612,6 +2659,10 @@ export const VIDEO_REF_LIMITS_BY_PROVIDER: Record<
|
|
|
2612
2659
|
// Gemini Omni Flash 1.1 — identical quota to the pro sibling
|
|
2613
2660
|
// (images + 2×videos + character_ids ≤ 7).
|
|
2614
2661
|
"gemini-omni-flash": { images: 7, videos: 1, characters: 3, voices: 3 },
|
|
2662
|
+
// Gemini Omni Flash 1.2 — up to 6 images, one source video, and images +
|
|
2663
|
+
// 2 for a video ≤ 7, so 5 images beside a video (the request builder holds
|
|
2664
|
+
// that). No `character_ids` / `audio_ids` in its schema: no characters, no voices.
|
|
2665
|
+
"gemini-omni-flash-1-2": { images: 6, videos: 1 },
|
|
2615
2666
|
"kling-3-omni": { images: 7 }, // catalog/docs: "end frame + up to 7 reference images"
|
|
2616
2667
|
// Kling 4.0 Reference — 10 images, 5 videos, 7 subjects (`characters`,
|
|
2617
2668
|
// KIE `elements`) and 3 voices (reference audio, KIE `voices`), 15 in all
|
|
@@ -2784,6 +2835,9 @@ export const RESOLUTION_DURATION_PRICING: Record<string, readonly string[]> = {
|
|
|
2784
2835
|
// (VIDEO_REF_RATE_PROVIDERS).
|
|
2785
2836
|
"kling-4": ["720p", "1080p"],
|
|
2786
2837
|
"kling-4-keyframes": ["720p", "1080p"],
|
|
2838
|
+
// Gemini Omni Flash 1.2 — per-second billing at four resolution rates.
|
|
2839
|
+
// Ascending; the billed default (720p) is declared in PRICING_DEFAULT_RESOLUTION.
|
|
2840
|
+
"gemini-omni-flash-1-2": ["360p", "720p", "1080p", "4k"],
|
|
2787
2841
|
}
|
|
2788
2842
|
|
|
2789
2843
|
/**
|
|
@@ -2799,15 +2853,18 @@ export const VIDEO_REF_RATE_PROVIDERS = new Set<string>([
|
|
|
2799
2853
|
|
|
2800
2854
|
/**
|
|
2801
2855
|
* Video models whose reference-VIDEO runs also bill the clips' own seconds:
|
|
2802
|
-
* the Seedance 2 family (`unit × (input + output)`)
|
|
2803
|
-
* VIDEO_REF_RATE_PROVIDERS (Kling 4.0: `unit × (output + max(output, input))`)
|
|
2856
|
+
* the Seedance 2 family (`unit × (input + output)`), the
|
|
2857
|
+
* VIDEO_REF_RATE_PROVIDERS (Kling 4.0: `unit × (output + max(output, input))`)
|
|
2858
|
+
* and the per-second Gemini Omni SKUs (`unit × source clip`, the output follows it).
|
|
2804
2859
|
* The reservation holds the worst case from the probed clips and the
|
|
2805
2860
|
* settlement meters down to what was delivered (backend
|
|
2806
2861
|
* ee/billing/seedance2-ref-video-credits.ts) — this is the one gate every lane
|
|
2807
2862
|
* (routes, orchestrator, worker settlement, reconcile) asks.
|
|
2808
2863
|
*/
|
|
2809
2864
|
export function billsReferenceVideoSeconds(provider: string | undefined): boolean {
|
|
2810
|
-
return isSeedance2Provider(provider)
|
|
2865
|
+
return isSeedance2Provider(provider)
|
|
2866
|
+
|| isGeminiOmniPerSecondProvider(provider)
|
|
2867
|
+
|| (!!provider && VIDEO_REF_RATE_PROVIDERS.has(provider))
|
|
2811
2868
|
}
|
|
2812
2869
|
|
|
2813
2870
|
/**
|
|
@@ -2900,8 +2957,8 @@ export function videoProviderRequiresImage(provider: string | undefined): boolea
|
|
|
2900
2957
|
* reference mode takes a lone last frame as the sole reference image plus a
|
|
2901
2958
|
* closing-frame prompt hint. NOTHING else does: VEO ships `[imageUrl,
|
|
2902
2959
|
* endFrameUrl]` verbatim (a lone end frame would reach KIE as `[null, url]`),
|
|
2903
|
-
* the Gemini Omni branch drops the frame when there is no start frame
|
|
2904
|
-
* generic KIE path sends `end_frame` with no image param at all. So the
|
|
2960
|
+
* the per-clip Gemini Omni branch drops the frame when there is no start frame (Omni
|
|
2961
|
+
* Flash 1.2 folds it, with its own builder), and the generic KIE path sends `end_frame` with no image param at all. So the
|
|
2905
2962
|
* exemption is keyed to the FOLD, not to "carries image references" — the
|
|
2906
2963
|
* catalog has no capability for it, and these three family predicates are the
|
|
2907
2964
|
* same membership the provider layer itself branches on (the backend's
|
|
@@ -2910,7 +2967,7 @@ export function videoProviderRequiresImage(provider: string | undefined): boolea
|
|
|
2910
2967
|
* family here; one that does not keeps the honest `image_required` 400.
|
|
2911
2968
|
*/
|
|
2912
2969
|
export function videoProviderFoldsLoneEndFrame(provider: string): boolean {
|
|
2913
|
-
return isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider)
|
|
2970
|
+
return isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider) || isGeminiOmniPerSecondProvider(provider)
|
|
2914
2971
|
}
|
|
2915
2972
|
|
|
2916
2973
|
/**
|
|
@@ -3041,6 +3098,8 @@ export const VIDEO_AUDIO_CAPABILITY: Record<string, VideoAudioCapability> = {
|
|
|
3041
3098
|
// dialogue; priced into the per-second rate.
|
|
3042
3099
|
"kling-4": { mode: "ambient", alwaysOn: true, defaultOn: true },
|
|
3043
3100
|
"kling-4-keyframes": { mode: "ambient", alwaysOn: true, defaultOn: true },
|
|
3101
|
+
// Gemini Omni Flash 1.2 — native audio with no on/off input in its schema.
|
|
3102
|
+
"gemini-omni-flash-1-2": { mode: "ambient", alwaysOn: true },
|
|
3044
3103
|
// Gemini Omni (both SKUs — the pro `gemini-omni-video` and the faster
|
|
3045
3104
|
// `gemini-omni-flash`; one model at two speeds, so their rows are identical
|
|
3046
3105
|
// and a test pins that). Settled 2026-09-03 from Google's own documentation
|
|
@@ -3212,6 +3271,9 @@ export const VIDEO_VARIABLE_PRICING: Record<string, "duration" | "duration+audio
|
|
|
3212
3271
|
// reference-video rate.
|
|
3213
3272
|
"kling-4": "duration+resolution+ref",
|
|
3214
3273
|
"kling-4-keyframes": "duration+resolution",
|
|
3274
|
+
// Gemini Omni Flash 1.2 — per-second at four resolution rates; a video edit
|
|
3275
|
+
// bills the same rates over the source clip.
|
|
3276
|
+
"gemini-omni-flash-1-2": "duration+resolution",
|
|
3215
3277
|
}
|
|
3216
3278
|
|
|
3217
3279
|
/**
|
|
@@ -3331,8 +3393,17 @@ export const PRICING_DEFAULT_RESOLUTION: Record<string, string> = {
|
|
|
3331
3393
|
// normalizeKling4Resolution pins the same tier for anything unknown.
|
|
3332
3394
|
"kling-4": "720p",
|
|
3333
3395
|
"kling-4-keyframes": "720p",
|
|
3396
|
+
// Gemini Omni Flash 1.2 — KIE renders 720p when `resolution` is omitted, and
|
|
3397
|
+
// the runner sends 720p for anything off its list.
|
|
3398
|
+
"gemini-omni-flash-1-2": "720p",
|
|
3334
3399
|
}
|
|
3335
3400
|
|
|
3401
|
+
/** Gemini Omni Flash 1.2 per-second tiers — one per allowed duration (3–15s). */
|
|
3402
|
+
const GEMINI_OMNI_12_DURATION_TIERS: Array<{ maxSeconds: number; suffix: string }> = Array.from(
|
|
3403
|
+
{ length: 13 },
|
|
3404
|
+
(_, i) => ({ maxSeconds: i + 3, suffix: `${i + 3}s` }),
|
|
3405
|
+
)
|
|
3406
|
+
|
|
3336
3407
|
/** HappyHorse 1.1 per-second tiers — one per allowed duration (3–15s), shared
|
|
3337
3408
|
* by all three modes (t2v/i2v/ref2v) which bill at identical published rates. */
|
|
3338
3409
|
const HAPPYHORSE_DURATION_TIERS: Array<{ maxSeconds: number; suffix: string }> = Array.from(
|
|
@@ -3466,6 +3537,7 @@ export const VIDEO_DURATION_TIERS: Record<string, Array<{ maxSeconds: number; su
|
|
|
3466
3537
|
"vidu-q4": VIDU_Q4_DURATION_TIERS,
|
|
3467
3538
|
"kling-4": KLING_4_DURATION_TIERS,
|
|
3468
3539
|
"kling-4-keyframes": KLING_4_DURATION_TIERS,
|
|
3540
|
+
"gemini-omni-flash-1-2": GEMINI_OMNI_12_DURATION_TIERS,
|
|
3469
3541
|
// MiniMax Hailuo 3 — true per-second billing (KIE 36.5 cr/s @2K, 22.5 cr/s
|
|
3470
3542
|
// @768P). One tier per allowed second (4-15s) so the composite identifier
|
|
3471
3543
|
// maps 1:1 to the seeded price — no rounding/overcharge for any on-menu
|
|
@@ -223,6 +223,7 @@ const QUALITY_MAP: Record<string, QualityMapping> = {
|
|
|
223
223
|
"ltx-2.3-fast": { field: "resolution", values: { low: "1080p", mid: "2k", high: "4k" } },
|
|
224
224
|
"gemini-omni-video": { field: "resolution", values: { low: "720p", mid: "1080p", high: "4k" } },
|
|
225
225
|
"gemini-omni-flash": { field: "resolution", values: { low: "720p", mid: "1080p", high: "4k" } },
|
|
226
|
+
"gemini-omni-flash-1-2": { field: "resolution", values: { low: "720p", mid: "1080p", high: "4k" } },
|
|
226
227
|
// Grok Imagine Video 1.5 — only 480p/720p (no 1080p tier); high clamps to 720p.
|
|
227
228
|
"grok-imagine-video-1.5": { field: "resolution", values: { low: "480p", mid: "720p", high: "720p" } },
|
|
228
229
|
// Replicate Flux 2 family — MP-based resolution (matching IMAGE_RESOLUTION_OPTIONS["flux-2-*"]).
|
package/src/video-ui-defaults.ts
CHANGED
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
isViduQ4Provider,
|
|
37
37
|
isKling4Provider,
|
|
38
38
|
isGeminiOmniProvider,
|
|
39
|
+
isGeminiOmniPerSecondProvider,
|
|
39
40
|
} from "./model-constants.js"
|
|
40
41
|
import { MODEL_CATALOG } from "./model-catalog.js"
|
|
41
42
|
|
|
@@ -51,7 +52,7 @@ export function uiAspectRatioFill(provider: string): string | undefined {
|
|
|
51
52
|
/** See the file docstring — per-family on purpose; never a generic
|
|
52
53
|
* PRICING_DEFAULT_RESOLUTION read (that would reprice seedance-2-5). */
|
|
53
54
|
export function uiResolutionFill(provider: string): string | undefined {
|
|
54
|
-
if (isWan3Provider(provider) || isViduQ4Provider(provider) || isKling4Provider(provider)) return PRICING_DEFAULT_RESOLUTION[provider]
|
|
55
|
+
if (isWan3Provider(provider) || isViduQ4Provider(provider) || isKling4Provider(provider) || isGeminiOmniPerSecondProvider(provider)) return PRICING_DEFAULT_RESOLUTION[provider]
|
|
55
56
|
if (isSeedance2Provider(provider)) return MODEL_CATALOG[provider]?.resolutions?.[0]
|
|
56
57
|
return undefined
|
|
57
58
|
}
|