@shop-os/modelkit 0.19.1 → 0.21.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 +42 -1
- package/README.md +2 -2
- package/dist/catalog.cjs +85 -26
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +40 -4
- package/dist/catalog.d.ts +40 -4
- package/dist/catalog.js +85 -26
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +4098 -3639
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -4
- package/dist/index.d.ts +44 -4
- package/dist/index.js +4095 -3639
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/catalog.d.cts
CHANGED
|
@@ -168,7 +168,7 @@ type Lifecycle = "active" | "deprecated" | "retired";
|
|
|
168
168
|
type Surface = "cowork" | "space_builder";
|
|
169
169
|
/** @deprecated use Surface[] */
|
|
170
170
|
type Exposure = Surface[];
|
|
171
|
-
type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "luma" | "fish" | "elevenlabs";
|
|
171
|
+
type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "alibaba" | "luma" | "fish" | "elevenlabs";
|
|
172
172
|
/** Gemini image safety threshold, per category, sent only when the caller opts in. */
|
|
173
173
|
type ImageSafetySetting = {
|
|
174
174
|
category: string;
|
|
@@ -853,7 +853,25 @@ interface ModelConstraints {
|
|
|
853
853
|
audio?: AudioOutput;
|
|
854
854
|
/** Prompt conventions. Read them through `promptConventions(row)`, which fills the default. */
|
|
855
855
|
prompt?: PromptConventions;
|
|
856
|
+
/**
|
|
857
|
+
* Video rows whose provider bills what the request sends (input video, reference images)
|
|
858
|
+
* on top of what it renders. Read it through `inputBillingOf(row)`, which also covers
|
|
859
|
+
* Seedance (`ark`) rows and data-only rows. Kits before 0.21.0 ignore it.
|
|
860
|
+
*/
|
|
861
|
+
inputBilling?: InputBilling;
|
|
856
862
|
}
|
|
863
|
+
/**
|
|
864
|
+
* How a provider bills a request's inputs. The apps own the rates; this names the rule.
|
|
865
|
+
* - `seedance`: input plus output seconds at the row's video-input rate.
|
|
866
|
+
* - `omni`: input video as input tokens, billed as equivalent output seconds.
|
|
867
|
+
* - `h3-max-reference`: reference image, video and audio tokens past a shared allowance.
|
|
868
|
+
* - `h3-reference`: a fee for each reference image past the fifth.
|
|
869
|
+
* - `grok-input-image`: a fee for each input image, frames included.
|
|
870
|
+
* - `source-video-rate`: the output alone, at the row's video-input rate.
|
|
871
|
+
* - `kling-v4`: output plus max(input, output) seconds at the row's video-input rate.
|
|
872
|
+
* - `input-plus-output`: input plus output seconds at the row's base rate.
|
|
873
|
+
*/
|
|
874
|
+
type InputBilling = "seedance" | "omni" | "h3-max-reference" | "h3-reference" | "grok-input-image" | "source-video-rate" | "kling-v4" | "input-plus-output";
|
|
857
875
|
/** JSON-compatible value. Provider options and raw payloads carry these, never `unknown`. */
|
|
858
876
|
type JsonPrimitive = string | number | boolean | null;
|
|
859
877
|
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
@@ -1066,10 +1084,12 @@ interface UsageEvent {
|
|
|
1066
1084
|
keySource?: KeySource;
|
|
1067
1085
|
raw?: unknown;
|
|
1068
1086
|
}
|
|
1069
|
-
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "luma" | "fish" | "elevenlabs" | "cloudflare";
|
|
1087
|
+
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "alibaba" | "luma" | "fish" | "elevenlabs" | "cloudflare";
|
|
1070
1088
|
type ProviderKeys = Partial<Record<ProviderKeyName, string>> & {
|
|
1071
1089
|
/** Higgsfield needs the pair; both switch together. */
|
|
1072
1090
|
higgsfieldSecret?: string;
|
|
1091
|
+
/** Model Studio workspace the `alibaba` key belongs to; its endpoint takes keys of that workspace only. */
|
|
1092
|
+
alibabaWorkspace?: string;
|
|
1073
1093
|
/** Bedrock runtime credentials for Anthropic models when routing.anthropic = "bedrock". */
|
|
1074
1094
|
aws?: {
|
|
1075
1095
|
/** Bedrock region. Must serve the chosen inference profile (us-east-1 for "us"). */
|
|
@@ -1119,6 +1139,8 @@ interface AdapterEndpoints {
|
|
|
1119
1139
|
ark?: string;
|
|
1120
1140
|
/** Luma Agents API. Defaults to https://agents.lumalabs.ai. */
|
|
1121
1141
|
luma?: string;
|
|
1142
|
+
/** Alibaba Model Studio API base (ending in /api/v1). Defaults to the workspace endpoint in US (Virginia). */
|
|
1143
|
+
alibaba?: string;
|
|
1122
1144
|
/** Fish Audio API. Defaults to https://api.fish.audio. */
|
|
1123
1145
|
fish?: string;
|
|
1124
1146
|
/** ElevenLabs API. Defaults to https://api.elevenlabs.io. */
|
|
@@ -1212,7 +1234,7 @@ declare function isListed(row: CatalogModel): boolean;
|
|
|
1212
1234
|
*/
|
|
1213
1235
|
declare const MODELS: CatalogModel[];
|
|
1214
1236
|
|
|
1215
|
-
declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "fish", "elevenlabs"];
|
|
1237
|
+
declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "alibaba", "fish", "elevenlabs"];
|
|
1216
1238
|
declare const SurfaceSchema: z.ZodEnum<{
|
|
1217
1239
|
cowork: "cowork";
|
|
1218
1240
|
space_builder: "space_builder";
|
|
@@ -1262,6 +1284,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1262
1284
|
prodia: "prodia";
|
|
1263
1285
|
higgsfield: "higgsfield";
|
|
1264
1286
|
"xai-video": "xai-video";
|
|
1287
|
+
alibaba: "alibaba";
|
|
1265
1288
|
luma: "luma";
|
|
1266
1289
|
fish: "fish";
|
|
1267
1290
|
elevenlabs: "elevenlabs";
|
|
@@ -1551,6 +1574,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1551
1574
|
}, z.core.$loose>>;
|
|
1552
1575
|
}, z.core.$loose>>;
|
|
1553
1576
|
audio: z.ZodOptional<z.ZodUnknown>;
|
|
1577
|
+
inputBilling: z.ZodOptional<z.ZodUnknown>;
|
|
1554
1578
|
prompt: z.ZodOptional<z.ZodUnknown>;
|
|
1555
1579
|
}, z.core.$loose>;
|
|
1556
1580
|
defaults: z.ZodObject<{
|
|
@@ -2159,6 +2183,7 @@ interface ReferenceImageConformPlan {
|
|
|
2159
2183
|
declare function referenceImageConformPlan(model: CatalogModel, probe: ReferenceImageProbe): ReferenceImageConformPlan | null;
|
|
2160
2184
|
|
|
2161
2185
|
declare const AUDIO_OUTPUTS: ("always" | "optional" | "never")[];
|
|
2186
|
+
declare const INPUT_BILLINGS: ("seedance" | "omni" | "h3-max-reference" | "h3-reference" | "grok-input-image" | "source-video-rate" | "kling-v4" | "input-plus-output")[];
|
|
2162
2187
|
declare const REFERENCE_SYNTAXES: ("numbered" | "caption" | "descriptive")[];
|
|
2163
2188
|
declare function outputAudio(row: {
|
|
2164
2189
|
constraints: unknown;
|
|
@@ -2178,4 +2203,15 @@ declare function promptConventions(row: {
|
|
|
2178
2203
|
constraints: unknown;
|
|
2179
2204
|
}): PromptConventions;
|
|
2180
2205
|
|
|
2181
|
-
|
|
2206
|
+
/**
|
|
2207
|
+
* The input-billing rule of a row, or null when the provider bills only what it renders. The
|
|
2208
|
+
* row's own `constraints.inputBilling` wins. A live row an older seed wrote, without the field,
|
|
2209
|
+
* takes the kit row of the same id; an `ark` (Seedance) row is `seedance`.
|
|
2210
|
+
*/
|
|
2211
|
+
declare function inputBillingOf(row: {
|
|
2212
|
+
id: string;
|
|
2213
|
+
adapter: string;
|
|
2214
|
+
constraints?: unknown;
|
|
2215
|
+
}): InputBilling | null;
|
|
2216
|
+
|
|
2217
|
+
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AnimationFrameSize, type AnimationLimits, type AspectLimits, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, INPUT_BILLINGS, type ImageAnimation, type ImageBackground, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImagePixelLimits, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputBilling, type JsonObject, type JsonPrimitive, type JsonValue, type KeySource, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, type ModelConstraints, type ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, REFERENCE_VIDEO_CONFORM_PROFILE, type ReferenceImageConformPlan, type ReferenceImageConformReason, type ReferenceImageProbe, type ReferenceLimits, type ReferenceSyntax, type ReferenceVideoConformPlan, type ReferenceVideoConformReason, type ReferenceVideoProbe, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoFpsLimits, type VideoJob, type VideoModel, type VideoPixelLimits, type VideoRequest, type VideoResolution, VideoResolutionSchema, type VideoResult, type VideoSecondsLimits, type VideoToolCallContext, type VideoToolConstraints, type VideoToolKind, type VideoToolOutputFormat, type VideoToolOutputSpec, type VideoToolPlan, type VideoToolRequest, type VideoToolResult, type VideoToolSource, type VideoToolStatus, type VideoToolSubmission, type VoiceCandidate, type VoiceChangeRequest, type VoiceCloneRequest, type VoiceCloneResult, type VoiceCloneState, type VoiceDeleteRequest, type VoiceDesignRequest, type VoiceDesignResult, type VoiceGender, type VoiceOption, type VoiceSample, type Warning, billedAudio, compareCatalogOrder, hasAwsCredentials, inputBillingOf, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, referenceImageConformPlan, referenceVideoConformPlan, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
|
package/dist/catalog.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ type Lifecycle = "active" | "deprecated" | "retired";
|
|
|
168
168
|
type Surface = "cowork" | "space_builder";
|
|
169
169
|
/** @deprecated use Surface[] */
|
|
170
170
|
type Exposure = Surface[];
|
|
171
|
-
type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "luma" | "fish" | "elevenlabs";
|
|
171
|
+
type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "alibaba" | "luma" | "fish" | "elevenlabs";
|
|
172
172
|
/** Gemini image safety threshold, per category, sent only when the caller opts in. */
|
|
173
173
|
type ImageSafetySetting = {
|
|
174
174
|
category: string;
|
|
@@ -853,7 +853,25 @@ interface ModelConstraints {
|
|
|
853
853
|
audio?: AudioOutput;
|
|
854
854
|
/** Prompt conventions. Read them through `promptConventions(row)`, which fills the default. */
|
|
855
855
|
prompt?: PromptConventions;
|
|
856
|
+
/**
|
|
857
|
+
* Video rows whose provider bills what the request sends (input video, reference images)
|
|
858
|
+
* on top of what it renders. Read it through `inputBillingOf(row)`, which also covers
|
|
859
|
+
* Seedance (`ark`) rows and data-only rows. Kits before 0.21.0 ignore it.
|
|
860
|
+
*/
|
|
861
|
+
inputBilling?: InputBilling;
|
|
856
862
|
}
|
|
863
|
+
/**
|
|
864
|
+
* How a provider bills a request's inputs. The apps own the rates; this names the rule.
|
|
865
|
+
* - `seedance`: input plus output seconds at the row's video-input rate.
|
|
866
|
+
* - `omni`: input video as input tokens, billed as equivalent output seconds.
|
|
867
|
+
* - `h3-max-reference`: reference image, video and audio tokens past a shared allowance.
|
|
868
|
+
* - `h3-reference`: a fee for each reference image past the fifth.
|
|
869
|
+
* - `grok-input-image`: a fee for each input image, frames included.
|
|
870
|
+
* - `source-video-rate`: the output alone, at the row's video-input rate.
|
|
871
|
+
* - `kling-v4`: output plus max(input, output) seconds at the row's video-input rate.
|
|
872
|
+
* - `input-plus-output`: input plus output seconds at the row's base rate.
|
|
873
|
+
*/
|
|
874
|
+
type InputBilling = "seedance" | "omni" | "h3-max-reference" | "h3-reference" | "grok-input-image" | "source-video-rate" | "kling-v4" | "input-plus-output";
|
|
857
875
|
/** JSON-compatible value. Provider options and raw payloads carry these, never `unknown`. */
|
|
858
876
|
type JsonPrimitive = string | number | boolean | null;
|
|
859
877
|
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
@@ -1066,10 +1084,12 @@ interface UsageEvent {
|
|
|
1066
1084
|
keySource?: KeySource;
|
|
1067
1085
|
raw?: unknown;
|
|
1068
1086
|
}
|
|
1069
|
-
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "luma" | "fish" | "elevenlabs" | "cloudflare";
|
|
1087
|
+
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "alibaba" | "luma" | "fish" | "elevenlabs" | "cloudflare";
|
|
1070
1088
|
type ProviderKeys = Partial<Record<ProviderKeyName, string>> & {
|
|
1071
1089
|
/** Higgsfield needs the pair; both switch together. */
|
|
1072
1090
|
higgsfieldSecret?: string;
|
|
1091
|
+
/** Model Studio workspace the `alibaba` key belongs to; its endpoint takes keys of that workspace only. */
|
|
1092
|
+
alibabaWorkspace?: string;
|
|
1073
1093
|
/** Bedrock runtime credentials for Anthropic models when routing.anthropic = "bedrock". */
|
|
1074
1094
|
aws?: {
|
|
1075
1095
|
/** Bedrock region. Must serve the chosen inference profile (us-east-1 for "us"). */
|
|
@@ -1119,6 +1139,8 @@ interface AdapterEndpoints {
|
|
|
1119
1139
|
ark?: string;
|
|
1120
1140
|
/** Luma Agents API. Defaults to https://agents.lumalabs.ai. */
|
|
1121
1141
|
luma?: string;
|
|
1142
|
+
/** Alibaba Model Studio API base (ending in /api/v1). Defaults to the workspace endpoint in US (Virginia). */
|
|
1143
|
+
alibaba?: string;
|
|
1122
1144
|
/** Fish Audio API. Defaults to https://api.fish.audio. */
|
|
1123
1145
|
fish?: string;
|
|
1124
1146
|
/** ElevenLabs API. Defaults to https://api.elevenlabs.io. */
|
|
@@ -1212,7 +1234,7 @@ declare function isListed(row: CatalogModel): boolean;
|
|
|
1212
1234
|
*/
|
|
1213
1235
|
declare const MODELS: CatalogModel[];
|
|
1214
1236
|
|
|
1215
|
-
declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "fish", "elevenlabs"];
|
|
1237
|
+
declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "alibaba", "fish", "elevenlabs"];
|
|
1216
1238
|
declare const SurfaceSchema: z.ZodEnum<{
|
|
1217
1239
|
cowork: "cowork";
|
|
1218
1240
|
space_builder: "space_builder";
|
|
@@ -1262,6 +1284,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1262
1284
|
prodia: "prodia";
|
|
1263
1285
|
higgsfield: "higgsfield";
|
|
1264
1286
|
"xai-video": "xai-video";
|
|
1287
|
+
alibaba: "alibaba";
|
|
1265
1288
|
luma: "luma";
|
|
1266
1289
|
fish: "fish";
|
|
1267
1290
|
elevenlabs: "elevenlabs";
|
|
@@ -1551,6 +1574,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1551
1574
|
}, z.core.$loose>>;
|
|
1552
1575
|
}, z.core.$loose>>;
|
|
1553
1576
|
audio: z.ZodOptional<z.ZodUnknown>;
|
|
1577
|
+
inputBilling: z.ZodOptional<z.ZodUnknown>;
|
|
1554
1578
|
prompt: z.ZodOptional<z.ZodUnknown>;
|
|
1555
1579
|
}, z.core.$loose>;
|
|
1556
1580
|
defaults: z.ZodObject<{
|
|
@@ -2159,6 +2183,7 @@ interface ReferenceImageConformPlan {
|
|
|
2159
2183
|
declare function referenceImageConformPlan(model: CatalogModel, probe: ReferenceImageProbe): ReferenceImageConformPlan | null;
|
|
2160
2184
|
|
|
2161
2185
|
declare const AUDIO_OUTPUTS: ("always" | "optional" | "never")[];
|
|
2186
|
+
declare const INPUT_BILLINGS: ("seedance" | "omni" | "h3-max-reference" | "h3-reference" | "grok-input-image" | "source-video-rate" | "kling-v4" | "input-plus-output")[];
|
|
2162
2187
|
declare const REFERENCE_SYNTAXES: ("numbered" | "caption" | "descriptive")[];
|
|
2163
2188
|
declare function outputAudio(row: {
|
|
2164
2189
|
constraints: unknown;
|
|
@@ -2178,4 +2203,15 @@ declare function promptConventions(row: {
|
|
|
2178
2203
|
constraints: unknown;
|
|
2179
2204
|
}): PromptConventions;
|
|
2180
2205
|
|
|
2181
|
-
|
|
2206
|
+
/**
|
|
2207
|
+
* The input-billing rule of a row, or null when the provider bills only what it renders. The
|
|
2208
|
+
* row's own `constraints.inputBilling` wins. A live row an older seed wrote, without the field,
|
|
2209
|
+
* takes the kit row of the same id; an `ark` (Seedance) row is `seedance`.
|
|
2210
|
+
*/
|
|
2211
|
+
declare function inputBillingOf(row: {
|
|
2212
|
+
id: string;
|
|
2213
|
+
adapter: string;
|
|
2214
|
+
constraints?: unknown;
|
|
2215
|
+
}): InputBilling | null;
|
|
2216
|
+
|
|
2217
|
+
export { ADAPTER_IDS, AUDIO_OUTPUTS, type AdapterEndpoints, type AdapterId, type AnimationFrameSize, type AnimationLimits, type AspectLimits, type AspectRatio, type AudioOutput, type AudioRequest, type AudioResult, type CallContext, Catalog, type CatalogAuth, type CatalogCache, type CatalogCapabilities, type CatalogDisplay, type CatalogEnvelope, type CatalogModel, CatalogModelSchema, CatalogModelSchemaBase, type CatalogOrigin, CatalogSchema, type CatalogSource, type DubbingRequest, type DubbingResult, type Exposure, ExposureSchema, type GeneratedImage, IMAGE_MODELS, INPUT_BILLINGS, type ImageAnimation, type ImageBackground, type ImageBytes, type ImageCallOptions, type ImageCallResult, type ImagePixelLimits, type ImageQuality, type ImageRequest, type ImageResult, type ImageSafetySetting, type ImageSize, type InputBilling, type JsonObject, type JsonPrimitive, type JsonValue, type KeySource, type KeyTier, type LanguageOption, type Lifecycle, type LipsyncRequest, type LipsyncResult, type LiveCatalogState, MEDIA_METHODS, MEDIA_NODE_MODELS, MODEL3D_IMAGE_SLOTS, MODEL3D_MODELS, MODELS, type MaskBox, type MaskPoint, type MediaMethod, type MediaNodeDefaults, type MediaOutput, type MediaPart, type MediaRef, type Model3dConstraints, type Model3dEndpoints, type Model3dFamily, type Model3dInputRefusal, type Model3dPricedInputs, type Model3dPricedOptions, type Model3dRequest, type Model3dResult, type Model3dStatus, type Model3dSubmission, type Model3dTexture, type Model3dViews, type Model3dWired, type ModelConstraints, type ModelKitConfig, ModelKitError, type ModelKitErrorCode, type ModelKitErrorInit, type ModelType, OTHER_MODELS, type OnUnsupported, type OutputFormat, type PricingKind, type PrimeCatalogResult, type PromptConventions, type ProviderErrorBody, type ProviderKeyName, type ProviderKeys, type ProviderOptionValue, type ProviderOptions, type QuarantineResult, REFERENCE_SYNTAXES, REFERENCE_VIDEO_CONFORM_PROFILE, type ReferenceImageConformPlan, type ReferenceImageConformReason, type ReferenceImageProbe, type ReferenceLimits, type ReferenceSyntax, type ReferenceVideoConformPlan, type ReferenceVideoConformReason, type ReferenceVideoProbe, type RequiredInput, type RequiredKeyName, type ResolveCall, type ResolveResult, type ResolvedCall, type Routing, SURFACES, type SpeechRequest, type SubtitleOptions, type SubtitleTextStyle, type SupportedOption, type Surface, SurfaceSchema, TEXT_MODELS, type TranscriptWord, type TranscriptionRequest, type TranscriptionResult, type UpscaleOptions, type UsageEvent, type UsageModality, type UsageUnit, VIDEO_MODELS, VIDEO_TOOL_MODELS, type VideoCallJob, type VideoCallOptions, type VideoFpsLimits, type VideoJob, type VideoModel, type VideoPixelLimits, type VideoRequest, type VideoResolution, VideoResolutionSchema, type VideoResult, type VideoSecondsLimits, type VideoToolCallContext, type VideoToolConstraints, type VideoToolKind, type VideoToolOutputFormat, type VideoToolOutputSpec, type VideoToolPlan, type VideoToolRequest, type VideoToolResult, type VideoToolSource, type VideoToolStatus, type VideoToolSubmission, type VoiceCandidate, type VoiceChangeRequest, type VoiceCloneRequest, type VoiceCloneResult, type VoiceCloneState, type VoiceDeleteRequest, type VoiceDesignRequest, type VoiceDesignResult, type VoiceGender, type VoiceOption, type VoiceSample, type Warning, billedAudio, compareCatalogOrder, hasAwsCredentials, inputBillingOf, isListed, isListedOn, isModelKitError, liveCatalog, liveState, lumaReframeTooTall, model3dConstraints, model3dInputRefusal, model3dPricingSku, model3dResolution, model3dSeedFits, model3dSkus, model3dTexture, nearestAspectRatio, normalizeExposure, outputAudio, planVideoTool, primeCatalog, promptConventions, referenceImageConformPlan, referenceVideoConformPlan, resetLiveCatalog, resolutionTier, resolveAudioOptions, resolveDubbingOptions, resolveImageOptions, resolveLipsyncOptions, resolveOptions, resolveSpeechOptions, resolveTranscriptionOptions, resolveVideoOptions, resolveVoiceChangeOptions, resolveVoiceCloneOptions, resolveVoiceDesignOptions, sortCatalogRows, takesTargetAspectRatio, videoLengthViolation, videoSizeViolation, videoToolConstraints };
|
package/dist/catalog.js
CHANGED
|
@@ -260,14 +260,15 @@ var FAL_IMAGE_MODELS = [
|
|
|
260
260
|
}
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
|
-
//
|
|
264
|
-
// as "image 1".."image 3"
|
|
263
|
+
// Alibaba Model Studio direct (qwen-image-3.0-pro; fal's qwen-image-3 bills its prices).
|
|
264
|
+
// 1-3 input images make it an edit, addressed as "image 1".."image 3". png output only.
|
|
265
|
+
// https://www.alibabacloud.com/help/en/model-studio/qwen-image-generation-and-editing-api-reference
|
|
265
266
|
id: "qwen-image-3",
|
|
266
267
|
aliases: [],
|
|
267
268
|
label: "Qwen Image 3",
|
|
268
269
|
type: "image",
|
|
269
|
-
adapter: "
|
|
270
|
-
providerModelId: "
|
|
270
|
+
adapter: "alibaba",
|
|
271
|
+
providerModelId: "qwen-image-3.0-pro",
|
|
271
272
|
lifecycle: "active",
|
|
272
273
|
exposure: EXPOSURE,
|
|
273
274
|
constraints: {
|
|
@@ -5362,6 +5363,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5362
5363
|
lifecycle: "active",
|
|
5363
5364
|
exposure: ["cowork", "space_builder"],
|
|
5364
5365
|
constraints: {
|
|
5366
|
+
inputBilling: "kling-v4",
|
|
5365
5367
|
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5366
5368
|
resolutions: ["720p", "1080p"],
|
|
5367
5369
|
durations: { min: 3, max: 30 },
|
|
@@ -5401,6 +5403,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5401
5403
|
lifecycle: "active",
|
|
5402
5404
|
exposure: ["cowork", "space_builder"],
|
|
5403
5405
|
constraints: {
|
|
5406
|
+
inputBilling: "kling-v4",
|
|
5404
5407
|
resolutions: ["720p", "1080p"],
|
|
5405
5408
|
durations: { min: 3, max: 30 },
|
|
5406
5409
|
references: { ...NO_REFERENCES, images: 10 },
|
|
@@ -5436,6 +5439,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5436
5439
|
lifecycle: "active",
|
|
5437
5440
|
exposure: ["cowork", "space_builder"],
|
|
5438
5441
|
constraints: {
|
|
5442
|
+
inputBilling: "kling-v4",
|
|
5439
5443
|
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5440
5444
|
resolutions: ["720p"],
|
|
5441
5445
|
durations: { min: 3, max: 20 },
|
|
@@ -5474,6 +5478,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5474
5478
|
lifecycle: "active",
|
|
5475
5479
|
exposure: ["cowork", "space_builder"],
|
|
5476
5480
|
constraints: {
|
|
5481
|
+
inputBilling: "kling-v4",
|
|
5477
5482
|
resolutions: ["720p"],
|
|
5478
5483
|
durations: { min: 3, max: 20 },
|
|
5479
5484
|
references: {
|
|
@@ -5555,6 +5560,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5555
5560
|
lifecycle: "active",
|
|
5556
5561
|
exposure: ["cowork", "space_builder"],
|
|
5557
5562
|
constraints: {
|
|
5563
|
+
inputBilling: "h3-max-reference",
|
|
5558
5564
|
resolutions: ["480p", "768p"],
|
|
5559
5565
|
durations: { min: 5, max: 13 },
|
|
5560
5566
|
references: { images: 9, videos: 3, audios: 0 },
|
|
@@ -5634,14 +5640,15 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5634
5640
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5635
5641
|
},
|
|
5636
5642
|
{
|
|
5637
|
-
//
|
|
5638
|
-
//
|
|
5643
|
+
// Alibaba Model Studio direct: one row for happyhorse-1.1-t2v / -i2v / -r2v; references,
|
|
5644
|
+
// else a start frame, else text. 480P exists too, unpriced, so it stays out.
|
|
5645
|
+
// https://www.alibabacloud.com/help/en/model-studio/happyhorse-reference-to-video-api-reference
|
|
5639
5646
|
id: "happy-horse-1.1",
|
|
5640
5647
|
aliases: ["happy-horse"],
|
|
5641
5648
|
label: "Happy Horse 1.1",
|
|
5642
5649
|
type: "video",
|
|
5643
|
-
adapter: "
|
|
5644
|
-
providerModelId: "
|
|
5650
|
+
adapter: "alibaba",
|
|
5651
|
+
providerModelId: "happyhorse-1.1",
|
|
5645
5652
|
lifecycle: "active",
|
|
5646
5653
|
exposure: ["cowork", "space_builder"],
|
|
5647
5654
|
constraints: {
|
|
@@ -5650,7 +5657,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5650
5657
|
durations: range(3, 15),
|
|
5651
5658
|
ratioIgnoredWith: ["firstFrame"],
|
|
5652
5659
|
references: { ...NO_REFERENCES, images: 9 },
|
|
5653
|
-
supports: ["seed"
|
|
5660
|
+
supports: ["seed"],
|
|
5654
5661
|
prompt: { referenceSyntax: "numbered", maxChars: 2500 },
|
|
5655
5662
|
audio: "always"
|
|
5656
5663
|
},
|
|
@@ -5791,6 +5798,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5791
5798
|
lifecycle: "active",
|
|
5792
5799
|
exposure: ["cowork", "space_builder"],
|
|
5793
5800
|
constraints: {
|
|
5801
|
+
inputBilling: "grok-input-image",
|
|
5794
5802
|
aspectRatios: [...GROK_15_RATIOS],
|
|
5795
5803
|
resolutions: ["480p", "720p", "1080p"],
|
|
5796
5804
|
durations: { min: 1, max: 15 },
|
|
@@ -6068,6 +6076,7 @@ var VIDEO_MODELS = [
|
|
|
6068
6076
|
replacedBy: "gemini-omni-1.1-flash",
|
|
6069
6077
|
exposure: [],
|
|
6070
6078
|
constraints: {
|
|
6079
|
+
inputBilling: "omni",
|
|
6071
6080
|
// 1.0 rejects `resolution`; it renders 720p. No defaults: the adapter
|
|
6072
6081
|
// sends ratio and duration only when the caller set them, so a
|
|
6073
6082
|
// reference clip keeps its own framing.
|
|
@@ -6099,6 +6108,7 @@ var VIDEO_MODELS = [
|
|
|
6099
6108
|
lifecycle: "active",
|
|
6100
6109
|
exposure: ["cowork", "space_builder"],
|
|
6101
6110
|
constraints: {
|
|
6111
|
+
inputBilling: "omni",
|
|
6102
6112
|
aspectRatios: [...OMNI_RATIOS],
|
|
6103
6113
|
resolutions: ["360p", "720p", "1080p", "4k"],
|
|
6104
6114
|
durations: [3, 4, 5, 6, 7, 8, 9, 10],
|
|
@@ -6143,6 +6153,7 @@ var VIDEO_MODELS = [
|
|
|
6143
6153
|
lifecycle: "active",
|
|
6144
6154
|
exposure: ["cowork", "space_builder"],
|
|
6145
6155
|
constraints: {
|
|
6156
|
+
inputBilling: "omni",
|
|
6146
6157
|
aspectRatios: [...OMNI_RATIOS],
|
|
6147
6158
|
resolutions: ["360p", "720p", "1080p", "4k"],
|
|
6148
6159
|
durations: { min: 3, max: 15 },
|
|
@@ -6319,6 +6330,7 @@ var VIDEO_MODELS = [
|
|
|
6319
6330
|
lifecycle: "active",
|
|
6320
6331
|
exposure: ["cowork", "space_builder"],
|
|
6321
6332
|
constraints: {
|
|
6333
|
+
inputBilling: "grok-input-image",
|
|
6322
6334
|
aspectRatios: [...GROK_RATIOS],
|
|
6323
6335
|
resolutions: ["480p", "720p"],
|
|
6324
6336
|
durations: { min: 1, max: 15 },
|
|
@@ -6520,6 +6532,7 @@ var VIDEO_MODELS = [
|
|
|
6520
6532
|
lifecycle: "active",
|
|
6521
6533
|
exposure: ["cowork", "space_builder"],
|
|
6522
6534
|
constraints: {
|
|
6535
|
+
inputBilling: "h3-reference",
|
|
6523
6536
|
aspectRatios: [...H3_REFERENCE_RATIOS],
|
|
6524
6537
|
resolutions: ["480p", "768p", "2k", "4k"],
|
|
6525
6538
|
durations: { min: 5, max: 15 },
|
|
@@ -6564,6 +6577,7 @@ var VIDEO_MODELS = [
|
|
|
6564
6577
|
lifecycle: "active",
|
|
6565
6578
|
exposure: ["cowork", "space_builder"],
|
|
6566
6579
|
constraints: {
|
|
6580
|
+
inputBilling: "h3-max-reference",
|
|
6567
6581
|
aspectRatios: [...H3_REFERENCE_RATIOS],
|
|
6568
6582
|
resolutions: ["480p", "768p", "1080p"],
|
|
6569
6583
|
durations: { min: 5, max: 15 },
|
|
@@ -6599,18 +6613,19 @@ var VIDEO_MODELS = [
|
|
|
6599
6613
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
|
|
6600
6614
|
},
|
|
6601
6615
|
{
|
|
6602
|
-
//
|
|
6603
|
-
// reference-to-video
|
|
6604
|
-
// https://
|
|
6616
|
+
// Alibaba Model Studio direct, one model id for text-, image- (first/last frame) and
|
|
6617
|
+
// reference-to-video. Reference-video seconds bill on top of the output seconds.
|
|
6618
|
+
// https://www.alibabacloud.com/help/en/model-studio/wan3-video-generation-api-reference
|
|
6605
6619
|
id: "wan-3.0",
|
|
6606
6620
|
aliases: ["wan-3", "wan3"],
|
|
6607
6621
|
label: "Wan 3",
|
|
6608
6622
|
type: "video",
|
|
6609
|
-
adapter: "
|
|
6610
|
-
providerModelId: "
|
|
6623
|
+
adapter: "alibaba",
|
|
6624
|
+
providerModelId: "wan3.0-video",
|
|
6611
6625
|
lifecycle: "active",
|
|
6612
6626
|
exposure: ["cowork", "space_builder"],
|
|
6613
6627
|
constraints: {
|
|
6628
|
+
inputBilling: "input-plus-output",
|
|
6614
6629
|
aspectRatios: [...WAN_RATIOS],
|
|
6615
6630
|
resolutions: ["480p", "720p", "1080p"],
|
|
6616
6631
|
durations: { min: 2, max: 30 },
|
|
@@ -6622,7 +6637,7 @@ var VIDEO_MODELS = [
|
|
|
6622
6637
|
videoSeconds: { total: 15 },
|
|
6623
6638
|
audioSeconds: { total: 15 }
|
|
6624
6639
|
},
|
|
6625
|
-
supports: ["seed", "lastFrame", "generateAudio"
|
|
6640
|
+
supports: ["seed", "lastFrame", "generateAudio"],
|
|
6626
6641
|
prompt: WAN_PROMPT,
|
|
6627
6642
|
audio: "optional"
|
|
6628
6643
|
},
|
|
@@ -6641,18 +6656,18 @@ var VIDEO_MODELS = [
|
|
|
6641
6656
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
|
|
6642
6657
|
},
|
|
6643
6658
|
{
|
|
6644
|
-
//
|
|
6645
|
-
//
|
|
6646
|
-
// https://fal.ai/models/alibaba/wan-3.0-prime/reference-to-video/api
|
|
6659
|
+
// Wan 3.0 Prime takes Wan 3.0's request field for field but bills more per second, so
|
|
6660
|
+
// Prime is its own row (the id is the pricing key).
|
|
6647
6661
|
id: "wan-3.0-prime",
|
|
6648
6662
|
aliases: ["wan-3-prime", "wan3-prime"],
|
|
6649
6663
|
label: "Wan 3 Prime",
|
|
6650
6664
|
type: "video",
|
|
6651
|
-
adapter: "
|
|
6652
|
-
providerModelId: "
|
|
6665
|
+
adapter: "alibaba",
|
|
6666
|
+
providerModelId: "wan3.0-video-prime",
|
|
6653
6667
|
lifecycle: "active",
|
|
6654
6668
|
exposure: ["cowork", "space_builder"],
|
|
6655
6669
|
constraints: {
|
|
6670
|
+
inputBilling: "input-plus-output",
|
|
6656
6671
|
aspectRatios: [...WAN_RATIOS],
|
|
6657
6672
|
resolutions: ["480p", "720p", "1080p"],
|
|
6658
6673
|
durations: { min: 2, max: 30 },
|
|
@@ -6664,7 +6679,7 @@ var VIDEO_MODELS = [
|
|
|
6664
6679
|
videoSeconds: { total: 15 },
|
|
6665
6680
|
audioSeconds: { total: 15 }
|
|
6666
6681
|
},
|
|
6667
|
-
supports: ["seed", "lastFrame", "generateAudio"
|
|
6682
|
+
supports: ["seed", "lastFrame", "generateAudio"],
|
|
6668
6683
|
prompt: WAN_PROMPT,
|
|
6669
6684
|
audio: "optional"
|
|
6670
6685
|
},
|
|
@@ -7316,7 +7331,18 @@ var PromptConventionsSchema = z.strictObject({
|
|
|
7316
7331
|
referenceSyntax: ReferenceSyntaxSchema,
|
|
7317
7332
|
maxChars: MaxCharsSchema.optional()
|
|
7318
7333
|
});
|
|
7334
|
+
var InputBillingSchema = z.enum([
|
|
7335
|
+
"seedance",
|
|
7336
|
+
"omni",
|
|
7337
|
+
"h3-max-reference",
|
|
7338
|
+
"h3-reference",
|
|
7339
|
+
"grok-input-image",
|
|
7340
|
+
"source-video-rate",
|
|
7341
|
+
"kling-v4",
|
|
7342
|
+
"input-plus-output"
|
|
7343
|
+
]);
|
|
7319
7344
|
var AUDIO_OUTPUTS = AudioOutputSchema.options;
|
|
7345
|
+
var INPUT_BILLINGS = InputBillingSchema.options;
|
|
7320
7346
|
var REFERENCE_SYNTAXES = ReferenceSyntaxSchema.options;
|
|
7321
7347
|
var ConstraintsReadView = z.looseObject({
|
|
7322
7348
|
audio: AudioOutputSchema.optional().catch(void 0),
|
|
@@ -7983,6 +8009,7 @@ var ADAPTER_IDS = [
|
|
|
7983
8009
|
"higgsfield",
|
|
7984
8010
|
"xai-video",
|
|
7985
8011
|
"luma",
|
|
8012
|
+
"alibaba",
|
|
7986
8013
|
"fish",
|
|
7987
8014
|
"elevenlabs"
|
|
7988
8015
|
];
|
|
@@ -8234,6 +8261,7 @@ var ModelConstraintsSchema = z3.looseObject({
|
|
|
8234
8261
|
// Loose on purpose: the read path keeps a row whose value is invalid (the accessors in
|
|
8235
8262
|
// conventions.ts read it as "not set"); CatalogModelSchema below rejects it on write.
|
|
8236
8263
|
audio: z3.unknown().optional(),
|
|
8264
|
+
inputBilling: z3.unknown().optional(),
|
|
8237
8265
|
prompt: z3.unknown().optional()
|
|
8238
8266
|
});
|
|
8239
8267
|
var MediaRefSchema = z3.union([
|
|
@@ -8426,6 +8454,14 @@ var CatalogModelSchema = CatalogModelSchemaBase.superRefine(
|
|
|
8426
8454
|
message: 'audio must be "always", "optional" or "never"'
|
|
8427
8455
|
});
|
|
8428
8456
|
}
|
|
8457
|
+
const inputBilling = row2.constraints.inputBilling;
|
|
8458
|
+
if (inputBilling !== void 0 && !InputBillingSchema.safeParse(inputBilling).success) {
|
|
8459
|
+
ctx.addIssue({
|
|
8460
|
+
code: "custom",
|
|
8461
|
+
path: ["constraints", "inputBilling"],
|
|
8462
|
+
message: `inputBilling must be one of ${INPUT_BILLINGS.join(", ")}`
|
|
8463
|
+
});
|
|
8464
|
+
}
|
|
8429
8465
|
const refs = row2.constraints.references;
|
|
8430
8466
|
for (const kind of ["images", "videos", "audios"]) {
|
|
8431
8467
|
const least = refs?.min?.[kind];
|
|
@@ -9241,7 +9277,8 @@ var QWEN_EXACT = {
|
|
|
9241
9277
|
maxSide: 14142,
|
|
9242
9278
|
minArea: 512 * 512,
|
|
9243
9279
|
maxArea: 2048 * 2048,
|
|
9244
|
-
multipleOf: 1
|
|
9280
|
+
multipleOf: 1,
|
|
9281
|
+
maxAspect: 8
|
|
9245
9282
|
};
|
|
9246
9283
|
var MINIMAX_H3_IMAGE_EXACT = {
|
|
9247
9284
|
minSide: 1,
|
|
@@ -9293,7 +9330,8 @@ var FAL_IMAGE_SPECS = /* @__PURE__ */ new Map([
|
|
|
9293
9330
|
}
|
|
9294
9331
|
],
|
|
9295
9332
|
[
|
|
9296
|
-
|
|
9333
|
+
// Alibaba direct (adapters/alibaba-image.ts); png only, which the adapter warns about.
|
|
9334
|
+
"qwen-image-3.0-pro",
|
|
9297
9335
|
{
|
|
9298
9336
|
label: "Qwen Image 3",
|
|
9299
9337
|
maxReferences: 3,
|
|
@@ -9460,7 +9498,7 @@ function falExactSize(spec, req) {
|
|
|
9460
9498
|
return check.ok ? check.size : void 0;
|
|
9461
9499
|
}
|
|
9462
9500
|
function applyFalImageRules(model, req, callerSize, warnings) {
|
|
9463
|
-
if (model.adapter !== "fal") return;
|
|
9501
|
+
if (model.adapter !== "fal" && model.adapter !== "alibaba") return;
|
|
9464
9502
|
const spec = falImageSpec(model.providerModelId);
|
|
9465
9503
|
if (spec === void 0) return;
|
|
9466
9504
|
const problem = falImageProblem(spec, withPromptForResolve(req));
|
|
@@ -9523,7 +9561,7 @@ var KLING_V4_FLASH_EDIT = "kling/v4/flash/video-to-video";
|
|
|
9523
9561
|
var H3_TURBO = "minimax/h3-max-turbo";
|
|
9524
9562
|
var H3_RECAST = "minimax/h3-max/recast";
|
|
9525
9563
|
var H3_RELIGHT = "minimax/h3-max/relight";
|
|
9526
|
-
var HAPPY_HORSE = "
|
|
9564
|
+
var HAPPY_HORSE = "happyhorse-1.1";
|
|
9527
9565
|
var HAPPY_HORSE_EDIT = "alibaba/happy-horse/video-edit";
|
|
9528
9566
|
var VIDU_Q4 = "fal-ai/vidu/q4";
|
|
9529
9567
|
var OMNIHUMAN_V2 = "bytedance/omnihuman/v2";
|
|
@@ -9728,7 +9766,7 @@ function fillKlingModeResolution(model, req) {
|
|
|
9728
9766
|
}
|
|
9729
9767
|
}
|
|
9730
9768
|
function applyFalVideoRules(model, req, callerRatio, warnings) {
|
|
9731
|
-
if (model.adapter !== "fal") return;
|
|
9769
|
+
if (model.adapter !== "fal" && model.adapter !== "alibaba") return;
|
|
9732
9770
|
const problem = falVideoProblem(model.providerModelId, withPromptForResolve(req));
|
|
9733
9771
|
if (problem !== void 0) throw ruleRefusal(model, problem.message, problem.code);
|
|
9734
9772
|
const id = model.providerModelId.toLowerCase();
|
|
@@ -10917,6 +10955,25 @@ function referenceImageConformPlan(model, probe) {
|
|
|
10917
10955
|
} : { ...frame };
|
|
10918
10956
|
return { ...frame, image, reasons };
|
|
10919
10957
|
}
|
|
10958
|
+
|
|
10959
|
+
// src/catalog/input-billing.ts
|
|
10960
|
+
import { z as z7 } from "zod";
|
|
10961
|
+
var DATA_ONLY_INPUT_BILLING = /* @__PURE__ */ new Map([
|
|
10962
|
+
["flux-3", "source-video-rate"]
|
|
10963
|
+
]);
|
|
10964
|
+
var KIT_INPUT_BILLING = new Map(
|
|
10965
|
+
MODELS.flatMap(
|
|
10966
|
+
(row2) => row2.constraints.inputBilling ? [[row2.id, row2.constraints.inputBilling]] : []
|
|
10967
|
+
)
|
|
10968
|
+
);
|
|
10969
|
+
var ConstraintsReadView2 = z7.looseObject({
|
|
10970
|
+
inputBilling: InputBillingSchema.optional().catch(void 0)
|
|
10971
|
+
});
|
|
10972
|
+
function inputBillingOf(row2) {
|
|
10973
|
+
const view = ConstraintsReadView2.safeParse(row2.constraints);
|
|
10974
|
+
const own = view.success ? view.data.inputBilling : void 0;
|
|
10975
|
+
return own ?? KIT_INPUT_BILLING.get(row2.id) ?? (row2.adapter === "ark" ? "seedance" : void 0) ?? DATA_ONLY_INPUT_BILLING.get(row2.id) ?? null;
|
|
10976
|
+
}
|
|
10920
10977
|
export {
|
|
10921
10978
|
ADAPTER_IDS,
|
|
10922
10979
|
AUDIO_OUTPUTS,
|
|
@@ -10926,6 +10983,7 @@ export {
|
|
|
10926
10983
|
CatalogSchema,
|
|
10927
10984
|
ExposureSchema,
|
|
10928
10985
|
IMAGE_MODELS,
|
|
10986
|
+
INPUT_BILLINGS,
|
|
10929
10987
|
MEDIA_METHODS,
|
|
10930
10988
|
MEDIA_NODE_MODELS,
|
|
10931
10989
|
MODEL3D_IMAGE_SLOTS,
|
|
@@ -10943,6 +11001,7 @@ export {
|
|
|
10943
11001
|
VideoResolutionSchema,
|
|
10944
11002
|
billedAudio,
|
|
10945
11003
|
compareCatalogOrder,
|
|
11004
|
+
inputBillingOf,
|
|
10946
11005
|
isListed,
|
|
10947
11006
|
isListedOn,
|
|
10948
11007
|
isModelKitError,
|