@ai-matrx/chat 0.3.32 → 0.4.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/agents/components/ambient-assistant/intelligence-places.js +2 -2
  3. package/dist/agents/components/chat/ChatConversationRoom.d.ts +7 -1
  4. package/dist/agents/components/chat/ChatConversationRoom.js +8 -2
  5. package/dist/agents/components/chat/intelligence-places.js +7 -7
  6. package/dist/agents/components/inputs/smart-input/RunToolPicker.js +7 -13
  7. package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPill.js +3 -2
  8. package/dist/agents/components/inputs/smart-input/composer/useComposerAgent.js +5 -5
  9. package/dist/agents/components/inputs/smart-input/composer/useComposerAgentFilter.js +3 -2
  10. package/dist/agents/components/run-controls/RunConfigOverrides.js +10 -16
  11. package/dist/agents/components/run-controls/panels/shared.d.ts +0 -1
  12. package/dist/agents/hooks/useAgentModelLabel.js +4 -3
  13. package/dist/agents/hooks/useDiffEnrichment.js +3 -5
  14. package/dist/agents/hooks/useModelControls.d.ts +5 -161
  15. package/dist/agents/identity/model-catalog.d.ts +37 -0
  16. package/dist/agents/identity/model-catalog.js +103 -0
  17. package/dist/agents/redux/agent-definition/selectors.d.ts +0 -237
  18. package/dist/agents/redux/agent-definition/thunks.d.ts +1 -1
  19. package/dist/agents/redux/agent-settings/agentSettingsSlice.d.ts +1 -1
  20. package/dist/agents/redux/agent-settings/agentSettingsSlice.js +4 -6
  21. package/dist/agents/redux/agent-settings/selectors.d.ts +1 -152
  22. package/dist/agents/redux/agent-settings/selectors.js +0 -39
  23. package/dist/agents/redux/agent-settings/useNormalizedControls.d.ts +8 -0
  24. package/dist/agents/redux/agent-settings/useNormalizedControls.js +24 -0
  25. package/dist/agents/redux/agent-shortcut-categories/selectors.d.ts +0 -50
  26. package/dist/agents/redux/agent-shortcuts/selectors.d.ts +0 -147
  27. package/dist/agents/redux/conversation-history/selectors.d.ts +0 -16
  28. package/dist/agents/redux/conversation-list/conversation-list.selectors.d.ts +0 -2
  29. package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +0 -54
  30. package/dist/agents/redux/execution-system/context-state/context-state.selectors.d.ts +0 -14
  31. package/dist/agents/redux/execution-system/conversations/conversations.selectors.d.ts +0 -5
  32. package/dist/agents/redux/execution-system/instance-context/instance-context.selectors.d.ts +0 -3
  33. package/dist/agents/redux/execution-system/instance-resources/instance-resources.selectors.d.ts +0 -8
  34. package/dist/agents/redux/execution-system/instance-ui-state/instance-ui-state.selectors.d.ts +0 -5
  35. package/dist/agents/redux/execution-system/instance-variable-values/instance-variable-values.selectors.d.ts +0 -7
  36. package/dist/agents/redux/execution-system/messages/messages.selectors.d.ts +0 -1
  37. package/dist/agents/redux/execution-system/observability/observability.selectors.d.ts +0 -7
  38. package/dist/agents/redux/execution-system/observational-memory/observational-memory.selectors.d.ts +0 -1
  39. package/dist/agents/redux/execution-system/selectors/aggregate.selectors.d.ts +0 -14
  40. package/dist/agents/redux/execution-system/thunks/execute-manual-instance.thunk.js +2 -2
  41. package/dist/agents/redux/execution-system/thunks/launch-agent-execution.thunk.js +10 -2
  42. package/dist/agents/redux/execution-system/utils/required-organization.d.ts +14 -0
  43. package/dist/agents/redux/execution-system/utils/required-organization.js +4 -0
  44. package/dist/agents/redux/model-registry.d.ts +6 -4
  45. package/dist/agents/redux/model-registry.js +23 -5
  46. package/dist/agents/redux/proposed-directives/proposedDirectivesSlice.d.ts +0 -1
  47. package/dist/agents/redux/tools/tools.selectors.d.ts +0 -1
  48. package/dist/agents/runtime/generation-job.js +4 -7
  49. package/dist/agents/runtime/get-model-capabilities.js +3 -3
  50. package/dist/agents/ui-first-tools/redux/agent-lists.selectors.d.ts +0 -2
  51. package/dist/host/db-types.d.ts +276 -9
  52. package/dist/store/create-chat-store.d.ts +0 -2
  53. package/dist/store/middlewares.d.ts +0 -5
  54. package/dist/store/slices.d.ts +0 -1
  55. package/dist/store/slices.js +0 -2
  56. package/dist/surfaces/redux/selectors.d.ts +0 -2
  57. package/dist/tool-call-visualization/intelligence-places.js +1 -1
  58. package/dist/tool-call-visualization/redux/selectors.d.ts +0 -1
  59. package/dist/voice-agent/intelligence-places.js +6 -6
  60. package/package.json +4 -4
  61. package/dist/agents/model-registry/modelRegistrySlice.d.ts +0 -691
  62. package/dist/agents/model-registry/modelRegistrySlice.js +0 -574
  63. package/dist/host/model-class.d.ts +0 -33
  64. package/dist/host/model-class.js +0 -21
