@shop-os/modelkit 0.1.7 → 0.1.9
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 +166 -0
- package/README.md +16 -0
- package/dist/catalog.cjs +2239 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +479 -0
- package/dist/catalog.d.ts +479 -0
- package/dist/catalog.js +2216 -0
- package/dist/catalog.js.map +1 -0
- package/dist/index.cjs +295 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +295 -35
- package/dist/index.js.map +1 -1
- package/package.json +9 -3
package/dist/index.d.cts
CHANGED
|
@@ -171,6 +171,15 @@ interface ModelConstraints {
|
|
|
171
171
|
min: number;
|
|
172
172
|
max: number;
|
|
173
173
|
} | number[];
|
|
174
|
+
/** Curated UI choices when `durations` is a range; `resolveOptions` ignores it. */
|
|
175
|
+
durationPresets?: number[];
|
|
176
|
+
/** Curated quality choices for rows whose `supports` includes "quality". */
|
|
177
|
+
qualityOptions?: string[];
|
|
178
|
+
/**
|
|
179
|
+
* Exact pixel size per aspect ratio for rows an app must size verbatim
|
|
180
|
+
* (gpt-image-2 keeps its historic WxH contract); callers pass it as `exactSize`.
|
|
181
|
+
*/
|
|
182
|
+
exactSizes?: Record<string, string>;
|
|
174
183
|
references?: ReferenceLimits;
|
|
175
184
|
requires?: RequiredInput[];
|
|
176
185
|
supports?: SupportedOption[];
|
|
@@ -208,6 +217,15 @@ interface CatalogDisplay {
|
|
|
208
217
|
description: string;
|
|
209
218
|
/** CDN URL of the vendor or model logo. */
|
|
210
219
|
logo?: string;
|
|
220
|
+
/** Chat picker cost bucket: 1 = cheapest tier (Haiku/Flash/mini), 2 = Sonnet class, 3 = Opus/Pro/frontier. */
|
|
221
|
+
costTier?: 1 | 2 | 3;
|
|
222
|
+
/** Chat picker highlight flag. */
|
|
223
|
+
recommended?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Picker position: lower comes first; rows without one keep catalog order
|
|
226
|
+
* after the ordered ones. Set it to surface a new model at the top.
|
|
227
|
+
*/
|
|
228
|
+
sortOrder?: number;
|
|
211
229
|
}
|
|
212
230
|
/** Capability flags a UI keys off. Absent means false / unknown. */
|
|
213
231
|
interface CatalogCapabilities {
|
|
@@ -219,7 +237,8 @@ interface CatalogCapabilities {
|
|
|
219
237
|
acceptsSourceVideo?: boolean;
|
|
220
238
|
/** Video rows: first/last frames and reference images are mutually exclusive inputs. */
|
|
221
239
|
framesExcludeReferences?: boolean;
|
|
222
|
-
/** Text rows. */
|
|
240
|
+
/** Text rows. `reasoning`: the model streams reasoning the UI should surface. */
|
|
241
|
+
reasoning?: boolean;
|
|
223
242
|
vision?: boolean;
|
|
224
243
|
tools?: boolean;
|
|
225
244
|
structuredOutput?: boolean;
|
|
@@ -236,12 +255,27 @@ interface CatalogModel {
|
|
|
236
255
|
providerModelId: string;
|
|
237
256
|
lifecycle: Lifecycle;
|
|
238
257
|
replacedBy?: string;
|
|
258
|
+
/**
|
|
259
|
+
* "catalog" = offered in product pickers (Creative Studio, chat, Space Builder);
|
|
260
|
+
* "internal" = callable by id only.
|
|
261
|
+
*/
|
|
262
|
+
exposure: "catalog" | "internal";
|
|
239
263
|
constraints: ModelConstraints;
|
|
240
|
-
defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"
|
|
264
|
+
defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"> & {
|
|
265
|
+
temperature?: number;
|
|
266
|
+
}>;
|
|
267
|
+
/** Provider options merged under the caller's; text rows carry their reasoning / thinking tuning here. */
|
|
241
268
|
providerOptions?: ProviderOptions;
|
|
269
|
+
/**
|
|
270
|
+
* `slug` and `providerLabel` keep an app's historic usage-event names for a
|
|
271
|
+
* row (e.g. cowork emits `image_gen_<slug>` from provider `<providerLabel>`);
|
|
272
|
+
* absent means the app derives them from the id and display.provider.
|
|
273
|
+
*/
|
|
242
274
|
usage: {
|
|
243
275
|
unit: UsageUnit;
|
|
244
276
|
modality: UsageModality;
|
|
277
|
+
slug?: string;
|
|
278
|
+
providerLabel?: string;
|
|
245
279
|
};
|
|
246
280
|
pricingKind: PricingKind;
|
|
247
281
|
/** Required on every `active` row so a picker can render it without a hand-written catalog. */
|
package/dist/index.d.ts
CHANGED
|
@@ -171,6 +171,15 @@ interface ModelConstraints {
|
|
|
171
171
|
min: number;
|
|
172
172
|
max: number;
|
|
173
173
|
} | number[];
|
|
174
|
+
/** Curated UI choices when `durations` is a range; `resolveOptions` ignores it. */
|
|
175
|
+
durationPresets?: number[];
|
|
176
|
+
/** Curated quality choices for rows whose `supports` includes "quality". */
|
|
177
|
+
qualityOptions?: string[];
|
|
178
|
+
/**
|
|
179
|
+
* Exact pixel size per aspect ratio for rows an app must size verbatim
|
|
180
|
+
* (gpt-image-2 keeps its historic WxH contract); callers pass it as `exactSize`.
|
|
181
|
+
*/
|
|
182
|
+
exactSizes?: Record<string, string>;
|
|
174
183
|
references?: ReferenceLimits;
|
|
175
184
|
requires?: RequiredInput[];
|
|
176
185
|
supports?: SupportedOption[];
|
|
@@ -208,6 +217,15 @@ interface CatalogDisplay {
|
|
|
208
217
|
description: string;
|
|
209
218
|
/** CDN URL of the vendor or model logo. */
|
|
210
219
|
logo?: string;
|
|
220
|
+
/** Chat picker cost bucket: 1 = cheapest tier (Haiku/Flash/mini), 2 = Sonnet class, 3 = Opus/Pro/frontier. */
|
|
221
|
+
costTier?: 1 | 2 | 3;
|
|
222
|
+
/** Chat picker highlight flag. */
|
|
223
|
+
recommended?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Picker position: lower comes first; rows without one keep catalog order
|
|
226
|
+
* after the ordered ones. Set it to surface a new model at the top.
|
|
227
|
+
*/
|
|
228
|
+
sortOrder?: number;
|
|
211
229
|
}
|
|
212
230
|
/** Capability flags a UI keys off. Absent means false / unknown. */
|
|
213
231
|
interface CatalogCapabilities {
|
|
@@ -219,7 +237,8 @@ interface CatalogCapabilities {
|
|
|
219
237
|
acceptsSourceVideo?: boolean;
|
|
220
238
|
/** Video rows: first/last frames and reference images are mutually exclusive inputs. */
|
|
221
239
|
framesExcludeReferences?: boolean;
|
|
222
|
-
/** Text rows. */
|
|
240
|
+
/** Text rows. `reasoning`: the model streams reasoning the UI should surface. */
|
|
241
|
+
reasoning?: boolean;
|
|
223
242
|
vision?: boolean;
|
|
224
243
|
tools?: boolean;
|
|
225
244
|
structuredOutput?: boolean;
|
|
@@ -236,12 +255,27 @@ interface CatalogModel {
|
|
|
236
255
|
providerModelId: string;
|
|
237
256
|
lifecycle: Lifecycle;
|
|
238
257
|
replacedBy?: string;
|
|
258
|
+
/**
|
|
259
|
+
* "catalog" = offered in product pickers (Creative Studio, chat, Space Builder);
|
|
260
|
+
* "internal" = callable by id only.
|
|
261
|
+
*/
|
|
262
|
+
exposure: "catalog" | "internal";
|
|
239
263
|
constraints: ModelConstraints;
|
|
240
|
-
defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"
|
|
264
|
+
defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"> & {
|
|
265
|
+
temperature?: number;
|
|
266
|
+
}>;
|
|
267
|
+
/** Provider options merged under the caller's; text rows carry their reasoning / thinking tuning here. */
|
|
241
268
|
providerOptions?: ProviderOptions;
|
|
269
|
+
/**
|
|
270
|
+
* `slug` and `providerLabel` keep an app's historic usage-event names for a
|
|
271
|
+
* row (e.g. cowork emits `image_gen_<slug>` from provider `<providerLabel>`);
|
|
272
|
+
* absent means the app derives them from the id and display.provider.
|
|
273
|
+
*/
|
|
242
274
|
usage: {
|
|
243
275
|
unit: UsageUnit;
|
|
244
276
|
modality: UsageModality;
|
|
277
|
+
slug?: string;
|
|
278
|
+
providerLabel?: string;
|
|
245
279
|
};
|
|
246
280
|
pricingKind: PricingKind;
|
|
247
281
|
/** Required on every `active` row so a picker can render it without a hand-written catalog. */
|