@mupt-ai/dari-gateway 1.0.363 → 1.0.365

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,7 +1,8 @@
1
1
  import type { LinkKeyProvider } from "../platform/platform.js";
2
2
  /**
3
3
  * Whose API key a user can add on the approval page: each provider with
4
- * catalog models the gateway can call with a key, then the gateways.
4
+ * catalog models the gateway can call with a key, named for the models'
5
+ * maker, then the gateways.
5
6
  */
6
7
  export declare const LINK_KEY_PROVIDERS: readonly LinkKeyProvider[];
7
8
  /** What a provider is called where a user's key for it is shown: "OpenRouter". */
@@ -2,22 +2,15 @@ import { getBuiltinProviders } from "@mupt-ai/pi-ai/providers/all";
2
2
  import { providerForModel } from "@mupt-ai/dari-router/policy-engine";
3
3
  import { CANONICAL_MODELS } from "../models/canonical.js";
4
4
  import { LINK_KEY_GATEWAYS, gatewayFor } from "../models/gateways.js";
5
- const PROVIDER_NAMES = {
6
- anthropic: "Anthropic",
7
- openai: "OpenAI",
8
- meta: "Meta",
9
- moonshotai: "Moonshot AI",
10
- xai: "xAI",
11
- google: "Google",
12
- };
13
5
  /**
14
6
  * Whose API key a user can add on the approval page: each provider with
15
- * catalog models the gateway can call with a key, then the gateways.
7
+ * catalog models the gateway can call with a key, named for the models'
8
+ * maker, then the gateways.
16
9
  */
17
10
  export const LINK_KEY_PROVIDERS = [
18
- ...[...new Set(CANONICAL_MODELS.map((model) => providerForModel(model.id)))]
19
- .filter((provider) => getBuiltinProviders().includes(provider))
20
- .map((provider) => ({ id: provider, name: PROVIDER_NAMES[provider] ?? provider })),
11
+ ...[...new Map(CANONICAL_MODELS.map((model) => [providerForModel(model.id), model.maker]))]
12
+ .filter(([provider]) => getBuiltinProviders().includes(provider))
13
+ .map(([provider, name]) => ({ id: provider, name })),
21
14
  ...LINK_KEY_GATEWAYS.map((gateway) => ({ id: gateway, name: gatewayFor(gateway).label })),
22
15
  ];
23
16
  /** What a provider is called where a user's key for it is shown: "OpenRouter". */
@@ -1,6 +1,7 @@
1
1
  export type CanonicalModel = {
2
2
  id: string;
3
3
  name: string;
4
+ maker: string;
4
5
  thinking_levels: string[];
5
6
  };
6
7
  /** The canonical models Dari serves, from the monorepo's router catalog. */
