@axiom-lattice/protocols 6.0.0 → 6.2.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.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +20 -0
- package/dist/index.d.mts +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/ModelLatticeProtocol.ts +10 -0
- package/src/ModelProviderProtocol.ts +32 -0
package/package.json
CHANGED
|
@@ -18,6 +18,16 @@ export interface LLMConfig {
|
|
|
18
18
|
model: string;
|
|
19
19
|
displayName?: string;
|
|
20
20
|
maxTokens?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The model's total input window, in tokens.
|
|
23
|
+
*
|
|
24
|
+
* Not a client field: it never reaches the upstream. It is the number the
|
|
25
|
+
* summarization middleware uses to decide when history must be compacted
|
|
26
|
+
* (see `resolveSummarizationTriggerTokens` in core), because only the tenant
|
|
27
|
+
* knows what a given deployment's window actually is. Absent means "use the
|
|
28
|
+
* framework default".
|
|
29
|
+
*/
|
|
30
|
+
contextWindow?: number;
|
|
21
31
|
temperature?: number;
|
|
22
32
|
timeout?: number;
|
|
23
33
|
maxRetries?: number;
|
|
@@ -49,6 +49,22 @@ export type ModelProviderLlmProvider = LLMConfig["provider"];
|
|
|
49
49
|
*/
|
|
50
50
|
export type ModelKind = "chat" | "embedding" | "asr";
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* The registry keys a tenant's default model is published under.
|
|
54
|
+
*
|
|
55
|
+
* A default is a *key*, not a property of the catalog row: the persisted
|
|
56
|
+
* `is_default` flag only says which row the alias points at. Each kind has its
|
|
57
|
+
* own alias, so a tenant can have a chat default and an embedding default at
|
|
58
|
+
* the same time.
|
|
59
|
+
*
|
|
60
|
+
* The chat alias keeps the historical bare `"default"`; the other kinds are
|
|
61
|
+
* namespaced so they can never collide with a `${providerId}/${modelId}` key
|
|
62
|
+
* (which always contains a `/`).
|
|
63
|
+
*/
|
|
64
|
+
export const DEFAULT_MODEL_KEY = "default";
|
|
65
|
+
export const EMBEDDING_DEFAULT_KEY = "default:embedding";
|
|
66
|
+
export const ASR_DEFAULT_KEY = "default:asr";
|
|
67
|
+
|
|
52
68
|
/**
|
|
53
69
|
* Build the tenant-scoped model key.
|
|
54
70
|
*
|
|
@@ -402,6 +418,14 @@ export interface ProviderModelInput extends DiscoveredModel {
|
|
|
402
418
|
*/
|
|
403
419
|
export interface ModelSelection {
|
|
404
420
|
modelId: string;
|
|
421
|
+
/**
|
|
422
|
+
* Human-readable name for this model, overriding the upstream one.
|
|
423
|
+
*
|
|
424
|
+
* Omitted means "leave the stored name alone". An empty string clears it.
|
|
425
|
+
* Only the edited row carries the field, so a whole-set write keeps the other
|
|
426
|
+
* rows' names intact.
|
|
427
|
+
*/
|
|
428
|
+
displayName?: string;
|
|
405
429
|
enabled: boolean;
|
|
406
430
|
/** The upstream no longer offers this model; the row is kept, flagged. */
|
|
407
431
|
stale?: boolean;
|
|
@@ -801,6 +825,14 @@ export interface ModelProviderProbeResult {
|
|
|
801
825
|
* returned no usable vector.
|
|
802
826
|
*/
|
|
803
827
|
dimensions?: number;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* The request/response shape the successful embedding probe used.
|
|
831
|
+
*
|
|
832
|
+
* Auto-negotiation may have tried the other shape; the value here is the one
|
|
833
|
+
* that worked (and, for a saved model, the one now persisted).
|
|
834
|
+
*/
|
|
835
|
+
shape?: "openai" | "contents" | "texts";
|
|
804
836
|
}
|
|
805
837
|
|
|
806
838
|
/**
|