@shop-os/modelkit 0.1.9 → 0.1.11

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.
@@ -35,7 +35,7 @@ interface UpscaleOptions {
35
35
  faceEnhancementStrength?: number;
36
36
  }
37
37
  type ModelType = "text" | "image" | "video" | "audio" | "upscale" | "bg-remove";
38
- type Lifecycle = "active" | "hidden" | "deprecated" | "retired";
38
+ type Lifecycle = "active" | "deprecated" | "retired";
39
39
  type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video";
40
40
  /** Gemini image safety threshold, per category, sent only when the caller opts in. */
41
41
  type ImageSafetySetting = {
@@ -222,13 +222,18 @@ interface CatalogDisplay {
222
222
  * after the ordered ones. Set it to surface a new model at the top.
223
223
  */
224
224
  sortOrder?: number;
225
+ /**
226
+ * Chat-surface stream tuning for text rows. Display data only: the kit never
227
+ * merges it into a call (row `providerOptions` is merged into every consumer's
228
+ * calls, which is why this lives here instead).
229
+ */
230
+ chat?: {
231
+ providerOptions?: ProviderOptions;
232
+ temperature?: number;
233
+ };
225
234
  }
226
235
  /** Capability flags a UI keys off. Absent means false / unknown. */
227
236
  interface CatalogCapabilities {
228
- /** Image rows: generates from a prompt alone. */
229
- imageGenerate?: boolean;
230
- /** Image rows: edits or conditions on reference images. */
231
- imageEdit?: boolean;
232
237
  /** Video rows: takes an existing video as the thing to edit or extend. */
233
238
  acceptsSourceVideo?: boolean;
234
239
  /** Video rows: first/last frames and reference images are mutually exclusive inputs. */
@@ -236,8 +241,6 @@ interface CatalogCapabilities {
236
241
  /** Text rows. `reasoning`: the model streams reasoning the UI should surface. */
237
242
  reasoning?: boolean;
238
243
  vision?: boolean;
239
- tools?: boolean;
240
- structuredOutput?: boolean;
241
244
  contextWindow?: number;
242
245
  }
243
246
  interface CatalogModel {
@@ -257,10 +260,8 @@ interface CatalogModel {
257
260
  */
258
261
  exposure: "catalog" | "internal";
259
262
  constraints: ModelConstraints;
260
- defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"> & {
261
- temperature?: number;
262
- }>;
263
- /** Provider options merged under the caller's; text rows carry their reasoning / thinking tuning here. */
263
+ defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
264
+ /** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
264
265
  providerOptions?: ProviderOptions;
265
266
  /**
266
267
  * `slug` and `providerLabel` keep an app's historic usage-event names for a
@@ -269,7 +270,6 @@ interface CatalogModel {
269
270
  */
270
271
  usage: {
271
272
  unit: UsageUnit;
272
- modality: UsageModality;
273
273
  slug?: string;
274
274
  providerLabel?: string;
275
275
  };
package/dist/catalog.d.ts CHANGED
@@ -35,7 +35,7 @@ interface UpscaleOptions {
35
35
  faceEnhancementStrength?: number;
36
36
  }
37
37
  type ModelType = "text" | "image" | "video" | "audio" | "upscale" | "bg-remove";
38
- type Lifecycle = "active" | "hidden" | "deprecated" | "retired";
38
+ type Lifecycle = "active" | "deprecated" | "retired";
39
39
  type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video";
40
40
  /** Gemini image safety threshold, per category, sent only when the caller opts in. */
41
41
  type ImageSafetySetting = {
@@ -222,13 +222,18 @@ interface CatalogDisplay {
222
222
  * after the ordered ones. Set it to surface a new model at the top.
223
223
  */
224
224
  sortOrder?: number;
225
+ /**
226
+ * Chat-surface stream tuning for text rows. Display data only: the kit never
227
+ * merges it into a call (row `providerOptions` is merged into every consumer's
228
+ * calls, which is why this lives here instead).
229
+ */
230
+ chat?: {
231
+ providerOptions?: ProviderOptions;
232
+ temperature?: number;
233
+ };
225
234
  }
226
235
  /** Capability flags a UI keys off. Absent means false / unknown. */
227
236
  interface CatalogCapabilities {
228
- /** Image rows: generates from a prompt alone. */
229
- imageGenerate?: boolean;
230
- /** Image rows: edits or conditions on reference images. */
231
- imageEdit?: boolean;
232
237
  /** Video rows: takes an existing video as the thing to edit or extend. */
233
238
  acceptsSourceVideo?: boolean;
234
239
  /** Video rows: first/last frames and reference images are mutually exclusive inputs. */
@@ -236,8 +241,6 @@ interface CatalogCapabilities {
236
241
  /** Text rows. `reasoning`: the model streams reasoning the UI should surface. */
237
242
  reasoning?: boolean;
238
243
  vision?: boolean;
239
- tools?: boolean;
240
- structuredOutput?: boolean;
241
244
  contextWindow?: number;
242
245
  }
243
246
  interface CatalogModel {
@@ -257,10 +260,8 @@ interface CatalogModel {
257
260
  */
258
261
  exposure: "catalog" | "internal";
259
262
  constraints: ModelConstraints;
260
- defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"> & {
261
- temperature?: number;
262
- }>;
263
- /** Provider options merged under the caller's; text rows carry their reasoning / thinking tuning here. */
263
+ defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
264
+ /** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
264
265
  providerOptions?: ProviderOptions;
265
266
  /**
266
267
  * `slug` and `providerLabel` keep an app's historic usage-event names for a
@@ -269,7 +270,6 @@ interface CatalogModel {
269
270
  */
270
271
  usage: {
271
272
  unit: UsageUnit;
272
- modality: UsageModality;
273
273
  slug?: string;
274
274
  providerLabel?: string;
275
275
  };