@picsart/ai-sdk 3.17.6 → 3.19.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/_vendor/workflows-types/index.d.ts +2340 -1575
- package/index.d.ts +54 -35
- package/index.js +100 -67
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1223,32 +1223,13 @@ type ModelInputById = {
|
|
|
1223
1223
|
resolution?: "720p" | "1024p" | "1080p";
|
|
1224
1224
|
duration?: 4 | 8 | 12 | 16 | 20;
|
|
1225
1225
|
};
|
|
1226
|
-
"topaz-enhance-cgi": {
|
|
1227
|
-
imageUrls: [string, ...string[]];
|
|
1228
|
-
};
|
|
1229
|
-
"topaz-enhance-high-fidelity-v2": {
|
|
1230
|
-
imageUrls: [string, ...string[]];
|
|
1231
|
-
};
|
|
1232
|
-
"topaz-enhance-low-res-v2": {
|
|
1233
|
-
imageUrls: [string, ...string[]];
|
|
1234
|
-
};
|
|
1235
|
-
"topaz-enhance-recovery": {
|
|
1236
|
-
imageUrls: [string, ...string[]];
|
|
1237
|
-
};
|
|
1238
|
-
"topaz-enhance-recovery-v2": {
|
|
1239
|
-
imageUrls: [string, ...string[]];
|
|
1240
|
-
};
|
|
1241
|
-
"topaz-enhance-redefine": {
|
|
1242
|
-
imageUrls: [string, ...string[]];
|
|
1243
|
-
};
|
|
1244
|
-
"topaz-enhance-standard-v2": {
|
|
1245
|
-
imageUrls: [string, ...string[]];
|
|
1246
|
-
};
|
|
1247
|
-
"topaz-enhance-text-refine": {
|
|
1248
|
-
imageUrls: [string, ...string[]];
|
|
1249
|
-
};
|
|
1250
1226
|
"topaz-upscale-image": {
|
|
1251
1227
|
imageUrls: [string, ...string[]];
|
|
1228
|
+
model?: "Standard V2" | "Standard MAX" | "Low Resolution V2" | "High Fidelity V2" | "CGI" | "Text Refine" | "Redefine" | "Recovery" | "Recovery V2" | "Wonder" | "Wonder 3";
|
|
1229
|
+
};
|
|
1230
|
+
"topaz-upscale-video": {
|
|
1231
|
+
videoUrl: string;
|
|
1232
|
+
model?: "Proteus" | "Artemis HQ" | "Artemis MQ" | "Artemis LQ" | "Nyx" | "Nyx Fast" | "Nyx XL" | "Nyx HF" | "Gaia HQ" | "Gaia CG" | "Gaia 2" | "Starlight Precise 1" | "Starlight Precise 2" | "Starlight Precise 2.5" | "Starlight HQ" | "Starlight Mini" | "Starlight Sharp" | "Starlight Fast 1" | "Starlight Fast 2";
|
|
1252
1233
|
};
|
|
1253
1234
|
"veed-fabric-v1": {
|
|
1254
1235
|
prompt?: string;
|
|
@@ -1798,6 +1779,8 @@ interface ModelMeta {
|
|
|
1798
1779
|
readonly features: ModelFeature[];
|
|
1799
1780
|
readonly badges: BadgeType[];
|
|
1800
1781
|
readonly provider: ProviderInfo;
|
|
1782
|
+
/** Release / availability tier (EAI-3). Absent on the definition ⇒ `'production'`. */
|
|
1783
|
+
readonly release: ReleaseTag;
|
|
1801
1784
|
}
|
|
1802
1785
|
/** Parameter operations — fluent access to model params, schemas, defaults. */
|
|
1803
1786
|
interface ModelParamsAccessor {
|
|
@@ -1870,6 +1853,14 @@ interface ModelDescriptor {
|
|
|
1870
1853
|
interface ModelFilter$1 {
|
|
1871
1854
|
output?: GenerationMode;
|
|
1872
1855
|
provider?: string;
|
|
1856
|
+
/**
|
|
1857
|
+
* Release tiers to include. Omitted ⇒ the default visible set
|
|
1858
|
+
* (`['production', 'general-availability']`). List the tiers you want
|
|
1859
|
+
* explicitly to opt into `preview` — e.g. `['preview']` for stage-only
|
|
1860
|
+
* models, or all three to include everything. `disabled`/`deprecated`
|
|
1861
|
+
* models stay hidden regardless.
|
|
1862
|
+
*/
|
|
1863
|
+
release?: ReleaseTag[];
|
|
1873
1864
|
}
|
|
1874
1865
|
|
|
1875
1866
|
type AppProvider = 'picsart' | 'google' | 'kling' | 'grok' | 'openai' | 'flux' | 'ideogram' | 'elevenlabs' | 'minimax' | 'wan' | 'seedance' | 'ltx' | 'seedream' | 'hunyuan' | 'pika' | 'runway' | 'luma' | 'ovi' | 'creatify' | 'veed' | 'bytedance' | 'qwen' | 'reve' | 'recraft' | 'videography' | 'topaz' | 'heygen' | 'happyhorse' | 'pixverse' | 'anthropic' | 'async';
|
|
@@ -2007,6 +1998,12 @@ interface Constraint {
|
|
|
2007
1998
|
then: Record<string, Restriction>;
|
|
2008
1999
|
}
|
|
2009
2000
|
type BadgeType = 'new' | 'popular' | 'coming-soon' | 'fast' | 'premium' | 'hot';
|
|
2001
|
+
/**
|
|
2002
|
+
* Model release / availability tier. See `ModelDefinition.release`.
|
|
2003
|
+
* Ordered widest-exposure-last: `preview` (stage only) → `production` (our
|
|
2004
|
+
* apps) → `general-availability` (enterprise / external use).
|
|
2005
|
+
*/
|
|
2006
|
+
type ReleaseTag = 'preview' | 'production' | 'general-availability';
|
|
2010
2007
|
interface ModelDefinition {
|
|
2011
2008
|
id: string;
|
|
2012
2009
|
name: string;
|
|
@@ -2038,6 +2035,7 @@ interface ModelDefinition {
|
|
|
2038
2035
|
* from default catalog lookups, same as `disabled`.
|
|
2039
2036
|
*/
|
|
2040
2037
|
deprecated?: boolean;
|
|
2038
|
+
release?: ReleaseTag;
|
|
2041
2039
|
mode: GenerationMode;
|
|
2042
2040
|
inputType: InputType;
|
|
2043
2041
|
modelId?: string;
|
|
@@ -2242,15 +2240,8 @@ declare const Models: {
|
|
|
2242
2240
|
readonly Sora2: "sora-2";
|
|
2243
2241
|
readonly Sora2Extend: "sora-2-extend";
|
|
2244
2242
|
readonly Sora2Pro: "sora-2-pro";
|
|
2245
|
-
readonly TopazEnhanceCgi: "topaz-enhance-cgi";
|
|
2246
|
-
readonly TopazEnhanceHighFidelityV2: "topaz-enhance-high-fidelity-v2";
|
|
2247
|
-
readonly TopazEnhanceLowResV2: "topaz-enhance-low-res-v2";
|
|
2248
|
-
readonly TopazEnhanceRecovery: "topaz-enhance-recovery";
|
|
2249
|
-
readonly TopazEnhanceRecoveryV2: "topaz-enhance-recovery-v2";
|
|
2250
|
-
readonly TopazEnhanceRedefine: "topaz-enhance-redefine";
|
|
2251
|
-
readonly TopazEnhanceStandardV2: "topaz-enhance-standard-v2";
|
|
2252
|
-
readonly TopazEnhanceTextRefine: "topaz-enhance-text-refine";
|
|
2253
2243
|
readonly TopazUpscaleImage: "topaz-upscale-image";
|
|
2244
|
+
readonly TopazUpscaleVideo: "topaz-upscale-video";
|
|
2254
2245
|
readonly VeedFabricV1: "veed-fabric-v1";
|
|
2255
2246
|
readonly VeedFabricV1Fast: "veed-fabric-v1-fast";
|
|
2256
2247
|
readonly Veo31: "veo-3.1";
|
|
@@ -2321,9 +2312,13 @@ declare function isPricingLoaded(): boolean;
|
|
|
2321
2312
|
|
|
2322
2313
|
/** Look up a single model descriptor by id. */
|
|
2323
2314
|
type ModelFunction = (id: string) => ModelDescriptor;
|
|
2324
|
-
declare function _all(
|
|
2315
|
+
declare function _all(filter?: {
|
|
2316
|
+
release?: readonly ReleaseTag[];
|
|
2317
|
+
}): ModelDescriptor[];
|
|
2325
2318
|
declare function _find(filter: ModelFilter$1): ModelDescriptor[];
|
|
2326
|
-
declare function _search(query: string
|
|
2319
|
+
declare function _search(query: string, filter?: {
|
|
2320
|
+
release?: readonly ReleaseTag[];
|
|
2321
|
+
}): ModelDescriptor[];
|
|
2327
2322
|
/** Look up a single model descriptor: `Model('flux-2-pro').params()`. */
|
|
2328
2323
|
declare const Model: ModelFunction;
|
|
2329
2324
|
/**
|
|
@@ -2367,8 +2362,32 @@ declare function decodeDeepLinkPayload(encoded: string): DeepLinkResult | null;
|
|
|
2367
2362
|
|
|
2368
2363
|
/** All models from all vendors. */
|
|
2369
2364
|
declare const ALL_MODELS: ModelDefinition[];
|
|
2365
|
+
/**
|
|
2366
|
+
* Models for a generation mode. By default returns only default-visible models
|
|
2367
|
+
* (production / general-availability — preview, disabled and deprecated are
|
|
2368
|
+
* hidden). `includeDisabled = true` returns every model of the mode, bypassing
|
|
2369
|
+
* all gates. For release-tier filtering use `catalog.find({ output, release })`.
|
|
2370
|
+
*/
|
|
2370
2371
|
declare const getModelsByMode: (mode: ModelDefinition["mode"], includeDisabled?: boolean) => ModelDefinition[];
|
|
2371
2372
|
|
|
2373
|
+
/**
|
|
2374
|
+
* Release tags shown by default in discovery. `preview` is stage-only and
|
|
2375
|
+
* opt-in (pass `release: ['preview', ...]`) — it is never in the default set.
|
|
2376
|
+
*/
|
|
2377
|
+
declare const DEFAULT_VISIBLE_RELEASES: readonly ReleaseTag[];
|
|
2378
|
+
/** Effective release tag of a model — absent ⇒ `'production'`. */
|
|
2379
|
+
declare const releaseOf: (m: ModelDefinition) => ReleaseTag;
|
|
2380
|
+
/**
|
|
2381
|
+
* Whether `m` is visible for the requested `releases` (default: the production
|
|
2382
|
+
* + general-availability set).
|
|
2383
|
+
*
|
|
2384
|
+
* `disabled` and `deprecated` are hard hides layered on top of `release`: a
|
|
2385
|
+
* model carrying either is never visible, regardless of its release tag or the
|
|
2386
|
+
* requested set. (`disabled` is being phased out in favour of
|
|
2387
|
+
* `release: 'preview'` — EAI-3 — but is still honoured during the migration.)
|
|
2388
|
+
*/
|
|
2389
|
+
declare function isVisibleForReleases(m: ModelDefinition, releases?: readonly ReleaseTag[]): boolean;
|
|
2390
|
+
|
|
2372
2391
|
/** Look up a model by its ID or vendor modelId. */
|
|
2373
2392
|
declare const getModel: (id: string) => ModelDefinition | undefined;
|
|
2374
2393
|
/** Find a model by ID, workflow name, or display name (case-insensitive). */
|
|
@@ -2377,4 +2396,4 @@ declare const findModel: (ref: string) => ModelDefinition | undefined;
|
|
|
2377
2396
|
/** Effect scenes that require two input images (e.g. hugs, kisses, swaps). */
|
|
2378
2397
|
declare const KLING_DUAL_IMAGE_EFFECTS: ReadonlySet<string>;
|
|
2379
2398
|
|
|
2380
|
-
export { ALL_MODELS, type AiClient, type ApiResponse, type ApiRunOptions, type ApiSchemas, type ApisClient, type AppIdentity, type AppType, type AuthenticatedFetch, type AvatarOption, type BooleanDescriptor, type BooleanEntry, type ClientConfig, type CreditRange, type CreditRangeContext, type DeepLinkResult, type DriveAttributes, type DriveClient, type DriveConfig, type DriveFile, type DriveFileDetails, type DriveFolder, type DriveMediaItem, type DriveSaveResult, type EntryMeta, type EnumDescriptor, type EnumEntry, type EnumOption, type FileDescriptor, type FileEntry, type FlatParamEntry, type GenerateOptions, type GenerateResult, type GenerateResultItem, type GenerateTextResult, type GenerationContext, type GenerationFile, type GenerationMode, KLING_DUAL_IMAGE_EFFECTS, type ListOptions, type MediaModelId, type MediaTypeFilter, Model, type ModelDefinition, type ModelDescriptor, type ModelFilter$1 as ModelFilter, type ModelInput, type ModelInputById, type ModelMeta, type ModelParams, type ModelParamsAccessor, Models, type ObjectDescriptor, type ObjectEntry, type ParamDescriptor, type ParamEntry, type ParamOption, type PayloadDriveFolderOptions, type PayloadDriveOptions, type PricingOptions, type ProviderInfo, type RangeDescriptor, type RangeEntry, type SaveParams, type SdkPayload, type SdkTransport, type TextDescriptor, type TextEntry, type TextModelId, type TextModelInputById, type TypedModelId, type UserReaction, type ValidationResult$1 as ValidationResult, type VoiceOption, type WorkflowJobHandle, buildFilename, buildGenerationAttributes, catalog, createClient, decodeDeepLinkPayload, encodeDeepLinkPayload, findModel, getModel, getModelsByMode, getVoiceById, inferResourceType, parseGeneration };
|
|
2399
|
+
export { ALL_MODELS, type AiClient, type ApiResponse, type ApiRunOptions, type ApiSchemas, type ApisClient, type AppIdentity, type AppType, type AuthenticatedFetch, type AvatarOption, type BooleanDescriptor, type BooleanEntry, type ClientConfig, type CreditRange, type CreditRangeContext, DEFAULT_VISIBLE_RELEASES, type DeepLinkResult, type DriveAttributes, type DriveClient, type DriveConfig, type DriveFile, type DriveFileDetails, type DriveFolder, type DriveMediaItem, type DriveSaveResult, type EntryMeta, type EnumDescriptor, type EnumEntry, type EnumOption, type FileDescriptor, type FileEntry, type FlatParamEntry, type GenerateOptions, type GenerateResult, type GenerateResultItem, type GenerateTextResult, type GenerationContext, type GenerationFile, type GenerationMode, KLING_DUAL_IMAGE_EFFECTS, type ListOptions, type MediaModelId, type MediaTypeFilter, Model, type ModelDefinition, type ModelDescriptor, type ModelFilter$1 as ModelFilter, type ModelInput, type ModelInputById, type ModelMeta, type ModelParams, type ModelParamsAccessor, Models, type ObjectDescriptor, type ObjectEntry, type ParamDescriptor, type ParamEntry, type ParamOption, type PayloadDriveFolderOptions, type PayloadDriveOptions, type PricingOptions, type ProviderInfo, type RangeDescriptor, type RangeEntry, type ReleaseTag, type SaveParams, type SdkPayload, type SdkTransport, type TextDescriptor, type TextEntry, type TextModelId, type TextModelInputById, type TypedModelId, type UserReaction, type ValidationResult$1 as ValidationResult, type VoiceOption, type WorkflowJobHandle, buildFilename, buildGenerationAttributes, catalog, createClient, decodeDeepLinkPayload, encodeDeepLinkPayload, findModel, getModel, getModelsByMode, getVoiceById, inferResourceType, isVisibleForReleases, parseGeneration, releaseOf };
|
package/index.js
CHANGED
|
@@ -639,6 +639,14 @@ function transferValues(newParams, prev) {
|
|
|
639
639
|
return ctx;
|
|
640
640
|
}
|
|
641
641
|
|
|
642
|
+
// src/core/visibility.ts
|
|
643
|
+
var DEFAULT_VISIBLE_RELEASES = ["production", "general-availability"];
|
|
644
|
+
var releaseOf = (m) => m.release ?? "production";
|
|
645
|
+
function isVisibleForReleases(m, releases = DEFAULT_VISIBLE_RELEASES) {
|
|
646
|
+
if (m.disabled || m.deprecated) return false;
|
|
647
|
+
return releases.includes(releaseOf(m));
|
|
648
|
+
}
|
|
649
|
+
|
|
642
650
|
// src/core/providers.ts
|
|
643
651
|
var providers = {
|
|
644
652
|
picsart: { color: "#FF3399", label: "PA", name: "Picsart" },
|
|
@@ -1028,6 +1036,7 @@ function defineModels(provider, configs) {
|
|
|
1028
1036
|
if (c.addedAt !== void 0) model.addedAt = c.addedAt;
|
|
1029
1037
|
if (c.disabled !== void 0) model.disabled = c.disabled;
|
|
1030
1038
|
if (c.deprecated !== void 0) model.deprecated = c.deprecated;
|
|
1039
|
+
if (c.release !== void 0) model.release = c.release;
|
|
1031
1040
|
if (c.modelId !== void 0) model.modelId = c.modelId;
|
|
1032
1041
|
if (c.constraints !== void 0) model.constraints = c.constraints;
|
|
1033
1042
|
const contract = createModelContract(model);
|
|
@@ -6909,63 +6918,96 @@ var { MODELS: MODELS29 } = defineModels("recraft", [
|
|
|
6909
6918
|
]);
|
|
6910
6919
|
|
|
6911
6920
|
// src/vendors/catalog/topaz.ts
|
|
6912
|
-
var
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6921
|
+
var TOPAZ_IMAGE_MODEL_OPTIONS = [
|
|
6922
|
+
"Standard V2",
|
|
6923
|
+
"Standard MAX",
|
|
6924
|
+
"Low Resolution V2",
|
|
6925
|
+
"High Fidelity V2",
|
|
6926
|
+
"CGI",
|
|
6927
|
+
"Text Refine",
|
|
6928
|
+
"Redefine",
|
|
6929
|
+
"Recovery",
|
|
6930
|
+
"Recovery V2",
|
|
6931
|
+
"Wonder",
|
|
6932
|
+
"Wonder 3"
|
|
6933
|
+
];
|
|
6934
|
+
var TOPAZ_VIDEO_MODEL_OPTIONS = [
|
|
6935
|
+
"Proteus",
|
|
6936
|
+
"Artemis HQ",
|
|
6937
|
+
"Artemis MQ",
|
|
6938
|
+
"Artemis LQ",
|
|
6939
|
+
"Nyx",
|
|
6940
|
+
"Nyx Fast",
|
|
6941
|
+
"Nyx XL",
|
|
6942
|
+
"Nyx HF",
|
|
6943
|
+
"Gaia HQ",
|
|
6944
|
+
"Gaia CG",
|
|
6945
|
+
"Gaia 2",
|
|
6946
|
+
"Starlight Precise 1",
|
|
6947
|
+
"Starlight Precise 2",
|
|
6948
|
+
"Starlight Precise 2.5",
|
|
6949
|
+
"Starlight HQ",
|
|
6950
|
+
"Starlight Mini",
|
|
6951
|
+
"Starlight Sharp",
|
|
6952
|
+
"Starlight Fast 1",
|
|
6953
|
+
"Starlight Fast 2"
|
|
6938
6954
|
];
|
|
6939
6955
|
var { MODELS: MODELS30 } = defineModels("topaz", [
|
|
6940
6956
|
{
|
|
6941
6957
|
id: "topaz-upscale-image",
|
|
6942
|
-
name: "Topaz
|
|
6958
|
+
name: "Topaz Image Upscale",
|
|
6943
6959
|
addedAt: "2026-03-06",
|
|
6944
6960
|
workflow: "topaz/upscale/image",
|
|
6945
|
-
buildPayload: buildTopazUpscalePayload,
|
|
6946
6961
|
estimatedTime: 30,
|
|
6947
6962
|
mode: "image",
|
|
6948
6963
|
inputType: "i2i",
|
|
6949
|
-
description: "
|
|
6964
|
+
description: "Image upscaling and enhancement with Topaz AI \u2014 Standard, Hi-Fi, CGI, Recovery and Wonder models.",
|
|
6950
6965
|
features: [feat("Upscale", "quality"), feat("Image Required", "input")],
|
|
6951
|
-
paramConfig: {
|
|
6966
|
+
paramConfig: {
|
|
6967
|
+
...params.imageInput(1, "Image", true),
|
|
6968
|
+
...p.enum("model", [...TOPAZ_IMAGE_MODEL_OPTIONS], "Standard V2", { label: "Model" })
|
|
6969
|
+
}
|
|
6952
6970
|
},
|
|
6953
|
-
|
|
6954
|
-
id:
|
|
6955
|
-
|
|
6956
|
-
addedAt: "2026-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6971
|
+
{
|
|
6972
|
+
id: "topaz-upscale-video",
|
|
6973
|
+
name: "Topaz Video Upscale",
|
|
6974
|
+
addedAt: "2026-07-21",
|
|
6975
|
+
workflow: "topaz/upscale/video",
|
|
6976
|
+
estimatedTime: 600,
|
|
6977
|
+
mode: "video",
|
|
6978
|
+
inputType: "v2v",
|
|
6979
|
+
description: "Video upscaling and enhancement with Topaz AI \u2014 Proteus, Artemis, Nyx, Gaia and Starlight models.",
|
|
6980
|
+
features: [feat("Upscale", "quality"), feat("Video Required", "input")],
|
|
6981
|
+
paramConfig: {
|
|
6982
|
+
...params.videoInput("Source Video", "asset", true),
|
|
6983
|
+
...p.enum("model", [...TOPAZ_VIDEO_MODEL_OPTIONS], "Proteus", { label: "Model" })
|
|
6984
|
+
}
|
|
6985
|
+
}
|
|
6967
6986
|
]);
|
|
6968
6987
|
|
|
6988
|
+
// src/vendors/catalog/topaz.payloads.ts
|
|
6989
|
+
var buildTopazImagePayload = (input) => ({
|
|
6990
|
+
image_url: input.imageUrls[0],
|
|
6991
|
+
model: input.model ?? "Standard V2",
|
|
6992
|
+
upscale_factor: 2,
|
|
6993
|
+
output_format: "png",
|
|
6994
|
+
face_enhancement: false,
|
|
6995
|
+
face_enhancement_creativity: 0,
|
|
6996
|
+
face_enhancement_strength: 0.8,
|
|
6997
|
+
subject_detection: "All",
|
|
6998
|
+
crop_to_fill: false
|
|
6999
|
+
});
|
|
7000
|
+
var buildTopazVideoPayload = (input) => ({
|
|
7001
|
+
video_url: input.videoUrl,
|
|
7002
|
+
model: input.model ?? "Proteus",
|
|
7003
|
+
upscale_factor: 2,
|
|
7004
|
+
H264_output: false
|
|
7005
|
+
});
|
|
7006
|
+
registerPayloads(MODELS30, {
|
|
7007
|
+
"topaz-upscale-image": buildTopazImagePayload,
|
|
7008
|
+
"topaz-upscale-video": buildTopazVideoPayload
|
|
7009
|
+
});
|
|
7010
|
+
|
|
6969
7011
|
// src/vendors/catalog/picsart.ts
|
|
6970
7012
|
var MAX_WORDS = 77;
|
|
6971
7013
|
var truncateWords = (text) => {
|
|
@@ -7826,7 +7868,7 @@ var ALL_MODELS = [
|
|
|
7826
7868
|
...MODELS35,
|
|
7827
7869
|
...MODELS36
|
|
7828
7870
|
];
|
|
7829
|
-
var getModelsByMode = (mode, includeDisabled = false) => ALL_MODELS.filter((m) => m.mode === mode && (includeDisabled ||
|
|
7871
|
+
var getModelsByMode = (mode, includeDisabled = false) => ALL_MODELS.filter((m) => m.mode === mode && (includeDisabled || isVisibleForReleases(m)));
|
|
7830
7872
|
|
|
7831
7873
|
// src/core/contracts.ts
|
|
7832
7874
|
function requireObject(value, message) {
|
|
@@ -9617,12 +9659,14 @@ var ModelMetaImpl = class {
|
|
|
9617
9659
|
features;
|
|
9618
9660
|
badges;
|
|
9619
9661
|
provider;
|
|
9662
|
+
release;
|
|
9620
9663
|
constructor(def) {
|
|
9621
9664
|
this.mode = def.mode;
|
|
9622
9665
|
this.inputType = def.inputType;
|
|
9623
9666
|
this.description = def.description;
|
|
9624
9667
|
this.features = def.features;
|
|
9625
9668
|
this.badges = def.badge ?? [];
|
|
9669
|
+
this.release = def.release ?? "production";
|
|
9626
9670
|
this.provider = {
|
|
9627
9671
|
id: def.provider,
|
|
9628
9672
|
name: def.providerName,
|
|
@@ -9678,21 +9722,24 @@ var ModelDescriptorImpl = class {
|
|
|
9678
9722
|
function _model(id) {
|
|
9679
9723
|
return new ModelDescriptorImpl(resolveModel(id));
|
|
9680
9724
|
}
|
|
9681
|
-
function _all() {
|
|
9682
|
-
|
|
9725
|
+
function _all(filter = {}) {
|
|
9726
|
+
const releases = filter.release ?? DEFAULT_VISIBLE_RELEASES;
|
|
9727
|
+
return ALL_MODELS.filter((m) => isVisibleForReleases(m, releases)).map((m) => new ModelDescriptorImpl(m));
|
|
9683
9728
|
}
|
|
9684
9729
|
function _find(filter) {
|
|
9730
|
+
const releases = filter.release ?? DEFAULT_VISIBLE_RELEASES;
|
|
9685
9731
|
return ALL_MODELS.filter((m) => {
|
|
9686
|
-
if (m
|
|
9732
|
+
if (!isVisibleForReleases(m, releases)) return false;
|
|
9687
9733
|
if (filter.output && m.mode !== filter.output) return false;
|
|
9688
9734
|
if (filter.provider && m.provider !== filter.provider) return false;
|
|
9689
9735
|
return true;
|
|
9690
9736
|
}).map((m) => new ModelDescriptorImpl(m));
|
|
9691
9737
|
}
|
|
9692
|
-
function _search(query) {
|
|
9738
|
+
function _search(query, filter = {}) {
|
|
9739
|
+
const releases = filter.release ?? DEFAULT_VISIBLE_RELEASES;
|
|
9693
9740
|
const q = query.toLowerCase();
|
|
9694
9741
|
return ALL_MODELS.filter(
|
|
9695
|
-
(m) =>
|
|
9742
|
+
(m) => isVisibleForReleases(m, releases) && (m.id.toLowerCase().includes(q) || m.name.toLowerCase().includes(q) || m.provider.toLowerCase().includes(q))
|
|
9696
9743
|
).map((m) => new ModelDescriptorImpl(m));
|
|
9697
9744
|
}
|
|
9698
9745
|
var Model = _model;
|
|
@@ -9882,15 +9929,8 @@ var Seedream50Pro = "seedream-5.0-pro";
|
|
|
9882
9929
|
var Sora2 = "sora-2";
|
|
9883
9930
|
var Sora2Extend = "sora-2-extend";
|
|
9884
9931
|
var Sora2Pro = "sora-2-pro";
|
|
9885
|
-
var TopazEnhanceCgi = "topaz-enhance-cgi";
|
|
9886
|
-
var TopazEnhanceHighFidelityV2 = "topaz-enhance-high-fidelity-v2";
|
|
9887
|
-
var TopazEnhanceLowResV2 = "topaz-enhance-low-res-v2";
|
|
9888
|
-
var TopazEnhanceRecovery = "topaz-enhance-recovery";
|
|
9889
|
-
var TopazEnhanceRecoveryV2 = "topaz-enhance-recovery-v2";
|
|
9890
|
-
var TopazEnhanceRedefine = "topaz-enhance-redefine";
|
|
9891
|
-
var TopazEnhanceStandardV2 = "topaz-enhance-standard-v2";
|
|
9892
|
-
var TopazEnhanceTextRefine = "topaz-enhance-text-refine";
|
|
9893
9932
|
var TopazUpscaleImage = "topaz-upscale-image";
|
|
9933
|
+
var TopazUpscaleVideo = "topaz-upscale-video";
|
|
9894
9934
|
var VeedFabricV1 = "veed-fabric-v1";
|
|
9895
9935
|
var VeedFabricV1Fast = "veed-fabric-v1-fast";
|
|
9896
9936
|
var Veo31 = "veo-3.1";
|
|
@@ -10078,15 +10118,8 @@ var Models = {
|
|
|
10078
10118
|
Sora2,
|
|
10079
10119
|
Sora2Extend,
|
|
10080
10120
|
Sora2Pro,
|
|
10081
|
-
TopazEnhanceCgi,
|
|
10082
|
-
TopazEnhanceHighFidelityV2,
|
|
10083
|
-
TopazEnhanceLowResV2,
|
|
10084
|
-
TopazEnhanceRecovery,
|
|
10085
|
-
TopazEnhanceRecoveryV2,
|
|
10086
|
-
TopazEnhanceRedefine,
|
|
10087
|
-
TopazEnhanceStandardV2,
|
|
10088
|
-
TopazEnhanceTextRefine,
|
|
10089
10121
|
TopazUpscaleImage,
|
|
10122
|
+
TopazUpscaleVideo,
|
|
10090
10123
|
VeedFabricV1,
|
|
10091
10124
|
VeedFabricV1Fast,
|
|
10092
10125
|
Veo31,
|
|
@@ -10314,4 +10347,4 @@ function decodeDeepLinkPayload(encoded) {
|
|
|
10314
10347
|
return deserializePayload(encoded);
|
|
10315
10348
|
}
|
|
10316
10349
|
|
|
10317
|
-
export { ALL_MODELS, ExecutionMode as ApiRunMode, KLING_DUAL_IMAGE_EFFECTS, Model, Models, buildFilename, buildGenerationAttributes, catalog, createClient, decodeDeepLinkPayload, encodeDeepLinkPayload, findModel, getModel, getModelsByMode, getVoiceById, inferResourceType, parseGeneration };
|
|
10350
|
+
export { ALL_MODELS, ExecutionMode as ApiRunMode, DEFAULT_VISIBLE_RELEASES, KLING_DUAL_IMAGE_EFFECTS, Model, Models, buildFilename, buildGenerationAttributes, catalog, createClient, decodeDeepLinkPayload, encodeDeepLinkPayload, findModel, getModel, getModelsByMode, getVoiceById, inferResourceType, isVisibleForReleases, parseGeneration, releaseOf };
|