@shop-os/modelkit 0.2.23 → 0.2.25

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 CHANGED
@@ -9,6 +9,20 @@ header in the release PR.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.2.25] - Unreleased
13
+
14
+ ### Added
15
+ - Third key set `sloosh` (ENG-2990). `CallContext.tier` is now `KeyTier = "pro" | "enterprise" | "sloosh"` and `ModelKitConfig.keys.sloosh` holds the keys (`keysFromEnv(env, "SLOOSH_")`). A `sloosh` call uses `keys.sloosh` only: a missing key throws `ModelKitError` code `auth` and never falls back to the pro key. Enterprise keeps its fall-back-to-pro rule. `createDefaultModelKit` gives the sloosh key set the pro AWS credentials when it has none of its own (one shared Bedrock identity), for keys read from the environment and for keys passed in `config.keys`.
16
+ - `missingTierKeys(config, tier, names)`; `missingEnterpriseKeys` delegates to it.
17
+
18
+ ## [0.2.24] - Unreleased
19
+
20
+ ### Added
21
+ - `ideogram-4.5` image row on the fal adapter (`ideogram/v4.5`). Without references it calls fal's text-to-image endpoint; `aspectRatio` + `size` (`1K` or `2K`, default `2K`) pick one of fal's fixed sizes, and `exactSize` is sent as given. With references it calls `ideogram/v4.5/edit`: the first reference is the image to edit (`image_url`), the rest (up to 4) are `reference_image_urls`, the output keeps the source size, and `edit_precision` is always `high` (Ideogram's Precise Edit, same price as `regular`). `quality` is `low`, `medium` or `high`; `auto` sends nothing and fal uses `medium`. fal's prompt expansion is off on text-to-image (the edit endpoint has no such field). Masked edits and the edit-only `very_low` tier are not exposed.
22
+
23
+ ### Live rows to add after publish
24
+ Add the `ideogram-4.5` row to pro-backend's `model_catalog` only after its per-quality image price exists and every app that will call it runs 0.2.24. An older kit accepts the row and sends it down the Muse path, so every edit fails.
25
+
12
26
  ## [0.2.23] - Unreleased
13
27
 
14
28
  ### Added
package/README.md CHANGED
@@ -51,7 +51,7 @@ await kit.generateText({
51
51
  await clip.cleanup?.();
52
52
  ```
53
53
 
54
- Keys come from `process.env` by default: bare names for pro (`OPENAI_API_KEY`, `FAL_KEY`, `ARK_API_KEY` ...) and the `ENTERPRISE_` prefix for enterprise. Pass `keys: { pro, enterprise }` to override.
54
+ Keys come from `process.env` by default: bare names for pro (`OPENAI_API_KEY`, `FAL_KEY`, `ARK_API_KEY` ...), the `ENTERPRISE_` prefix for enterprise and the `SLOOSH_` prefix for sloosh. Pass `keys: { pro, enterprise, sloosh }` to override. `tier: "sloosh"` uses the sloosh keys only: a missing key is a `ModelKitError` with code `auth`, never a fallback to pro.
55
55
 
56
56
  ## Browser-safe catalog
57
57
 
package/dist/catalog.cjs CHANGED
@@ -445,6 +445,32 @@ var IMAGE_MODELS = [
445
445
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/characters/1787909065794-k9a7zz.png"
446
446
  }
447
447
  },
448
+ {
449
+ // References switch to the edit endpoint: the first is the image to edit,
450
+ // the rest (up to 4) guide it.
451
+ id: "ideogram-4.5",
452
+ aliases: [],
453
+ label: "Ideogram 4.5",
454
+ type: "image",
455
+ adapter: "fal",
456
+ providerModelId: "ideogram/v4.5",
457
+ lifecycle: "active",
458
+ exposure: ["cowork", "space_builder"],
459
+ constraints: {
460
+ aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5"],
461
+ sizes: ["1K", "2K"],
462
+ qualityOptions: ["auto", "low", "medium", "high"],
463
+ references: { images: 5 },
464
+ supports: ["quality", "count", "seed"]
465
+ },
466
+ defaults: { size: "2K", aspectRatio: "1:1", quality: "medium", count: 1 },
467
+ usage: { ...IMAGE_USAGE, slug: "ideogram" },
468
+ pricingKind: "image_size",
469
+ display: {
470
+ provider: "ideogram",
471
+ description: "Ideogram's precise edit model: repeated edits keep the untouched pixels and colours intact, at the source's native resolution. Also generates from text."
472
+ }
473
+ },
448
474
  {
449
475
  id: "seedream-5-0-pro",
450
476
  aliases: ["seedream-4-5"],