@@ -1,691 +0,0 @@
1
- import { type ModelClassIndex } from "./model-classes.js";
2
- type StateWithModelRegistry = {
3
- modelRegistry: ModelRegistryState;
4
- };
5
- import type { ChatDatabase as Database, Json } from "../../host/db-types.js";
6
- /** Full row shape from the `ai.model_definition` table — always in sync with the DB. */
7
- export type AIModelRow = Database["ai"]["Tables"]["model_definition"]["Row"];
8
- /**
9
- * What data this record currently holds.
10
- *
11
- * - 'options' → only id, name, common_name, maker, cost_rating, speed_rating loaded
12
- * - 'full' → all fields loaded (incl. resolved controls/constraints)
13
- *
14
- * Status only upgrades — never downgrades. A 'full' record never becomes 'options'.
15
- */
16
- export type ModelRecordFetchType = "options" | "full";
17
- /**
18
- * Per-record shape stored in the registry.
19
- * Always has the options fields; full fields are present only when fetchType === 'full'.
20
- */
21
- export type AIModelRecord = {
22
- _fetchType: ModelRecordFetchType;
23
- /** Resolved brand/maker name (`ai.provider.name` via the `provider_id` FK).
24
- * Not a stored column — attached by the fetch/hydrate layer. Replaced the
25
- * dropped free-text `provider` column for all display. */
26
- maker: string | null;
27
- /** Resolved controls/constraints from the `ai.model_config` RESOLUTION view
28
- * (Phase D), populated only on 'full' records by `fetchModelById`. NOT
29
- * stored columns — the legacy `model_definition.controls`/`constraints`
30
- * columns (along with `api_class`/`model_class`) were DROPPED (ai_034);
31
- * routing is decided server-side via ai.offering → ai.endpoint/ai.api. */
32
- controls: Json | null;
33
- constraints: Json | null;
34
- } & AIModelRow;
35
- /** Convenience alias — the full normalized model (fetchType === 'full'). */
36
- export type AIModel = AIModelRecord;
37
- /**
38
- * What scope of model IDs the registry covers.
39
- *
40
- * - null → nothing fetched yet
41
- * - 'active' → active model IDs are known (is_deprecated !== true)
42
- * - 'deprecated' → deprecated model IDs are known
43
- * - 'all' → all model IDs are known
44
- *
45
- * Scope only tracks which IDs we know about, not how much data each has.
46
- */
47
- export type ModelFetchScope = "active" | "deprecated" | "all" | null;
48
- export interface ModelRegistryState {
49
- /** Normalized entity map: id → AIModelRecord */
50
- entities: Record<string, AIModelRecord>;
51
- /** Ordered list of active (non-deprecated) model IDs for stable ordering */
52
- activeIds: string[];
53
- /** Ordered list of deprecated model IDs */
54
- deprecatedIds: string[];
55
- /** Which IDs we know about in total */
56
- fetchScope: ModelFetchScope;
57
- isLoading: boolean;
58
- error: string | null;
59
- lastFetched: number | null;
60
- detailStatusById: Record<string, "loading" | "succeeded" | "failed">;
61
- detailErrorById: Record<string, string>;
62
- /** Per-record label lookup status for historical/deprecated FK references. */
63
- identityById: Record<string, ModelIdentityRow>;
64
- identityStatusById: Record<string, "idle" | "loading" | "succeeded" | "failed">;
65
- /**
66
- * Resolved controls/constraints for ONE serving class (pinned offering) of
67
- * a model, keyed by `classConfigKey(modelId, offeringId)`. A model's classes run through different
68
- * APIs with different rules, so a pinned Matrx Lightning offering must not
69
- * show the preferred Matrx Fast offering's controls.
70
- */
71
- classConfigByOffering: Record<string, ModelClassConfig>;
72
- classConfigStatusByOffering: Record<string, "loading" | "succeeded" | "failed">;
73
- /**
74
- * Every routable model's CLASSES (serving endpoints) — what a display names
75
- * beside the model when it has several ("Qwen3.8 27B · Matrx Lightning").
76
- * Loaded once by `fetchModelClasses`; see utils/model-classes.ts.
77
- */
78
- modelClassIndex?: ModelClassIndex | null;
79
- modelClassStatus?: "loading" | "succeeded" | "failed";
80
- }
81
- /** Class configs are keyed by model AND class — a pin is only meaningful for its model. */
82
- export declare const classConfigKey: (modelId: string, offeringId: string) => string;
83
- export type ModelClassConfig = {
84
- modelId: string;
85
- controls: Json | null;
86
- constraints: Json | null;
87
- };
88
- type ModelOptionRow = {
89
- id: string;
90
- name: string;
91
- common_name: string | null;
92
- maker: string | null;
93
- cost_rating: number | null;
94
- speed_rating: number | null;
95
- is_primary: boolean | null;
96
- capabilities: Json | null;
97
- is_deprecated: boolean | null;
98
- retired_at: string | null;
99
- successor_id: string | null;
100
- };
101
- type ModelIdentityRow = Pick<AIModelRow, "id" | "name" | "common_name" | "is_deprecated">;
102
- /**
103
- * Fetch lightweight options (id, name, common_name, maker) for
104
- * all ROUTABLE models — live AND deprecated (a deprecated model still runs; it
105
- * is only hidden from default selection, so `selectModelOptions` excludes it
106
- * and `selectAllModelOptions` carries it with `isDeprecated`). Retired models
107
- * are not routable and are not here. Used to populate dropdowns without
108
- * pulling the full schema.
109
- *
110
- * CRITICAL: only models with ≥1 available ai.offering are returned. A bare
111
- * model_definition row is NOT callable — resolve_call_profile raises. Listing
112
- * orphans here is how grok-4.5 looked "set up fine" while every call failed.
113
- *
114
- * Each fetched record is stored with _fetchType:'options'.
115
- * Records already marked 'full' are not downgraded.
116
- *
117
- * Skips entirely when active IDs are already known.
118
- */
119
- export declare const fetchModelOptions: import("@reduxjs/toolkit").AsyncThunk<ModelOptionRow[], void, import("@reduxjs/toolkit").AsyncThunkConfig>;
120
- /**
121
- * Resolved controls/constraints for ONE serving class of a model — the pinned
122
- * offering — via `ai.resolve_model_config(p_model_id, p_offering_id)`. The
123
- * one-argument form (behind `ai.model_config`) resolves the preferred class
124
- * only. A pin that is not an available offering of the model is REFUSED by the
125
- * database (P0002) and surfaces as a failed status, never as another class's
126
- * controls.
127
- */
128
- export declare const fetchModelClassConfig: import("@reduxjs/toolkit").AsyncThunk<{
129
- key: string;
130
- config: {
131
- modelId: string;
132
- controls: {} | null;
133
- constraints: {} | null;
134
- };
135
- }, {
136
- modelId: string;
137
- offeringId: string;
138
- }, import("@reduxjs/toolkit").AsyncThunkConfig>;
139
- /**
140
- * Load every routable model's classes (one `ai.model_offering` read) so any
141
- * surface can name the class beside a model — see `selectModelClassName`.
142
- */
143
- export declare const fetchModelClasses: import("@reduxjs/toolkit").AsyncThunk<ModelClassIndex, void, import("@reduxjs/toolkit").AsyncThunkConfig>;
144
- /**
145
- * Resolve the durable label for one model FK, including deprecated models.
146
- * Picker options deliberately cover only active/routable models; history and
147
- * audit surfaces must still name a model after it leaves that catalogue.
148
- */
149
- export declare const fetchModelIdentityById: import("@reduxjs/toolkit").AsyncThunk<ModelIdentityRow, string, {
150
- dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
151
- extra?: unknown;
152
- rejectValue?: unknown;
153
- serializedErrorType?: unknown;
154
- pendingMeta?: unknown;
155
- fulfilledMeta?: unknown;
156
- rejectedMeta?: unknown;
157
- state: StateWithModelRegistry;
158
- }>;
159
- /**
160
- * Fetch the full record for a single model by ID — deprecated or not.
161
- *
162
- * Reads the ai.model_config RESOLUTION view (Phase D of the AI catalog
163
- * migration): `controls` and `constraints` are computed live from
164
- * ai.api.rules ⊕ ai.offering.override × ai.setting for the model's preferred
165
- * offering — the legacy model_definition.controls/constraints columns were
166
- * DROPPED (ai_034). The view also carries every display
167
- * field the registry consumes (maker, ratings, premium flag, context window,
168
- * capabilities), so this stays ONE read.
169
- *
170
- * 🚨 The view includes DEPRECATED and RETIRED rows (ai_075, 2026-09-09). Until
171
- * then it filtered deprecated models out, so deprecating Gemini 3.7 Flash made
172
- * every surface that referenced it reject this thunk 263 times with "Unknown
173
- * error" — the id existed, the registry just never asked the database for it.
174
- * A missing row now means the model is genuinely absent (soft-deleted or never
175
- * existed) and the rejection says exactly that.
176
- *
177
- * Skips when the record is already marked 'full'.
178
- * Always runs if the record is only 'options' or unknown.
179
- */
180
- export declare const fetchModelById: import("@reduxjs/toolkit").AsyncThunk<{
181
- id: string;
182
- name: string;
183
- common_name: string | null;
184
- maker: string | null;
185
- cost_rating: number | null;
186
- speed_rating: number | null;
187
- is_premium: boolean | null;
188
- is_primary: boolean | null;
189
- context_window: number | null;
190
- max_tokens: number | null;
191
- capabilities: import("@ai-matrx/agents/models").ModelCapabilities;
192
- controls: unknown;
193
- constraints: unknown;
194
- is_deprecated: boolean | null;
195
- retired_at: string | null;
196
- successor_id: string | null;
197
- }, string, import("@reduxjs/toolkit").AsyncThunkConfig>;
198
- export declare const hydrateModels: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
199
- models: AIModelRecord[];
200
- fetchType: ModelRecordFetchType;
201
- fetchScope: ModelFetchScope;
202
- lastFetched: number;
203
- }, "modelRegistry/hydrateModels">, retryModelDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "modelRegistry/retryModelDetail">;
204
- declare const _default: import("redux").Reducer<ModelRegistryState>;
205
- export default _default;
206
- declare const selectRegistrySlice: (state: StateWithModelRegistry) => ModelRegistryState;
207
- declare const selectEntities: (state: StateWithModelRegistry) => Record<string, AIModelRecord>;
208
- declare const selectActiveIds: (state: StateWithModelRegistry) => string[];
209
- declare const selectDeprecatedIds: (state: StateWithModelRegistry) => string[];
210
- export declare const selectModelFetchScope: (state: StateWithModelRegistry) => ModelFetchScope;
211
- export declare const selectModelRegistryLoading: (state: StateWithModelRegistry) => boolean;
212
- export declare const selectModelRegistryError: (state: StateWithModelRegistry) => string | null;
213
- export declare const selectModelRegistryLastFetched: (state: StateWithModelRegistry) => number | null;
214
- export declare const selectModelIdentityLookupStatus: (state: StateWithModelRegistry, modelId: string) => "failed" | "idle" | "loading" | "succeeded";
215
- export declare const selectModelIdentityById: (state: StateWithModelRegistry, modelId: string) => ModelIdentityRow;
216
- export declare const selectModelIdentityMap: (state: StateWithModelRegistry) => Record<string, ModelIdentityRow>;
217
- /**
218
- * Ordered array of active model records (whatever data level each has).
219
- * Safe to call before options are loaded — returns empty array.
220
- */
221
- export declare const selectActiveModels: ((state: StateWithModelRegistry) => AIModelRecord[]) & {
222
- clearCache: () => void;
223
- resultsCount: () => number;
224
- resetResultsCount: () => void;
225
- } & {
226
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string[]) => AIModelRecord[];
227
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string[]) => AIModelRecord[]) & {
228
- clearCache: () => void;
229
- resultsCount: () => number;
230
- resetResultsCount: () => void;
231
- };
232
- lastResult: () => AIModelRecord[];
233
- dependencies: [typeof selectEntities, typeof selectActiveIds];
234
- recomputations: () => number;
235
- resetRecomputations: () => void;
236
- dependencyRecomputations: () => number;
237
- resetDependencyRecomputations: () => void;
238
- } & {
239
- memoize: typeof import("reselect").weakMapMemoize;
240
- argsMemoize: typeof import("reselect").weakMapMemoize;
241
- };
242
- /**
243
- * Ordered array of deprecated model records.
244
- */
245
- export declare const selectDeprecatedModels: ((state: StateWithModelRegistry) => AIModelRecord[]) & {
246
- clearCache: () => void;
247
- resultsCount: () => number;
248
- resetResultsCount: () => void;
249
- } & {
250
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string[]) => AIModelRecord[];
251
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string[]) => AIModelRecord[]) & {
252
- clearCache: () => void;
253
- resultsCount: () => number;
254
- resetResultsCount: () => void;
255
- };
256
- lastResult: () => AIModelRecord[];
257
- dependencies: [typeof selectEntities, typeof selectDeprecatedIds];
258
- recomputations: () => number;
259
- resetRecomputations: () => void;
260
- dependencyRecomputations: () => number;
261
- resetDependencyRecomputations: () => void;
262
- } & {
263
- memoize: typeof import("reselect").weakMapMemoize;
264
- argsMemoize: typeof import("reselect").weakMapMemoize;
265
- };
266
- /**
267
- * All known model records regardless of deprecation.
268
- */
269
- export declare const selectAllModels: ((state: StateWithModelRegistry) => AIModelRecord[]) & {
270
- clearCache: () => void;
271
- resultsCount: () => number;
272
- resetResultsCount: () => void;
273
- } & {
274
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>) => AIModelRecord[];
275
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>) => AIModelRecord[]) & {
276
- clearCache: () => void;
277
- resultsCount: () => number;
278
- resetResultsCount: () => void;
279
- };
280
- lastResult: () => AIModelRecord[];
281
- dependencies: [typeof selectEntities];
282
- recomputations: () => number;
283
- resetRecomputations: () => void;
284
- dependencyRecomputations: () => number;
285
- resetDependencyRecomputations: () => void;
286
- } & {
287
- memoize: typeof import("reselect").weakMapMemoize;
288
- argsMemoize: typeof import("reselect").weakMapMemoize;
289
- };
290
- /**
291
- * Active models as dropdown options — { value, label, maker }.
292
- * Only requires fetchType:'options' data — works immediately after fetchModelOptions.
293
- */
294
- export declare const selectModelOptions: ((state: StateWithModelRegistry) => {
295
- value: string;
296
- label: string;
297
- maker: string | null;
298
- costRating: number | null;
299
- speedRating: number | null;
300
- }[]) & {
301
- clearCache: () => void;
302
- resultsCount: () => number;
303
- resetResultsCount: () => void;
304
- } & {
305
- resultFunc: (resultFuncArgs_0: AIModelRecord[]) => {
306
- value: string;
307
- label: string;
308
- maker: string | null;
309
- costRating: number | null;
310
- speedRating: number | null;
311
- }[];
312
- memoizedResultFunc: ((resultFuncArgs_0: AIModelRecord[]) => {
313
- value: string;
314
- label: string;
315
- maker: string | null;
316
- costRating: number | null;
317
- speedRating: number | null;
318
- }[]) & {
319
- clearCache: () => void;
320
- resultsCount: () => number;
321
- resetResultsCount: () => void;
322
- };
323
- lastResult: () => {
324
- value: string;
325
- label: string;
326
- maker: string | null;
327
- costRating: number | null;
328
- speedRating: number | null;
329
- }[];
330
- dependencies: [((state: StateWithModelRegistry) => AIModelRecord[]) & {
331
- clearCache: () => void;
332
- resultsCount: () => number;
333
- resetResultsCount: () => void;
334
- } & {
335
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string[]) => AIModelRecord[];
336
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string[]) => AIModelRecord[]) & {
337
- clearCache: () => void;
338
- resultsCount: () => number;
339
- resetResultsCount: () => void;
340
- };
341
- lastResult: () => AIModelRecord[];
342
- dependencies: [typeof selectEntities, typeof selectActiveIds];
343
- recomputations: () => number;
344
- resetRecomputations: () => void;
345
- dependencyRecomputations: () => number;
346
- resetDependencyRecomputations: () => void;
347
- } & {
348
- memoize: typeof import("reselect").weakMapMemoize;
349
- argsMemoize: typeof import("reselect").weakMapMemoize;
350
- }];
351
- recomputations: () => number;
352
- resetRecomputations: () => void;
353
- dependencyRecomputations: () => number;
354
- resetDependencyRecomputations: () => void;
355
- } & {
356
- memoize: typeof import("reselect").weakMapMemoize;
357
- argsMemoize: typeof import("reselect").weakMapMemoize;
358
- };
359
- /**
360
- * All models (active + deprecated) as dropdown options — for admin tooling and
361
- * for any picker whose "Include deprecated" toggle is on. `isRetired` rows are
362
- * shown for identity only and must never be selectable.
363
- */
364
- export declare const selectAllModelOptions: ((state: StateWithModelRegistry) => {
365
- value: string;
366
- label: string;
367
- maker: string | null;
368
- isDeprecated: boolean;
369
- isRetired: boolean;
370
- successorId: string | null;
371
- }[]) & {
372
- clearCache: () => void;
373
- resultsCount: () => number;
374
- resetResultsCount: () => void;
375
- } & {
376
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>) => {
377
- value: string;
378
- label: string;
379
- maker: string | null;
380
- isDeprecated: boolean;
381
- isRetired: boolean;
382
- successorId: string | null;
383
- }[];
384
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>) => {
385
- value: string;
386
- label: string;
387
- maker: string | null;
388
- isDeprecated: boolean;
389
- isRetired: boolean;
390
- successorId: string | null;
391
- }[]) & {
392
- clearCache: () => void;
393
- resultsCount: () => number;
394
- resetResultsCount: () => void;
395
- };
396
- lastResult: () => {
397
- value: string;
398
- label: string;
399
- maker: string | null;
400
- isDeprecated: boolean;
401
- isRetired: boolean;
402
- successorId: string | null;
403
- }[];
404
- dependencies: [typeof selectEntities];
405
- recomputations: () => number;
406
- resetRecomputations: () => void;
407
- dependencyRecomputations: () => number;
408
- resetDependencyRecomputations: () => void;
409
- } & {
410
- memoize: typeof import("reselect").weakMapMemoize;
411
- argsMemoize: typeof import("reselect").weakMapMemoize;
412
- };
413
- /**
414
- * Display label for a model ID. Works as soon as options are loaded.
415
- * Returns undefined when not found.
416
- */
417
- export declare const selectModelLabelById: ((state: StateWithModelRegistry, modelId: string | null | undefined) => string | undefined) & {
418
- clearCache: () => void;
419
- resultsCount: () => number;
420
- resetResultsCount: () => void;
421
- } & {
422
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: Record<string, ModelIdentityRow>, resultFuncArgs_2: string | null | undefined) => string | undefined;
423
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: Record<string, ModelIdentityRow>, resultFuncArgs_2: string | null | undefined) => string | undefined) & {
424
- clearCache: () => void;
425
- resultsCount: () => number;
426
- resetResultsCount: () => void;
427
- };
428
- lastResult: () => string | undefined;
429
- dependencies: [typeof selectEntities, typeof selectModelIdentityMap, (_state: StateWithModelRegistry, modelId: string | null | undefined) => string | null | undefined];
430
- recomputations: () => number;
431
- resetRecomputations: () => void;
432
- dependencyRecomputations: () => number;
433
- resetDependencyRecomputations: () => void;
434
- } & {
435
- memoize: typeof import("reselect").weakMapMemoize;
436
- argsMemoize: typeof import("reselect").weakMapMemoize;
437
- };
438
- /**
439
- * The CLASS to name beside a model ("Matrx Lightning"), or undefined when the
440
- * model has one class. `offeringId` = the agent's/run's pin; none = the
441
- * preferred class the server runs.
442
- */
443
- export declare const selectModelClassName: (state: StateWithModelRegistry, modelId: string | null | undefined, offeringId: string | null | undefined) => string | undefined;
444
- /**
445
- * THE label for the model an agent or run USES: "Qwen3.8 27B · Matrx Lightning"
446
- * when the model has several classes, else the model's name. Load the classes
447
- * with `useModelClassLabels()` (or `fetchModelClasses`).
448
- */
449
- export declare const selectModelLabelWithClass: (state: StateWithModelRegistry, modelId: string | null | undefined, offeringId: string | null | undefined) => string | undefined;
450
- /**
451
- * Raw model name (the `name` column) for a model ID.
452
- * Returns a primitive string or undefined — safe for direct useAppSelector.
453
- */
454
- export declare const selectModelNameById: ((state: StateWithModelRegistry, modelId: string | null | undefined) => string | undefined) & {
455
- clearCache: () => void;
456
- resultsCount: () => number;
457
- resetResultsCount: () => void;
458
- } & {
459
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string | null | undefined) => string | undefined;
460
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string | null | undefined) => string | undefined) & {
461
- clearCache: () => void;
462
- resultsCount: () => number;
463
- resetResultsCount: () => void;
464
- };
465
- lastResult: () => string | undefined;
466
- dependencies: [typeof selectEntities, (_state: StateWithModelRegistry, modelId: string | null | undefined) => string | null | undefined];
467
- recomputations: () => number;
468
- resetRecomputations: () => void;
469
- dependencyRecomputations: () => number;
470
- resetDependencyRecomputations: () => void;
471
- } & {
472
- memoize: typeof import("reselect").weakMapMemoize;
473
- argsMemoize: typeof import("reselect").weakMapMemoize;
474
- };
475
- /**
476
- * Full record for a single model ID. Returns undefined until fetchModelById completes.
477
- * Returns the record regardless of fetchType — callers should check _fetchType if they
478
- * need to know whether full data is present.
479
- *
480
- * NOTE: cache size 1 — use makeSelectModelById factory when multiple instances
481
- * subscribe to different IDs simultaneously.
482
- */
483
- export declare const selectModelById: ((state: StateWithModelRegistry, modelId: string) => AIModelRecord | undefined) & {
484
- clearCache: () => void;
485
- resultsCount: () => number;
486
- resetResultsCount: () => void;
487
- } & {
488
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string) => AIModelRecord | undefined;
489
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string) => AIModelRecord | undefined) & {
490
- clearCache: () => void;
491
- resultsCount: () => number;
492
- resetResultsCount: () => void;
493
- };
494
- lastResult: () => AIModelRecord | undefined;
495
- dependencies: [typeof selectEntities, (_state: StateWithModelRegistry, modelId: string) => string];
496
- recomputations: () => number;
497
- resetRecomputations: () => void;
498
- dependencyRecomputations: () => number;
499
- resetDependencyRecomputations: () => void;
500
- } & {
501
- memoize: typeof import("reselect").weakMapMemoize;
502
- argsMemoize: typeof import("reselect").weakMapMemoize;
503
- };
504
- /**
505
- * Factory for per-instance memoized selectModelById.
506
- *
507
- * @example
508
- * const selectModel = useMemo(makeSelectModelById, []);
509
- * const model = useAppSelector(state => selectModel(state, modelId));
510
- */
511
- export declare const makeSelectModelById: () => ((state: StateWithModelRegistry, modelId: string) => AIModelRecord | undefined) & {
512
- clearCache: () => void;
513
- resultsCount: () => number;
514
- resetResultsCount: () => void;
515
- } & {
516
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string) => AIModelRecord | undefined;
517
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string) => AIModelRecord | undefined) & {
518
- clearCache: () => void;
519
- resultsCount: () => number;
520
- resetResultsCount: () => void;
521
- };
522
- lastResult: () => AIModelRecord | undefined;
523
- dependencies: [typeof selectEntities, (_state: StateWithModelRegistry, modelId: string) => string];
524
- recomputations: () => number;
525
- resetRecomputations: () => void;
526
- dependencyRecomputations: () => number;
527
- resetDependencyRecomputations: () => void;
528
- } & {
529
- memoize: typeof import("reselect").weakMapMemoize;
530
- argsMemoize: typeof import("reselect").weakMapMemoize;
531
- };
532
- /**
533
- * Controls blob for a model. Undefined when record not found or not yet fetched.
534
- */
535
- export declare const selectModelControls: ((state: StateWithModelRegistry, modelId: string) => unknown) & {
536
- clearCache: () => void;
537
- resultsCount: () => number;
538
- resetResultsCount: () => void;
539
- } & {
540
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string) => unknown;
541
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string) => unknown) & {
542
- clearCache: () => void;
543
- resultsCount: () => number;
544
- resetResultsCount: () => void;
545
- };
546
- lastResult: () => unknown;
547
- dependencies: [typeof selectEntities, (_state: StateWithModelRegistry, modelId: string) => string];
548
- recomputations: () => number;
549
- resetRecomputations: () => void;
550
- dependencyRecomputations: () => number;
551
- resetDependencyRecomputations: () => void;
552
- } & {
553
- memoize: typeof import("reselect").weakMapMemoize;
554
- argsMemoize: typeof import("reselect").weakMapMemoize;
555
- };
556
- /**
557
- * fetchType for a single model — 'options', 'full', or undefined if unknown.
558
- */
559
- export declare const selectModelFetchType: ((state: StateWithModelRegistry, modelId: string) => ModelRecordFetchType | undefined) & {
560
- clearCache: () => void;
561
- resultsCount: () => number;
562
- resetResultsCount: () => void;
563
- } & {
564
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string) => ModelRecordFetchType | undefined;
565
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string) => ModelRecordFetchType | undefined) & {
566
- clearCache: () => void;
567
- resultsCount: () => number;
568
- resetResultsCount: () => void;
569
- };
570
- lastResult: () => ModelRecordFetchType | undefined;
571
- dependencies: [typeof selectEntities, (_state: StateWithModelRegistry, modelId: string) => string];
572
- recomputations: () => number;
573
- resetRecomputations: () => void;
574
- dependencyRecomputations: () => number;
575
- resetDependencyRecomputations: () => void;
576
- } & {
577
- memoize: typeof import("reselect").weakMapMemoize;
578
- argsMemoize: typeof import("reselect").weakMapMemoize;
579
- };
580
- /** True once active model options are available for dropdown rendering. */
581
- export declare const selectActiveModelsReady: ((state: StateWithModelRegistry) => boolean) & {
582
- clearCache: () => void;
583
- resultsCount: () => number;
584
- resetResultsCount: () => void;
585
- } & {
586
- resultFunc: (resultFuncArgs_0: ModelRegistryState) => boolean;
587
- memoizedResultFunc: ((resultFuncArgs_0: ModelRegistryState) => boolean) & {
588
- clearCache: () => void;
589
- resultsCount: () => number;
590
- resetResultsCount: () => void;
591
- };
592
- lastResult: () => boolean;
593
- dependencies: [typeof selectRegistrySlice];
594
- recomputations: () => number;
595
- resetRecomputations: () => void;
596
- dependencyRecomputations: () => number;
597
- resetDependencyRecomputations: () => void;
598
- } & {
599
- memoize: typeof import("reselect").weakMapMemoize;
600
- argsMemoize: typeof import("reselect").weakMapMemoize;
601
- };
602
- /** True once deprecated model IDs are known. */
603
- export declare const selectDeprecatedModelsReady: ((state: StateWithModelRegistry) => boolean) & {
604
- clearCache: () => void;
605
- resultsCount: () => number;
606
- resetResultsCount: () => void;
607
- } & {
608
- resultFunc: (resultFuncArgs_0: ModelRegistryState) => boolean;
609
- memoizedResultFunc: ((resultFuncArgs_0: ModelRegistryState) => boolean) & {
610
- clearCache: () => void;
611
- resultsCount: () => number;
612
- resetResultsCount: () => void;
613
- };
614
- lastResult: () => boolean;
615
- dependencies: [typeof selectRegistrySlice];
616
- recomputations: () => number;
617
- resetRecomputations: () => void;
618
- dependencyRecomputations: () => number;
619
- resetDependencyRecomputations: () => void;
620
- } & {
621
- memoize: typeof import("reselect").weakMapMemoize;
622
- argsMemoize: typeof import("reselect").weakMapMemoize;
623
- };
624
- /** True once all model IDs (active + deprecated) are known. */
625
- export declare const selectAllModelsReady: ((state: StateWithModelRegistry) => boolean) & {
626
- clearCache: () => void;
627
- resultsCount: () => number;
628
- resetResultsCount: () => void;
629
- } & {
630
- resultFunc: (resultFuncArgs_0: ModelRegistryState) => boolean;
631
- memoizedResultFunc: ((resultFuncArgs_0: ModelRegistryState) => boolean) & {
632
- clearCache: () => void;
633
- resultsCount: () => number;
634
- resetResultsCount: () => void;
635
- };
636
- lastResult: () => boolean;
637
- dependencies: [typeof selectRegistrySlice];
638
- recomputations: () => number;
639
- resetRecomputations: () => void;
640
- dependencyRecomputations: () => number;
641
- resetDependencyRecomputations: () => void;
642
- } & {
643
- memoize: typeof import("reselect").weakMapMemoize;
644
- argsMemoize: typeof import("reselect").weakMapMemoize;
645
- };
646
- /**
647
- * True when a specific model has its full record loaded.
648
- * Use to gate components that need controls, context_window, etc.
649
- */
650
- export declare const selectModelFullyLoaded: ((state: StateWithModelRegistry, modelId: string | null | undefined) => boolean) & {
651
- clearCache: () => void;
652
- resultsCount: () => number;
653
- resetResultsCount: () => void;
654
- } & {
655
- resultFunc: (resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string | null | undefined) => boolean;
656
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, AIModelRecord>, resultFuncArgs_1: string | null | undefined) => boolean) & {
657
- clearCache: () => void;
658
- resultsCount: () => number;
659
- resetResultsCount: () => void;
660
- };
661
- lastResult: () => boolean;
662
- dependencies: [typeof selectEntities, (_state: StateWithModelRegistry, modelId: string | null | undefined) => string | null | undefined];
663
- recomputations: () => number;
664
- resetRecomputations: () => void;
665
- dependencyRecomputations: () => number;
666
- resetDependencyRecomputations: () => void;
667
- } & {
668
- memoize: typeof import("reselect").weakMapMemoize;
669
- argsMemoize: typeof import("reselect").weakMapMemoize;
670
- };
671
- export declare const selectModelDetailError: ((state: StateWithModelRegistry, modelId: string) => string) & {
672
- clearCache: () => void;
673
- resultsCount: () => number;
674
- resetResultsCount: () => void;
675
- } & {
676
- resultFunc: (resultFuncArgs_0: Record<string, string>, resultFuncArgs_1: string) => string;
677
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, string>, resultFuncArgs_1: string) => string) & {
678
- clearCache: () => void;
679
- resultsCount: () => number;
680
- resetResultsCount: () => void;
681
- };
682
- lastResult: () => string;
683
- dependencies: [(state: StateWithModelRegistry) => Record<string, string>, (_state: StateWithModelRegistry, modelId: string) => string];
684
- recomputations: () => number;
685
- resetRecomputations: () => void;
686
- dependencyRecomputations: () => number;
687
- resetDependencyRecomputations: () => void;
688
- } & {
689
- memoize: typeof import("reselect").weakMapMemoize;
690
- argsMemoize: typeof import("reselect").weakMapMemoize;
691
- };