@axiom-lattice/protocols 6.0.0 → 6.1.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 +8 -0
- package/dist/index.d.mts +33 -1
- package/dist/index.d.ts +33 -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 +24 -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
|
*
|
|
@@ -801,6 +817,14 @@ export interface ModelProviderProbeResult {
|
|
|
801
817
|
* returned no usable vector.
|
|
802
818
|
*/
|
|
803
819
|
dimensions?: number;
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* The request/response shape the successful embedding probe used.
|
|
823
|
+
*
|
|
824
|
+
* Auto-negotiation may have tried the other shape; the value here is the one
|
|
825
|
+
* that worked (and, for a saved model, the one now persisted).
|
|
826
|
+
*/
|
|
827
|
+
shape?: "openai" | "contents" | "texts";
|
|
804
828
|
}
|
|
805
829
|
|
|
806
830
|
/**
|