@@ -2,6 +2,7 @@
2
2
  {
3
3
  "id": "openai/gpt-6.2-astra",
4
4
  "name": "GPT-6.2 Astra",
5
+ "maker": "OpenAI",
5
6
  "thinking_levels": [
6
7
  "low",
7
8
  "medium",
@@ -13,6 +14,7 @@
13
14
  {
14
15
  "id": "openai/gpt-6-astra",
15
16
  "name": "GPT-6 Astra",
17
+ "maker": "OpenAI",
16
18
  "thinking_levels": [
17
19
  "low",
18
20
  "medium",
@@ -24,6 +26,7 @@
24
26
  {
25
27
  "id": "openai/gpt-6.1-terra",
26
28
  "name": "GPT-6.1 Terra",
29
+ "maker": "OpenAI",
27
30
  "thinking_levels": [
28
31
  "off",
29
32
  "low",
@@ -36,6 +39,7 @@
36
39
  {
37
40
  "id": "openai/gpt-6.2-sol",
38
41
  "name": "GPT-6.2 Sol",
42
+ "maker": "OpenAI",
39
43
  "thinking_levels": [
40
44
  "low",
41
45
  "medium",
@@ -47,6 +51,7 @@
47
51
  {
48
52
  "id": "openai/gpt-6.1-sol",
49
53
  "name": "GPT-6.1 Sol",
54
+ "maker": "OpenAI",
50
55
  "thinking_levels": [
51
56
  "off",
52
57
  "low",
@@ -59,6 +64,7 @@
59
64
  {
60
65
  "id": "openai/gpt-6-sol",
61
66
  "name": "GPT-6 Sol",
67
+ "maker": "OpenAI",
62
68
  "thinking_levels": [
63
69
  "off",
64
70
  "low",
@@ -71,6 +77,7 @@
71
77
  {
72
78
  "id": "openai/gpt-6-luna",
73
79
  "name": "GPT-6 Luna",
80
+ "maker": "OpenAI",
74
81
  "thinking_levels": [
75
82
  "off",
76
83
  "low",
@@ -83,6 +90,7 @@
83
90
  {
84
91
  "id": "openai/gpt-5.6-sol",
85
92
  "name": "GPT-5.6 Sol",
93
+ "maker": "OpenAI",
86
94
  "thinking_levels": [
87
95
  "off",
88
96
  "low",
@@ -95,6 +103,7 @@
95
103
  {
96
104
  "id": "openai/gpt-5.6-terra",
97
105
  "name": "GPT-5.6 Terra",
106
+ "maker": "OpenAI",
98
107
  "thinking_levels": [
99
108
  "off",
100
109
  "low",
@@ -107,6 +116,7 @@
107
116
  {
108
117
  "id": "openai/gpt-5.6-luna",
109
118
  "name": "GPT-5.6 Luna",
119
+ "maker": "OpenAI",
110
120
  "thinking_levels": [
111
121
  "off",
112
122
  "low",
@@ -119,6 +129,7 @@
119
129
  {
120
130
  "id": "anthropic/claude-opus-5-5",
121
131
  "name": "Claude Opus 5.5",
132
+ "maker": "Anthropic",
122
133
  "thinking_levels": [
123
134
  "off",
124
135
  "low",
@@ -131,6 +142,7 @@
131
142
  {
132
143
  "id": "anthropic/claude-opus-5",
133
144
  "name": "Claude Opus 5",
145
+ "maker": "Anthropic",
134
146
  "thinking_levels": [
135
147
  "off",
136
148
  "low",
@@ -143,6 +155,7 @@
143
155
  {
144
156
  "id": "anthropic/claude-sonnet-5-5",
145
157
  "name": "Claude Sonnet 5.5",
158
+ "maker": "Anthropic",
146
159
  "thinking_levels": [
147
160
  "low",
148
161
  "medium",
@@ -154,6 +167,7 @@
154
167
  {
155
168
  "id": "anthropic/claude-sonnet-5",
156
169
  "name": "Claude Sonnet 5",
170
+ "maker": "Anthropic",
157
171
  "thinking_levels": [
158
172
  "off",
159
173
  "low",
@@ -166,6 +180,7 @@
166
180
  {
167
181
  "id": "anthropic/claude-fable-5-2",
168
182
  "name": "Claude Fable 5.2",
183
+ "maker": "Anthropic",
169
184
  "thinking_levels": [
170
185
  "low",
171
186
  "medium",
@@ -177,6 +192,7 @@
177
192
  {
178
193
  "id": "anthropic/claude-fable-5-1",
179
194
  "name": "Claude Fable 5.1",
195
+ "maker": "Anthropic",
180
196
  "thinking_levels": [
181
197
  "low",
182
198
  "medium",
@@ -188,6 +204,7 @@
188
204
  {
189
205
  "id": "anthropic/claude-fable-5",
190
206
  "name": "Claude Fable 5",
207
+ "maker": "Anthropic",
191
208
  "thinking_levels": [
192
209
  "low",
193
210
  "medium",
@@ -199,6 +216,7 @@
199
216
  {
200
217
  "id": "anthropic/claude-haiku-5-5",
201
218
  "name": "Claude Haiku 5.5",
219
+ "maker": "Anthropic",
202
220
  "thinking_levels": [
203
221
  "low",
204
222
  "medium",
@@ -210,6 +228,7 @@
210
228
  {
211
229
  "id": "anthropic/claude-haiku-4-5",
212
230
  "name": "Claude Haiku 4.5",
231
+ "maker": "Anthropic",
213
232
  "thinking_levels": [
214
233
  "off",
215
234
  "low",
@@ -220,6 +239,7 @@
220
239
  {
221
240
  "id": "meta/muse-wonder-1.0",
222
241
  "name": "Muse Wonder 1.0",
242
+ "maker": "Meta",
223
243
  "thinking_levels": [
224
244
  "minimal",
225
245
  "low",
@@ -232,6 +252,7 @@
232
252
  {
233
253
  "id": "meta/muse-spark-1.3",
234
254
  "name": "Muse Spark 1.3",
255
+ "maker": "Meta",
235
256
  "thinking_levels": [
236
257
  "minimal",
237
258
  "low",
@@ -244,6 +265,7 @@
244
265
  {
245
266
  "id": "meta/muse-ember",
246
267
  "name": "Muse Ember",
268
+ "maker": "Meta",
247
269
  "thinking_levels": [
248
270
  "minimal",
249
271
  "low",
@@ -256,6 +278,7 @@
256
278
  {
257
279
  "id": "meta/muse-spark-open",
258
280
  "name": "Muse Spark Open",
281
+ "maker": "Meta",
259
282
  "thinking_levels": [
260
283
  "low",
261
284
  "medium",
@@ -266,6 +289,7 @@
266
289
  {
267
290
  "id": "meta/muse-spark-1.2",
268
291
  "name": "Muse Spark 1.2",
292
+ "maker": "Meta",
269
293
  "thinking_levels": [
270
294
  "minimal",
271
295
  "low",
@@ -277,6 +301,7 @@
277
301
  {
278
302
  "id": "moonshotai/Kimi-K3",
279
303
  "name": "Kimi K3",
304
+ "maker": "Moonshot AI",
280
305
  "thinking_levels": [
281
306
  "low",
282
307
  "high",
@@ -286,6 +311,7 @@
286
311
  {
287
312
  "id": "moonshotai/Kimi-K3.1-Pro",
288
313
  "name": "Kimi K3.1 Pro",
314
+ "maker": "Moonshot AI",
289
315
  "thinking_levels": [
290
316
  "low",
291
317
  "high",
@@ -295,6 +321,7 @@
295
321
  {
296
322
  "id": "zai-org/GLM-5.3",
297
323
  "name": "GLM 5.3",
324
+ "maker": "Z.ai",
298
325
  "thinking_levels": [
299
326
  "low",
300
327
  "high",
@@ -304,6 +331,7 @@
304
331
  {
305
332
  "id": "zai-org/GLM-5.3-Flash",
306
333
  "name": "GLM 5.3 Flash",
334
+ "maker": "Z.ai",
307
335
  "thinking_levels": [
308
336
  "low",
309
337
  "high",
@@ -313,6 +341,7 @@
313
341
  {
314
342
  "id": "deepseek-ai/DeepSeek-V4-Pro-0813",
315
343
  "name": "DeepSeek V4 Pro 0813",
344
+ "maker": "DeepSeek",
316
345
  "thinking_levels": [
317
346
  "off",
318
347
  "high",
@@ -322,6 +351,7 @@
322
351
  {
323
352
  "id": "zai-org/GLM-5.2",
324
353
  "name": "GLM 5.2",
354
+ "maker": "Z.ai",
325
355
  "thinking_levels": [
326
356
  "off",
327
357
  "high",
@@ -331,6 +361,7 @@
331
361
  {
332
362
  "id": "deepseek-ai/DeepSeek-V4-Flash-0731",
333
363
  "name": "DeepSeek V4 Flash 0731",
364
+ "maker": "DeepSeek",
334
365
  "thinking_levels": [
335
366
  "off",
336
367
  "high",
@@ -340,6 +371,7 @@
340
371
  {
341
372
  "id": "deepseek-ai/DeepSeek-V4.1-Flash-1017",
342
373
  "name": "DeepSeek V4.1 Flash 1017",
374
+ "maker": "DeepSeek",
343
375
  "thinking_levels": [
344
376
  "off",
345
377
  "high",
@@ -349,6 +381,7 @@
349
381
  {
350
382
  "id": "deepseek-ai/DeepSeek-V4.1-Flash",
351
383
  "name": "DeepSeek V4.1 Flash",
384
+ "maker": "DeepSeek",
352
385
  "thinking_levels": [
353
386
  "off",
354
387
  "high",
@@ -358,6 +391,7 @@
358
391
  {
359
392
  "id": "xai/grok-4.6",
360
393
  "name": "Grok 4.6",
394
+ "maker": "xAI",
361
395
  "thinking_levels": [
362
396
  "low",
363
397
  "medium",
@@ -368,6 +402,7 @@
368
402
  {
369
403
  "id": "xai/grok-4.7",
370
404
  "name": "Grok 4.7",
405
+ "maker": "xAI",
371
406
  "thinking_levels": [
372
407
  "low",
373
408
  "medium",
@@ -378,6 +413,7 @@
378
413
  {
379
414
  "id": "google/gemini-4-argon",
380
415
  "name": "Gemini 4 Argon",
416
+ "maker": "Google",
381
417
  "thinking_levels": [
382
418
  "low",
383
419
  "medium",
@@ -387,6 +423,7 @@
387
423
  {
388
424
  "id": "google/gemini-4-carbon",
389
425
  "name": "Gemini 4 Carbon",
426
+ "maker": "Google",
390
427
  "thinking_levels": [
391
428
  "low",
392
429
  "medium",
@@ -396,6 +433,7 @@
396
433
  {
397
434
  "id": "google/gemini-4-neon",
398
435
  "name": "Gemini 4 Neon",
436
+ "maker": "Google",
399
437
  "thinking_levels": [
400
438
  "low",
401
439
  "medium",
@@ -406,6 +444,7 @@
406
444
  {
407
445
  "id": "google/gemini-4-hydrogen",
408
446
  "name": "Gemini 4 Hydrogen",
447
+ "maker": "Google",
409
448
  "thinking_levels": [
410
449
  "low",
411
450
  "medium",
@@ -416,6 +455,7 @@
416
455
  {
417
456
  "id": "google/gemini-3.8-flash",
418
457
  "name": "Gemini 3.8 Flash",
458
+ "maker": "Google",
419
459
  "thinking_levels": [
420
460
  "low",
421
461
  "medium",
@@ -38,6 +38,7 @@ export declare class HostedSync {
38
38
  snapshot(): Record<string, unknown>;
39
39
  private scheduleSnapshot;
40
40
  private putSnapshot;
41
+ private dropPlansOnDari;
41
42
  /** Send the queued request rows a batch at a time, unless hosted failed lately. */
42
43
  drain(): Promise<void>;
43
44
  private drainDue;
@@ -115,8 +115,10 @@ export class HostedSync {
115
115
  const response = await this.call("PUT", "/v1/gateway/subscriptions", this.snapshot());
116
116
  if (!response.ok)
117
117
  throw new Error(`HTTP ${response.status}: ${(await response.text()).slice(0, 300)}`);
118
+ const body = await response.json();
118
119
  this.snapshotFailures = 0;
119
120
  this.scheduleSnapshot(HEARTBEAT_MS);
121
+ this.dropPlansOnDari(body.on_dari);
120
122
  }
121
123
  catch (error) {
122
124
  this.snapshotFailures += 1;
@@ -124,6 +126,20 @@ export class HostedSync {
124
126
  this.scheduleSnapshot(backoff(this.snapshotFailures));
125
127
  }
126
128
  }
129
+ // Hosted Dari names the reported plans whose account was since connected on
130
+ // Dari. Dari's plan serves this computer too, so the copy here goes, and
131
+ // disconnecting it reports the plans again.
132
+ dropPlansOnDari(localIds) {
133
+ if (!Array.isArray(localIds))
134
+ return;
135
+ for (const id of localIds) {
136
+ const plan = typeof id === "string" ? this.subscriptions.get(id) : null;
137
+ if (plan === null || plan.owner !== null || plan.private)
138
+ continue;
139
+ this.subscriptions.disconnect(plan.name);
140
+ console.error(`${plan.name} is now connected on Dari; removed it from this computer`);
141
+ }
142
+ }
127
143
  /** Send the queued request rows a batch at a time, unless hosted failed lately. */
128
144
  drain() {
129
145
  this.draining ??= this.drainDue().finally(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mupt-ai/dari-gateway",
3
- "version": "1.0.363",
3
+ "version": "1.0.365",
4
4
  "description": "Self-hostable LLM gateway for coding agents and APIs: one endpoint for Anthropic Messages, OpenAI Chat Completions, and OpenAI Responses, with subscription pooling, failover, and prompt-cache-aware routing.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@aws-sdk/client-sts": "3.1063.0",
55
- "@mupt-ai/dari-router": "1.0.363",
55
+ "@mupt-ai/dari-router": "1.0.365",
56
56
  "@mupt-ai/pi-ai": "1.5.2-mupt.3"
57
57
  },
58
58
  "devDependencies": {
@@ -5,23 +5,15 @@ import { CANONICAL_MODELS } from "../models/canonical.js";
5
5
  import { LINK_KEY_GATEWAYS, gatewayFor } from "../models/gateways.js";
6
6
  import type { LinkKeyProvider } from "../platform/platform.js";
7
7
 
8
- const PROVIDER_NAMES: Record<string, string> = {
9
- anthropic: "Anthropic",
10
- openai: "OpenAI",
11
- meta: "Meta",
12
- moonshotai: "Moonshot AI",
13
- xai: "xAI",
14
- google: "Google",
15
- };
16
-
17
8
  /**
18
9
  * Whose API key a user can add on the approval page: each provider with
19
- * catalog models the gateway can call with a key, then the gateways.
10
+ * catalog models the gateway can call with a key, named for the models'
11
+ * maker, then the gateways.
20
12
  */
21
13
  export const LINK_KEY_PROVIDERS: readonly LinkKeyProvider[] = [
22
- ...[...new Set(CANONICAL_MODELS.map((model) => providerForModel(model.id)))]
23
- .filter((provider) => (getBuiltinProviders() as readonly string[]).includes(provider))
24
- .map((provider) => ({ id: provider, name: PROVIDER_NAMES[provider] ?? provider })),
14
+ ...[...new Map(CANONICAL_MODELS.map((model) => [providerForModel(model.id), model.maker]))]
15
+ .filter(([provider]) => (getBuiltinProviders() as readonly string[]).includes(provider))
16
+ .map(([provider, name]) => ({ id: provider, name })),
25
17
  ...LINK_KEY_GATEWAYS.map((gateway) => ({ id: gateway, name: gatewayFor(gateway)!.label })),
26
18
  ];
27
19
 
@@ -4,6 +4,9 @@ import providerModels from "./provider_models.json" with { type: "json" };
4
4
  export type CanonicalModel = {
5
5
  id: string;
6
6
  name: string;
7
+ // Who made it, which model pickers group by: "Moonshot AI", not the
8
+ // provider serving it.
9
+ maker: string;
7
10
  // The default provider's accepted thinking levels.
8
11
  thinking_levels: string[];
9
12
  };
@@ -2,6 +2,7 @@
2
2
  {
3
3
  "id": "openai/gpt-6.2-astra",
4
4
  "name": "GPT-6.2 Astra",
5
+ "maker": "OpenAI",
5
6
  "thinking_levels": [
6
7
  "low",
7
8
  "medium",
@@ -13,6 +14,7 @@
13
14
  {
14
15
  "id": "openai/gpt-6-astra",
15
16
  "name": "GPT-6 Astra",
17
+ "maker": "OpenAI",
16
18
  "thinking_levels": [
17
19
  "low",
18
20
  "medium",
@@ -24,6 +26,7 @@
24
26
  {
25
27
  "id": "openai/gpt-6.1-terra",
26
28
  "name": "GPT-6.1 Terra",
29
+ "maker": "OpenAI",
27
30
  "thinking_levels": [
28
31
  "off",
29
32
  "low",
@@ -36,6 +39,7 @@
36
39
  {
37
40
  "id": "openai/gpt-6.2-sol",
38
41
  "name": "GPT-6.2 Sol",
42
+ "maker": "OpenAI",
39
43
  "thinking_levels": [
40
44
  "low",
41
45
  "medium",
@@ -47,6 +51,7 @@
47
51
  {
48
52
  "id": "openai/gpt-6.1-sol",
49
53
  "name": "GPT-6.1 Sol",
54
+ "maker": "OpenAI",
50
55
  "thinking_levels": [
51
56
  "off",
52
57
  "low",
@@ -59,6 +64,7 @@
59
64
  {
60
65
  "id": "openai/gpt-6-sol",
61
66
  "name": "GPT-6 Sol",
67
+ "maker": "OpenAI",
62
68
  "thinking_levels": [
63
69
  "off",
64
70
  "low",
@@ -71,6 +77,7 @@
71
77
  {
72
78
  "id": "openai/gpt-6-luna",
73
79
  "name": "GPT-6 Luna",
80
+ "maker": "OpenAI",
74
81
  "thinking_levels": [
75
82
  "off",
76
83
  "low",
@@ -83,6 +90,7 @@
83
90
  {
84
91
  "id": "openai/gpt-5.6-sol",
85
92
  "name": "GPT-5.6 Sol",
93
+ "maker": "OpenAI",
86
94
  "thinking_levels": [
87
95
  "off",
88
96
  "low",
@@ -95,6 +103,7 @@
95
103
  {
96
104
  "id": "openai/gpt-5.6-terra",
97
105
  "name": "GPT-5.6 Terra",
106
+ "maker": "OpenAI",
98
107
  "thinking_levels": [
99
108
  "off",
100
109
  "low",
@@ -107,6 +116,7 @@
107
116
  {
108
117
  "id": "openai/gpt-5.6-luna",
109
118
  "name": "GPT-5.6 Luna",
119
+ "maker": "OpenAI",
110
120
  "thinking_levels": [
111
121
  "off",
112
122
  "low",
@@ -119,6 +129,7 @@
119
129
  {
120
130
  "id": "anthropic/claude-opus-5-5",
121
131
  "name": "Claude Opus 5.5",
132
+ "maker": "Anthropic",
122
133
  "thinking_levels": [
123
134
  "off",
124
135
  "low",
@@ -131,6 +142,7 @@
131
142
  {
132
143
  "id": "anthropic/claude-opus-5",
133
144
  "name": "Claude Opus 5",
145
+ "maker": "Anthropic",
134
146
  "thinking_levels": [
135
147
  "off",
136
148
  "low",
@@ -143,6 +155,7 @@
143
155
  {
144
156
  "id": "anthropic/claude-sonnet-5-5",
145
157
  "name": "Claude Sonnet 5.5",
158
+ "maker": "Anthropic",
146
159
  "thinking_levels": [
147
160
  "low",
148
161
  "medium",
@@ -154,6 +167,7 @@
154
167
  {
155
168
  "id": "anthropic/claude-sonnet-5",
156
169
  "name": "Claude Sonnet 5",
170
+ "maker": "Anthropic",
157
171
  "thinking_levels": [
158
172
  "off",
159
173
  "low",
@@ -166,6 +180,7 @@
166
180
  {
167
181
  "id": "anthropic/claude-fable-5-2",
168
182
  "name": "Claude Fable 5.2",
183
+ "maker": "Anthropic",
169
184
  "thinking_levels": [
170
185
  "low",
171
186
  "medium",
@@ -177,6 +192,7 @@
177
192
  {
178
193
  "id": "anthropic/claude-fable-5-1",
179
194
  "name": "Claude Fable 5.1",
195
+ "maker": "Anthropic",
180
196
  "thinking_levels": [
181
197
  "low",
182
198
  "medium",
@@ -188,6 +204,7 @@
188
204
  {
189
205
  "id": "anthropic/claude-fable-5",
190
206
  "name": "Claude Fable 5",
207
+ "maker": "Anthropic",
191
208
  "thinking_levels": [
192
209
  "low",
193
210
  "medium",
@@ -199,6 +216,7 @@
199
216
  {
200
217
  "id": "anthropic/claude-haiku-5-5",
201
218
  "name": "Claude Haiku 5.5",
219
+ "maker": "Anthropic",
202
220
  "thinking_levels": [
203
221
  "low",
204
222
  "medium",
@@ -210,6 +228,7 @@
210
228
  {
211
229
  "id": "anthropic/claude-haiku-4-5",
212
230
  "name": "Claude Haiku 4.5",
231
+ "maker": "Anthropic",
213
232
  "thinking_levels": [
214
233
  "off",
215
234
  "low",
@@ -220,6 +239,7 @@
220
239
  {
221
240
  "id": "meta/muse-wonder-1.0",
222
241
  "name": "Muse Wonder 1.0",
242
+ "maker": "Meta",
223
243
  "thinking_levels": [
224
244
  "minimal",
225
245
  "low",
@@ -232,6 +252,7 @@
232
252
  {
233
253
  "id": "meta/muse-spark-1.3",
234
254
  "name": "Muse Spark 1.3",
255
+ "maker": "Meta",
235
256
  "thinking_levels": [
236
257
  "minimal",
237
258
  "low",
@@ -244,6 +265,7 @@
244
265
  {
245
266
  "id": "meta/muse-ember",
246
267
  "name": "Muse Ember",
268
+ "maker": "Meta",
247
269
  "thinking_levels": [
248
270
  "minimal",
249
271
  "low",
@@ -256,6 +278,7 @@
256
278
  {
257
279
  "id": "meta/muse-spark-open",
258
280
  "name": "Muse Spark Open",
281
+ "maker": "Meta",
259
282
  "thinking_levels": [
260
283
  "low",
261
284
  "medium",
@@ -266,6 +289,7 @@
266
289
  {
267
290
  "id": "meta/muse-spark-1.2",
268
291
  "name": "Muse Spark 1.2",
292
+ "maker": "Meta",
269
293
  "thinking_levels": [
270
294
  "minimal",
271
295
  "low",
@@ -277,6 +301,7 @@
277
301
  {
278
302
  "id": "moonshotai/Kimi-K3",
279
303
  "name": "Kimi K3",
304
+ "maker": "Moonshot AI",
280
305
  "thinking_levels": [
281
306
  "low",
282
307
  "high",
@@ -286,6 +311,7 @@
286
311
  {
287
312
  "id": "moonshotai/Kimi-K3.1-Pro",
288
313
  "name": "Kimi K3.1 Pro",
314
+ "maker": "Moonshot AI",
289
315
  "thinking_levels": [
290
316
  "low",
291
317
  "high",
@@ -295,6 +321,7 @@
295
321
  {
296
322
  "id": "zai-org/GLM-5.3",
297
323
  "name": "GLM 5.3",
324
+ "maker": "Z.ai",
298
325
  "thinking_levels": [
299
326
  "low",
300
327
  "high",
@@ -304,6 +331,7 @@
304
331
  {
305
332
  "id": "zai-org/GLM-5.3-Flash",
306
333
  "name": "GLM 5.3 Flash",
334
+ "maker": "Z.ai",
307
335
  "thinking_levels": [
308
336
  "low",
309
337
  "high",
@@ -313,6 +341,7 @@
313
341
  {
314
342
  "id": "deepseek-ai/DeepSeek-V4-Pro-0813",
315
343
  "name": "DeepSeek V4 Pro 0813",
344
+ "maker": "DeepSeek",
316
345
  "thinking_levels": [
317
346
  "off",
318
347
  "high",
@@ -322,6 +351,7 @@
322
351
  {
323
352
  "id": "zai-org/GLM-5.2",
324
353
  "name": "GLM 5.2",
354
+ "maker": "Z.ai",
325
355
  "thinking_levels": [
326
356
  "off",
327
357
  "high",
@@ -331,6 +361,7 @@
331
361
  {
332
362
  "id": "deepseek-ai/DeepSeek-V4-Flash-0731",
333
363
  "name": "DeepSeek V4 Flash 0731",
364
+ "maker": "DeepSeek",
334
365
  "thinking_levels": [
335
366
  "off",
336
367
  "high",
@@ -340,6 +371,7 @@
340
371
  {
341
372
  "id": "deepseek-ai/DeepSeek-V4.1-Flash-1017",
342
373
  "name": "DeepSeek V4.1 Flash 1017",
374
+ "maker": "DeepSeek",
343
375
  "thinking_levels": [
344
376
  "off",
345
377
  "high",
@@ -349,6 +381,7 @@
349
381
  {
350
382
  "id": "deepseek-ai/DeepSeek-V4.1-Flash",
351
383
  "name": "DeepSeek V4.1 Flash",
384
+ "maker": "DeepSeek",
352
385
  "thinking_levels": [
353
386
  "off",
354
387
  "high",
@@ -358,6 +391,7 @@
358
391
  {
359
392
  "id": "xai/grok-4.6",
360
393
  "name": "Grok 4.6",
394
+ "maker": "xAI",
361
395
  "thinking_levels": [
362
396
  "low",
363
397
  "medium",
@@ -368,6 +402,7 @@
368
402
  {
369
403
  "id": "xai/grok-4.7",
370
404
  "name": "Grok 4.7",
405
+ "maker": "xAI",
371
406
  "thinking_levels": [
372
407
  "low",
373
408
  "medium",
@@ -378,6 +413,7 @@
378
413
  {
379
414
  "id": "google/gemini-4-argon",
380
415
  "name": "Gemini 4 Argon",
416
+ "maker": "Google",
381
417
  "thinking_levels": [
382
418
  "low",
383
419
  "medium",
@@ -387,6 +423,7 @@
387
423
  {
388
424
  "id": "google/gemini-4-carbon",
389
425
  "name": "Gemini 4 Carbon",
426
+ "maker": "Google",
390
427
  "thinking_levels": [
391
428
  "low",
392
429
  "medium",
@@ -396,6 +433,7 @@
396
433
  {
397
434
  "id": "google/gemini-4-neon",
398
435
  "name": "Gemini 4 Neon",
436
+ "maker": "Google",
399
437
  "thinking_levels": [
400
438
  "low",
401
439
  "medium",
@@ -406,6 +444,7 @@
406
444
  {
407
445
  "id": "google/gemini-4-hydrogen",
408
446
  "name": "Gemini 4 Hydrogen",
447
+ "maker": "Google",
409
448
  "thinking_levels": [
410
449
  "low",
411
450
  "medium",
@@ -416,6 +455,7 @@
416
455
  {
417
456
  "id": "google/gemini-3.8-flash",
418
457
  "name": "Gemini 3.8 Flash",
458
+ "maker": "Google",
419
459
  "thinking_levels": [
420
460
  "low",
421
461
  "medium",
@@ -130,8 +130,10 @@ export class HostedSync {
130
130
  try {
131
131
  const response = await this.call("PUT", "/v1/gateway/subscriptions", this.snapshot());
132
132
  if (!response.ok) throw new Error(`HTTP ${response.status}: ${(await response.text()).slice(0, 300)}`);
133
+ const body = await response.json() as { on_dari?: unknown };
133
134
  this.snapshotFailures = 0;
134
135
  this.scheduleSnapshot(HEARTBEAT_MS);
136
+ this.dropPlansOnDari(body.on_dari);
135
137
  } catch (error) {
136
138
  this.snapshotFailures += 1;
137
139
  console.error("hosted plan sync failed", error instanceof Error ? error.message : String(error));
@@ -139,6 +141,19 @@ export class HostedSync {
139
141
  }
140
142
  }
141
143
 
144
+ // Hosted Dari names the reported plans whose account was since connected on
145
+ // Dari. Dari's plan serves this computer too, so the copy here goes, and
146
+ // disconnecting it reports the plans again.
147
+ private dropPlansOnDari(localIds: unknown): void {
148
+ if (!Array.isArray(localIds)) return;
149
+ for (const id of localIds) {
150
+ const plan = typeof id === "string" ? this.subscriptions.get(id) : null;
151
+ if (plan === null || plan.owner !== null || plan.private) continue;
152
+ this.subscriptions.disconnect(plan.name);
153
+ console.error(`${plan.name} is now connected on Dari; removed it from this computer`);
154
+ }
155
+ }
156
+
142
157
  /** Send the queued request rows a batch at a time, unless hosted failed lately. */
143
158
  drain(): Promise<void> {
144
159
  this.draining ??= this.drainDue().finally(() => {