@crossworks/client-types 0.706.1 → 0.706.3
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/package.json +1 -1
- package/src/dto/model-check.ts +45 -0
- package/src/index.ts +1 -0
- package/src/model-choices.test.ts +12 -0
- package/src/model-choices.ts +30 -4
package/package.json
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The model check (server/web lib/system-manifest/model-check.ts): does a
|
|
3
|
+
* box run the shipped default model on each worker and manifest agent?
|
|
4
|
+
* What GET /api/config/models and the `config_models_check` MCP tool
|
|
5
|
+
* answer, and what scripts/fleet-model-check.mjs prints per box. Config
|
|
6
|
+
* values only (kind, slug, provider, model id). Read-only.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** One route: provider, model, and the model ids a worker's params name
|
|
10
|
+
* (a key ending in `_model`, e.g. the Translator's `fallback_model`). */
|
|
11
|
+
export type ModelRoute = {
|
|
12
|
+
provider: string;
|
|
13
|
+
model: string;
|
|
14
|
+
paramModels?: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* - `ok`: the box runs the default (a worker on its declared alt route, the
|
|
19
|
+
* xAI voice route, is ok too).
|
|
20
|
+
* - `drift`: the box runs another provider or model: the operator's choice,
|
|
21
|
+
* or a box set up before the default changed.
|
|
22
|
+
* - `missing`: no row (an agent), or no enabled worker of the kind.
|
|
23
|
+
* - `off`: the agent's row is switched off.
|
|
24
|
+
*/
|
|
25
|
+
export type ModelCheckStatus = 'ok' | 'drift' | 'missing' | 'off';
|
|
26
|
+
|
|
27
|
+
export type ModelCheckRow = {
|
|
28
|
+
kind: 'worker' | 'agent';
|
|
29
|
+
/** The worker kind or the agent slug. */
|
|
30
|
+
name: string;
|
|
31
|
+
status: ModelCheckStatus;
|
|
32
|
+
/** A worker the manifest marks required (a missing one is a real gap). */
|
|
33
|
+
required?: boolean;
|
|
34
|
+
/** What the box runs (null when missing). */
|
|
35
|
+
box: ModelRoute | null;
|
|
36
|
+
/** The shipped default. */
|
|
37
|
+
default: ModelRoute;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type ModelCheckReport = {
|
|
41
|
+
appVersion: string;
|
|
42
|
+
/** Rows not `ok`. */
|
|
43
|
+
notOk: number;
|
|
44
|
+
rows: ModelCheckRow[];
|
|
45
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * from './dto/views';
|
|
|
35
35
|
export * from './dto/recall';
|
|
36
36
|
export * from './dto/services';
|
|
37
37
|
export * from './dto/box-status';
|
|
38
|
+
export * from './dto/model-check';
|
|
38
39
|
export * from './dto/update-notice';
|
|
39
40
|
export * from './dto/fleet-default-model';
|
|
40
41
|
export * from './dto/present-checks';
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
ASSISTANT_MODEL_CHOICES,
|
|
4
4
|
WORKER_MODEL_CHOICES,
|
|
5
5
|
formatUsdPerM,
|
|
6
|
+
isShippedWorkerDefaults,
|
|
6
7
|
templatePrice,
|
|
7
8
|
} from './model-choices';
|
|
8
9
|
|
|
@@ -39,3 +40,14 @@ describe('shipped model cards', () => {
|
|
|
39
40
|
expect(noisy).toEqual([]);
|
|
40
41
|
});
|
|
41
42
|
});
|
|
43
|
+
|
|
44
|
+
describe('isShippedWorkerDefaults', () => {
|
|
45
|
+
it('is the recommended worker card only', () => {
|
|
46
|
+
const rec = WORKER_MODEL_CHOICES.find((c) => c.recommended)!;
|
|
47
|
+
expect(isShippedWorkerDefaults(rec.id)).toBe(true);
|
|
48
|
+
for (const c of WORKER_MODEL_CHOICES.filter((x) => !x.recommended)) {
|
|
49
|
+
expect(isShippedWorkerDefaults(c.id)).toBe(false);
|
|
50
|
+
}
|
|
51
|
+
expect(isShippedWorkerDefaults('')).toBe(false);
|
|
52
|
+
});
|
|
53
|
+
});
|
package/src/model-choices.ts
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
* / the indexing workers' model in `MANIFEST_WORKERS`) — onboarding merely
|
|
9
9
|
* writes the user's pick as operator overlay on top of the manifest seed.
|
|
10
10
|
*
|
|
11
|
+
* The recommended WORKER card is the manifest's per-worker defaults: its id is
|
|
12
|
+
* the summarizer's model, and provisionDefaults applies a worker pick only
|
|
13
|
+
* when it is another card (one model for every indexing worker).
|
|
14
|
+
*
|
|
11
15
|
* Slugs are OpenRouter ids (verified against the live catalog). `azure: true`
|
|
12
16
|
* marks OpenAI-family models that can also be served from an Azure OpenAI
|
|
13
17
|
* deployment (the Azure route strips the `openai/` prefix to form the
|
|
@@ -35,13 +39,20 @@ export type ModelChoice = {
|
|
|
35
39
|
* azure-capable picks carry policy the curated template can't express. The
|
|
36
40
|
* exported list below extends this with the shipped `agents` pool. */
|
|
37
41
|
const BASE_ASSISTANT_CHOICES: readonly ModelChoice[] = [
|
|
42
|
+
{
|
|
43
|
+
id: 'openai/gpt-6.1-sol',
|
|
44
|
+
name: 'GPT-6.1 Sol',
|
|
45
|
+
blurb:
|
|
46
|
+
'The shipped default: strong reasoning and tool use with a 1M-token context, for an assistant that plans, writes and works across your whole brain.',
|
|
47
|
+
price: '$2 · $10 /M',
|
|
48
|
+
recommended: true,
|
|
49
|
+
},
|
|
38
50
|
{
|
|
39
51
|
id: '~x-ai/grok-latest',
|
|
40
52
|
name: 'Grok (latest)',
|
|
41
53
|
blurb:
|
|
42
|
-
'
|
|
54
|
+
'An auto-updating alias: it follows xAI’s current flagship on its own. Frontier-class reasoning and tool use at well under Sonnet money.',
|
|
43
55
|
price: '$1.60 · $4.80 /M',
|
|
44
|
-
recommended: true,
|
|
45
56
|
},
|
|
46
57
|
{
|
|
47
58
|
id: 'anthropic/claude-sonnet-5',
|
|
@@ -78,13 +89,20 @@ const BASE_ASSISTANT_CHOICES: readonly ModelChoice[] = [
|
|
|
78
89
|
* extractor, summarizer, reflector, document reader, and narrator). These
|
|
79
90
|
* process EVERYTHING the brain ingests, so price and speed dominate. */
|
|
80
91
|
const BASE_WORKER_CHOICES: readonly ModelChoice[] = [
|
|
92
|
+
{
|
|
93
|
+
id: 'anthropic/claude-haiku-5.5',
|
|
94
|
+
name: 'Shipped defaults',
|
|
95
|
+
blurb:
|
|
96
|
+
'Each worker on the model chosen for it: Claude Haiku 5.5 summarizes and narrates, GPT-6 Luna extracts facts and suggests, Gemini 3.8 Flash reflects and reads documents. Pick another card to run all of them on that one model.',
|
|
97
|
+
price: '$0.10 · $0.50 /M and up',
|
|
98
|
+
recommended: true,
|
|
99
|
+
},
|
|
81
100
|
{
|
|
82
101
|
id: 'google/gemini-3.5-flash-lite',
|
|
83
102
|
name: 'Gemini 3.5 Flash Lite',
|
|
84
103
|
blurb:
|
|
85
|
-
'
|
|
104
|
+
'Very fast, very cheap, 1M-token context. A budget pick for the always-on indexing that reads everything you add.',
|
|
86
105
|
price: '$0.30 · $2.50 /M',
|
|
87
|
-
recommended: true,
|
|
88
106
|
},
|
|
89
107
|
{
|
|
90
108
|
id: 'openai/gpt-5.4-nano',
|
|
@@ -173,6 +191,14 @@ export const WORKER_MODEL_CHOICES: readonly ModelChoice[] = extendFromPool(
|
|
|
173
191
|
BASE_WORKER_CHOICES,
|
|
174
192
|
);
|
|
175
193
|
|
|
194
|
+
/** Is this worker pick the recommended card? That card stands for the
|
|
195
|
+
* manifest's own default of each worker (they differ per kind), so picking
|
|
196
|
+
* it keeps them; any other card puts every WORKER_MODEL_KINDS worker on
|
|
197
|
+
* that one model (onboarding-provision.ts). */
|
|
198
|
+
export function isShippedWorkerDefaults(workerModel: string): boolean {
|
|
199
|
+
return WORKER_MODEL_CHOICES.find((c) => c.recommended)?.id === workerModel;
|
|
200
|
+
}
|
|
201
|
+
|
|
176
202
|
/** Worker kinds the onboarding "worker model" pick applies to — the text
|
|
177
203
|
* indexing pipeline. Modality workers (tts/stt/vision/image_gen/search)
|
|
178
204
|
* keep their manifest defaults; they're tuned per-modality in Settings. */
|