@axiom-lattice/local-stores 3.2.11 → 3.2.13

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/local-stores@3.2.11 build /home/runner/work/agentic/agentic/packages/local-stores
2
+ > @axiom-lattice/local-stores@3.2.13 build /home/runner/work/agentic/agentic/packages/local-stores
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 240.04 KB
12
- ESM dist/index.mjs.map 440.11 KB
13
- ESM ⚡️ Build success in 765ms
14
- CJS dist/index.js 244.66 KB
15
- CJS dist/index.js.map 443.82 KB
16
- CJS ⚡️ Build success in 766ms
11
+ CJS dist/index.js 245.02 KB
12
+ CJS dist/index.js.map 444.39 KB
13
+ CJS ⚡️ Build success in 614ms
14
+ ESM dist/index.mjs 240.40 KB
15
+ ESM dist/index.mjs.map 440.68 KB
16
+ ESM ⚡️ Build success in 620ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 13198ms
18
+ DTS ⚡️ Build success in 10046ms
19
19
  DTS dist/index.d.ts 45.28 KB
20
20
  DTS dist/index.d.mts 45.28 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @axiom-lattice/local-stores
2
2
 
3
+ ## 3.2.13
4
+
5
+ ### Patch Changes
6
+
7
+ - b0d43d4: Tenant model providers can now offer chat, embedding and speech-to-text models from one catalog, and every model-provider or collection change takes effect without a gateway restart.
8
+
9
+ `ModelKind` (`chat` / `embedding` / `asr`) is stored on the model row rather than the provider, because one provider is one credential and one base URL and a single OpenAI-compatible endpoint commonly serves all three. Each kind keeps its own runtime lattice and lazily materialises its client from the shared store, so a tenant model resolves on every replica without replica-to-replica synchronisation. A loader guard keeps a chat consumer from ever resolving an embedding or ASR row, and the tenant default model remains chat-only.
10
+
11
+ The provider panel exposes the kind per model, offers a per-model thinking toggle (stored as `extra.disableThinking`, translated to the upstream kwargs by core), and can run one embedding inference to prove a model works and report its vector dimension. Collection and voice pickers now read the tenant catalog and fall back to the deployment's boot-registered models.
12
+
13
+ Invalidation is now uniform across kinds: a provider change evicts chat, embedding and ASR clients on every replica, and a collection change — including a new `embeddingKey` — drops the cached vector stores it invalidated, locally and across replicas through the outbox.
14
+
15
+ - Updated dependencies [b0d43d4]
16
+ - Updated dependencies [c57f417]
17
+ - @axiom-lattice/protocols@4.11.0
18
+ - @axiom-lattice/core@8.1.0
19
+
20
+ ## 3.2.12
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [8c20011]
25
+ - @axiom-lattice/core@8.0.2
26
+
3
27
  ## 3.2.11
4
28
 
5
29
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2604,6 +2604,7 @@ CREATE TABLE IF NOT EXISTS lt_model_provider_models (
2604
2604
  upstream_created TEXT,
2605
2605
  enabled INTEGER NOT NULL DEFAULT 1,
2606
2606
  stale INTEGER NOT NULL DEFAULT 0,
2607
+ kind TEXT NOT NULL DEFAULT 'chat',
2607
2608
  raw TEXT,
2608
2609
  discovered_at TEXT NOT NULL,
2609
2610
  PRIMARY KEY (tenant_id, provider_id, model_id)
@@ -2625,6 +2626,11 @@ var LocalModelProviderStore = class {
2625
2626
  "stale",
2626
2627
  "stale INTEGER NOT NULL DEFAULT 0"
2627
2628
  );
2629
+ this.ensureColumn(
2630
+ "lt_model_provider_models",
2631
+ "kind",
2632
+ "kind TEXT NOT NULL DEFAULT 'chat'"
2633
+ );
2628
2634
  }
2629
2635
  /** Add a column if it does not exist (SQLite version compatible). */
2630
2636
  ensureColumn(table, column, ddl2) {
@@ -2787,7 +2793,7 @@ var LocalModelProviderStore = class {
2787
2793
  const current = new Map(
2788
2794
  (await this.listModels(tenantId, providerId)).map((model) => [
2789
2795
  model.modelId,
2790
- model.enabled
2796
+ model
2791
2797
  ])
2792
2798
  );
2793
2799
  const placeholders = rows2.map(() => "?").join(", ");
@@ -2799,8 +2805,8 @@ var LocalModelProviderStore = class {
2799
2805
  this.db.prepare(
2800
2806
  `INSERT INTO lt_model_provider_models (
2801
2807
  id, tenant_id, provider_id, model_id, display_name, owned_by,
2802
- upstream_created, raw, enabled, stale, discovered_at
2803
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2808
+ upstream_created, raw, enabled, stale, kind, discovered_at
2809
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2804
2810
  ON CONFLICT (tenant_id, provider_id, model_id) DO UPDATE SET
2805
2811
  display_name = excluded.display_name,
2806
2812
  owned_by = excluded.owned_by,
@@ -2808,6 +2814,7 @@ var LocalModelProviderStore = class {
2808
2814
  raw = excluded.raw,
2809
2815
  enabled = excluded.enabled,
2810
2816
  stale = excluded.stale,
2817
+ kind = excluded.kind,
2811
2818
  discovered_at = excluded.discovered_at`
2812
2819
  ).run(
2813
2820
  `${providerId}:${model.id}`,
@@ -2818,8 +2825,10 @@ var LocalModelProviderStore = class {
2818
2825
  model.ownedBy || null,
2819
2826
  model.createdAt || null,
2820
2827
  model.raw === void 0 ? null : JSON.stringify(model.raw),
2821
- model.enabled ?? current.get(model.id) ?? true ? 1 : 0,
2828
+ model.enabled ?? current.get(model.id)?.enabled ?? true ? 1 : 0,
2822
2829
  model.stale ? 1 : 0,
2830
+ // Omitted means "keep the stored kind"; a new row starts as chat.
2831
+ model.kind ?? current.get(model.id)?.kind ?? "chat",
2823
2832
  now
2824
2833
  );
2825
2834
  }
@@ -2879,6 +2888,7 @@ function mapRowToModel(row) {
2879
2888
  upstreamCreatedAt: row.upstream_created ? parseISO(row.upstream_created) : void 0,
2880
2889
  enabled: row.enabled === 1,
2881
2890
  stale: row.stale === 1,
2891
+ kind: row.kind || "chat",
2882
2892
  discoveredAt: parseISO(row.discovered_at)
2883
2893
  };
2884
2894
  }