@warmdrift/kgauto-compiler 2.0.0-alpha.90 → 2.0.0-alpha.92

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 (35) hide show
  1. package/dist/{chunk-ENELVMJI.mjs → chunk-4G73BYES.mjs} +10 -5
  2. package/dist/{chunk-BVEXV5KC.mjs → chunk-FEMPY6EC.mjs} +5 -1
  3. package/dist/{chunk-4LYNDEHJ.mjs → chunk-QOQV66PU.mjs} +1 -1
  4. package/dist/{chunk-OK2TMFRR.mjs → chunk-T53ISC2F.mjs} +133 -4
  5. package/dist/dialect.d.mts +11 -1
  6. package/dist/dialect.d.ts +11 -1
  7. package/dist/dialect.js +7 -2
  8. package/dist/dialect.mjs +5 -3
  9. package/dist/glassbox/index.d.mts +3 -3
  10. package/dist/glassbox/index.d.ts +3 -3
  11. package/dist/glassbox-routes/format.d.mts +2 -2
  12. package/dist/glassbox-routes/format.d.ts +2 -2
  13. package/dist/glassbox-routes/index.d.mts +4 -4
  14. package/dist/glassbox-routes/index.d.ts +4 -4
  15. package/dist/glassbox-routes/index.js +142 -8
  16. package/dist/glassbox-routes/index.mjs +2 -2
  17. package/dist/glassbox-routes/react/index.d.mts +2 -2
  18. package/dist/glassbox-routes/react/index.d.ts +2 -2
  19. package/dist/index.d.mts +15 -4
  20. package/dist/index.d.ts +15 -4
  21. package/dist/index.js +233 -17
  22. package/dist/index.mjs +93 -13
  23. package/dist/{ir-DeYMLWge.d.mts → ir-BPYh68mv.d.mts} +95 -1
  24. package/dist/{ir-CTx026t0.d.ts → ir-BWnE6LaB.d.ts} +95 -1
  25. package/dist/key-health.js +1 -1
  26. package/dist/key-health.mjs +1 -1
  27. package/dist/profiles.d.mts +1 -1
  28. package/dist/profiles.d.ts +1 -1
  29. package/dist/profiles.js +133 -4
  30. package/dist/profiles.mjs +1 -1
  31. package/dist/{types-Cp9ot1HV.d.ts → types-BCHv34P7.d.ts} +1 -1
  32. package/dist/{types-cBzinzUR.d.mts → types-BgvLmT3s.d.mts} +1 -1
  33. package/dist/{types-BKbRtmUb.d.ts → types-BhxC4hdx.d.ts} +1 -1
  34. package/dist/{types-DD36cCbZ.d.mts → types-eLelJBj-.d.mts} +1 -1
  35. package/package.json +1 -1
@@ -2,7 +2,7 @@ import {
2
2
  allProfiles,
3
3
  resolveModelAlias,
4
4
  tryGetProfile
5
- } from "./chunk-OK2TMFRR.mjs";
5
+ } from "./chunk-T53ISC2F.mjs";
6
6
 
7
7
  // src/brain-query.ts
8
8
  var FRESH_SNAPSHOT = {
@@ -322,7 +322,8 @@ var SUPPORTED_PROVIDERS = Object.freeze([
322
322
  "openai",
323
323
  "deepseek",
324
324
  "zai",
325
- "moonshot"
325
+ "moonshot",
326
+ "openrouter"
326
327
  ]);
327
328
  function isSupportedProvider(p) {
328
329
  return SUPPORTED_PROVIDERS.includes(p);
@@ -343,7 +344,11 @@ var PROVIDER_ENV_KEYS = Object.freeze({
343
344
  // alpha.65 — Moonshot AI (Kimi family). MOONSHOT_API_KEY is canonical
344
345
  // (api.moonshot.ai); KIMI_API_KEY covers the platform.kimi.ai rebrand
345
346
  // surface so consumers keyed under either name resolve.
346
- moonshot: Object.freeze(["MOONSHOT_API_KEY", "KIMI_API_KEY"])
347
+ moonshot: Object.freeze(["MOONSHOT_API_KEY", "KIMI_API_KEY"]),
348
+ // alpha.92 — the OpenRouter gateway route (execute-leg contract). This is
349
+ // a ROUTE key, not a vendor key: it never makes a vendor "reachable" for
350
+ // chain composition — only explicit `route: 'openrouter'` calls use it.
351
+ openrouter: Object.freeze(["OPENROUTER_API_KEY"])
347
352
  });
348
353
  function defaultEnv() {
349
354
  return typeof process !== "undefined" && process.env ? process.env : {};
@@ -529,7 +534,7 @@ var STARTER_CHAINS_GROUNDED = {
529
534
  { id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost-sensitive primary \u2014 engineer pick" },
530
535
  { id: "deepseek-v4-flash", grounding: "measured", reason: "Brain-validated tier 1 for cost-sensitive summarize workloads", n: 169 },
531
536
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Quality safety net" },
532
- { id: "gemini-2.5-flash-lite", grounding: "judgment", reason: "Emergency floor \u2014 onboarded s22, no brain evidence yet" },
537
+ { id: "gemini-3.5-flash-lite", grounding: "judgment", reason: "Emergency floor. alpha.91: retargeted from availability-restricted gemini-2.5-flash-lite (Google refuses it for new accounts, TT-49 2026-08-26); 3.5-flash-lite is the successor Google\u2019s own error names" },
533
538
  { id: "gpt-5.4-nano", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=6) \u2014 cheapest OpenAI, matches summarize cost-band" }
534
539
  ],
535
540
  // Brain-validated DeepSeek tier 1 (169 rows, 0% empty rate).
@@ -537,7 +542,7 @@ var STARTER_CHAINS_GROUNDED = {
537
542
  { id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost-sensitive primary \u2014 engineer pick" },
538
543
  { id: "deepseek-v4-flash", grounding: "measured", reason: "Brain-validated tier 1 (169 rows, 0% empty rate)", n: 169 },
539
544
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Quality safety net" },
540
- { id: "gemini-2.5-flash-lite", grounding: "judgment", reason: "Cache-discount 10\xD7 floor for repeat-prompt workloads" },
545
+ { id: "gemini-3.5-flash-lite", grounding: "judgment", reason: "Cache-discount 10\xD7 floor for repeat-prompt workloads ($0.03/M cached). alpha.91: retargeted from availability-restricted gemini-2.5-flash-lite" },
541
546
  { id: "gpt-5.4-nano", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=6) \u2014 cheapest OpenAI for classify" }
542
547
  ]
543
548
  };
@@ -91,6 +91,9 @@ function hashShape(s) {
91
91
  function learningKey(archetype, model, shape) {
92
92
  return `${DIALECT_VERSION}::${archetype}::${model}::${hashShape(shape)}`;
93
93
  }
94
+ function routeScopedModel(model, route) {
95
+ return route === "openrouter" ? `${model}@openrouter` : model;
96
+ }
94
97
 
95
98
  export {
96
99
  DIALECT_VERSION,
@@ -102,5 +105,6 @@ export {
102
105
  bucketToolCount,
103
106
  bucketHistory,
104
107
  hashShape,
105
- learningKey
108
+ learningKey,
109
+ routeScopedModel
106
110
  };
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var LIBRARY_VERSION = "2.0.0-alpha.90";
2
+ var LIBRARY_VERSION = "2.0.0-alpha.92";
3
3
 
4
4
  // src/key-health.ts
5
5
  var JSON_HEADERS = { "Content-Type": "application/json" };
@@ -516,9 +516,19 @@ var PROFILES_RAW = [
516
516
  // thresholds. The brain will validate/relax these as evidence accumulates
517
517
  // per (archetype, model) tuple. Currently ZERO brain rows for this model.
518
518
  id: "gemini-2.5-flash-lite",
519
- verifiedAgainstDocs: "2026-08-14",
519
+ verifiedAgainstDocs: "2026-08-27",
520
520
  provider: "google",
521
- status: "current",
521
+ // alpha.91 — AVAILABILITY demotion, same class as gemini-2.5-pro below.
522
+ // Google refuses the model for newer account cohorts: "This model is no
523
+ // longer available to new users. Please update your code to use
524
+ // models/gemini-3.5-flash-lite" (tt-intel TT-49 runtime evidence,
525
+ // 2026-08-26, interfaces/kgauto.md ## Requested). It ranked FIRST in
526
+ // getFallbackChain('gemini-2.5-pro') — a dead-for-new-accounts model as
527
+ // the cheapest fallback pick. `legacy` removes it from chains and new
528
+ // selection; explicit-id consumers still resolve it. Successor is the
529
+ // one Google's own error names: gemini-3.5-flash-lite (onboarded this
530
+ // release, same price point).
531
+ status: "legacy",
522
532
  maxContextTokens: 1048576,
523
533
  maxOutputTokens: 65536,
524
534
  maxTools: 128,
@@ -1243,9 +1253,12 @@ var PROFILES_RAW = [
1243
1253
  //
1244
1254
  // Cliffs are HYPOTHESIZED from 2.5-flash family; brain evidence pending.
1245
1255
  id: "gemini-3.1-flash-lite",
1246
- verifiedAgainstDocs: "2026-05-21",
1256
+ verifiedAgainstDocs: "2026-08-27",
1247
1257
  provider: "google",
1248
- status: "preview",
1258
+ // alpha.91 — docs page now labels it "Stable" and the brain row has been
1259
+ // `current` since catalog-sync moved it; the bundle lagged (the L-073
1260
+ // layer-parity shape, caught during the TT-49 delisting release).
1261
+ status: "current",
1249
1262
  maxContextTokens: 1048576,
1250
1263
  maxOutputTokens: 65536,
1251
1264
  maxTools: 128,
@@ -1337,6 +1350,122 @@ var PROFILES_RAW = [
1337
1350
  }
1338
1351
  },
1339
1352
  // ─────────────────────────────────────────────────────────────────────────
1353
+ // Gemini 3.5 Flash-Lite — onboarded s91 (2026-08-27)
1354
+ //
1355
+ // The successor Google's own delisting error names: "This model
1356
+ // [gemini-2.5-flash-lite] is no longer available to new users. Please
1357
+ // update your code to use models/gemini-3.5-flash-lite" (tt-intel TT-49,
1358
+ // 2026-08-26). Same price point as the 2.5 Lite rung it replaces in the
1359
+ // summarize/classify starter chains ($0.30/$2.50 vs the old $0.10/$0.40
1360
+ // era pricing), same 1M/65K limits, same 10× cache discount ($0.03 vs
1361
+ // $0.30 input). Positioning: "fastest, most cost-effective 3.5 model for
1362
+ // high-throughput execution … high-volume agentic tasks, translation, and
1363
+ // simple data processing."
1364
+ //
1365
+ // Cliffs + archetypePerf inherited from the Flash-Lite family as starter
1366
+ // hypotheses — ZERO brain rows on this id yet; first 50 rows per archetype
1367
+ // validate or relax.
1368
+ //
1369
+ // Specs verified 2026-08-27 against:
1370
+ // ai.google.dev/gemini-api/docs/models/gemini-3.5-flash-lite
1371
+ // (Stable; input limit 1,048,576; output limit 65,536; function
1372
+ // calling / structured outputs / thinking / caching all Supported)
1373
+ // ai.google.dev/gemini-api/docs/pricing ($0.30 in / $2.50 out incl.
1374
+ // thinking tokens; context caching $0.03)
1375
+ // ─────────────────────────────────────────────────────────────────────────
1376
+ {
1377
+ id: "gemini-3.5-flash-lite",
1378
+ verifiedAgainstDocs: "2026-08-27",
1379
+ provider: "google",
1380
+ status: "current",
1381
+ maxContextTokens: 1048576,
1382
+ maxOutputTokens: 65536,
1383
+ maxTools: 128,
1384
+ parallelToolCalls: true,
1385
+ structuredOutput: "native",
1386
+ systemPromptMode: "separate",
1387
+ streaming: true,
1388
+ cliffs: [
1389
+ {
1390
+ metric: "input_tokens",
1391
+ threshold: 8e3,
1392
+ action: "downgrade_quality_warning",
1393
+ reason: "Inherited from Flash family: quality degrades above ~8K. Lite tier \u2014 assume it degrades at least as fast. Re-tune from brain after n\u226520."
1394
+ },
1395
+ {
1396
+ metric: "tool_count",
1397
+ threshold: 10,
1398
+ action: "drop_to_top_relevant",
1399
+ reason: "Conservative: Flash drops at 20, Lite tier is smaller \u2014 assume tighter ceiling until brain proves otherwise."
1400
+ },
1401
+ {
1402
+ metric: "thinking_with_short_output",
1403
+ threshold: 1,
1404
+ action: "force_thinking_budget_zero",
1405
+ reason: "Thinking Supported per model page \u2014 same drain risk as Flash; thinking tokens consume maxOutputTokens."
1406
+ },
1407
+ {
1408
+ // Strong prior: Flash hit 5/5 empty rate on summarize+tools (s11
1409
+ // trust artifact). Flash-Lite siblings carry the guard preemptively;
1410
+ // brain telemetry confirms or relaxes per id.
1411
+ metric: "tool_count",
1412
+ threshold: 1,
1413
+ whenIntent: "summarize",
1414
+ action: "strip_tools",
1415
+ reason: "Inherited from Flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on 3.5 Flash-Lite specifically."
1416
+ }
1417
+ ],
1418
+ costInputPer1m: 0.3,
1419
+ costOutputPer1m: 2.5,
1420
+ lowering: {
1421
+ ...GOOGLE_LOWERING_BASE,
1422
+ // Cache discount 10× — pricing page: $0.03/M cached vs $0.30/M input.
1423
+ // Material for repeat-prompt workloads (classify shape).
1424
+ cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
1425
+ thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
1426
+ },
1427
+ recovery: [
1428
+ {
1429
+ signal: "empty_response_after_tool",
1430
+ action: "retry_with_params",
1431
+ retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
1432
+ maxRetries: 1,
1433
+ reason: "Known on Flash family: empty after tool result \u2014 retry with thinking off."
1434
+ },
1435
+ {
1436
+ signal: "empty_response",
1437
+ action: "retry_with_params",
1438
+ retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
1439
+ maxRetries: 1,
1440
+ reason: "Empty response \u2014 try with thinking off."
1441
+ },
1442
+ {
1443
+ signal: "malformed_function_call",
1444
+ action: "escalate",
1445
+ reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target."
1446
+ }
1447
+ ],
1448
+ strengths: ["low_cost", "speed", "volume", "classification", "summarize", "1m_context", "cache_friendly"],
1449
+ weaknesses: ["complex_reasoning", "large_tool_sets", "complex_schemas", "structured_output_unproven", "long_context_quality"],
1450
+ notes: 'Onboarded s91 (2026-08-27) as the Google-named successor to availability-restricted gemini-2.5-flash-lite. $0.30/$2.50 per 1M, 1M context, 65K max output, cache $0.03/M (10\xD7 discount). "Fastest, most cost-effective 3.5 model for high-throughput execution." Cliffs hypothesized from the Flash family \u2014 brain evidence pending.',
1451
+ // Lite-tier floor for summarize/classify chains. ZERO brain rows — all
1452
+ // values are starter hypotheses anchored to the Flash-Lite family shape.
1453
+ archetypePerf: {
1454
+ classify: 6,
1455
+ // starter hypothesis — verify (Flash is 7, lite likely ≤)
1456
+ summarize: 6,
1457
+ // starter hypothesis — verify; cliff strips tools
1458
+ transform: 6,
1459
+ // starter hypothesis — verify
1460
+ ask: 5,
1461
+ hunt: 5,
1462
+ generate: 4,
1463
+ extract: 4,
1464
+ plan: 3,
1465
+ critique: 3
1466
+ }
1467
+ },
1468
+ // ─────────────────────────────────────────────────────────────────────────
1340
1469
  // Gemini 3.5 Flash — hand-onboarded s37 (2026-05-21)
1341
1470
  //
1342
1471
  // Google positioning ("Most intelligent for sustained frontier performance
@@ -133,5 +133,15 @@ declare function hashShape(s: ShapeSignature): string;
133
133
  * any app can produce and any app can benefit from.
134
134
  */
135
135
  declare function learningKey(archetype: IntentArchetypeName, model: string, shape: ShapeSignature): string;
136
+ /**
137
+ * alpha.92 — the model segment of a learning key, route-scoped. A route is
138
+ * part of a measurement's identity (execute-leg contract): the same model id
139
+ * through a gateway is a different serving stack per host, so non-direct
140
+ * evidence carries the route dimension (`model@openrouter`) and can never
141
+ * pollute direct-vendor evidence. ONE derivation, used by compile() and
142
+ * registerCompile() both — two inline encodings of one concept is the s75
143
+ * drift shape.
144
+ */
145
+ declare function routeScopedModel(model: string, route?: 'direct' | 'openrouter'): string;
136
146
 
137
- export { ALL_ARCHETYPES, type ContextBucket, DIALECT_VERSION, type HistoryDepth, INTENT_ARCHETYPES, type IntentArchetypeName, type OutputMode, type ShapeSignature, type ToolCountBucket, bucketContext, bucketHistory, bucketToolCount, hashShape, isArchetype, learningKey, resolveOutputMode };
147
+ export { ALL_ARCHETYPES, type ContextBucket, DIALECT_VERSION, type HistoryDepth, INTENT_ARCHETYPES, type IntentArchetypeName, type OutputMode, type ShapeSignature, type ToolCountBucket, bucketContext, bucketHistory, bucketToolCount, hashShape, isArchetype, learningKey, resolveOutputMode, routeScopedModel };
package/dist/dialect.d.ts CHANGED
@@ -133,5 +133,15 @@ declare function hashShape(s: ShapeSignature): string;
133
133
  * any app can produce and any app can benefit from.
134
134
  */
135
135
  declare function learningKey(archetype: IntentArchetypeName, model: string, shape: ShapeSignature): string;
136
+ /**
137
+ * alpha.92 — the model segment of a learning key, route-scoped. A route is
138
+ * part of a measurement's identity (execute-leg contract): the same model id
139
+ * through a gateway is a different serving stack per host, so non-direct
140
+ * evidence carries the route dimension (`model@openrouter`) and can never
141
+ * pollute direct-vendor evidence. ONE derivation, used by compile() and
142
+ * registerCompile() both — two inline encodings of one concept is the s75
143
+ * drift shape.
144
+ */
145
+ declare function routeScopedModel(model: string, route?: 'direct' | 'openrouter'): string;
136
146
 
137
- export { ALL_ARCHETYPES, type ContextBucket, DIALECT_VERSION, type HistoryDepth, INTENT_ARCHETYPES, type IntentArchetypeName, type OutputMode, type ShapeSignature, type ToolCountBucket, bucketContext, bucketHistory, bucketToolCount, hashShape, isArchetype, learningKey, resolveOutputMode };
147
+ export { ALL_ARCHETYPES, type ContextBucket, DIALECT_VERSION, type HistoryDepth, INTENT_ARCHETYPES, type IntentArchetypeName, type OutputMode, type ShapeSignature, type ToolCountBucket, bucketContext, bucketHistory, bucketToolCount, hashShape, isArchetype, learningKey, resolveOutputMode, routeScopedModel };
package/dist/dialect.js CHANGED
@@ -29,7 +29,8 @@ __export(dialect_exports, {
29
29
  hashShape: () => hashShape,
30
30
  isArchetype: () => isArchetype,
31
31
  learningKey: () => learningKey,
32
- resolveOutputMode: () => resolveOutputMode
32
+ resolveOutputMode: () => resolveOutputMode,
33
+ routeScopedModel: () => routeScopedModel
33
34
  });
34
35
  module.exports = __toCommonJS(dialect_exports);
35
36
  var DIALECT_VERSION = "v1";
@@ -124,6 +125,9 @@ function hashShape(s) {
124
125
  function learningKey(archetype, model, shape) {
125
126
  return `${DIALECT_VERSION}::${archetype}::${model}::${hashShape(shape)}`;
126
127
  }
128
+ function routeScopedModel(model, route) {
129
+ return route === "openrouter" ? `${model}@openrouter` : model;
130
+ }
127
131
  // Annotate the CommonJS export names for ESM import in node:
128
132
  0 && (module.exports = {
129
133
  ALL_ARCHETYPES,
@@ -135,5 +139,6 @@ function learningKey(archetype, model, shape) {
135
139
  hashShape,
136
140
  isArchetype,
137
141
  learningKey,
138
- resolveOutputMode
142
+ resolveOutputMode,
143
+ routeScopedModel
139
144
  });
package/dist/dialect.mjs CHANGED
@@ -8,8 +8,9 @@ import {
8
8
  hashShape,
9
9
  isArchetype,
10
10
  learningKey,
11
- resolveOutputMode
12
- } from "./chunk-BVEXV5KC.mjs";
11
+ resolveOutputMode,
12
+ routeScopedModel
13
+ } from "./chunk-FEMPY6EC.mjs";
13
14
  export {
14
15
  ALL_ARCHETYPES,
15
16
  DIALECT_VERSION,
@@ -20,5 +21,6 @@ export {
20
21
  hashShape,
21
22
  isArchetype,
22
23
  learningKey,
23
- resolveOutputMode
24
+ resolveOutputMode,
25
+ routeScopedModel
24
26
  };
@@ -1,6 +1,6 @@
1
- import { G as GlassboxEvent } from '../types-cBzinzUR.mjs';
2
- export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-cBzinzUR.mjs';
3
- import '../ir-DeYMLWge.mjs';
1
+ import { G as GlassboxEvent } from '../types-BgvLmT3s.mjs';
2
+ export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-BgvLmT3s.mjs';
3
+ import '../ir-BPYh68mv.mjs';
4
4
  import '../dialect.mjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { G as GlassboxEvent } from '../types-BKbRtmUb.js';
2
- export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-BKbRtmUb.js';
3
- import '../ir-CTx026t0.js';
1
+ import { G as GlassboxEvent } from '../types-BhxC4hdx.js';
2
+ export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-BhxC4hdx.js';
3
+ import '../ir-BWnE6LaB.js';
4
4
  import '../dialect.js';
5
5
 
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { T as TraceHealth } from '../types-DD36cCbZ.mjs';
2
- import '../ir-DeYMLWge.mjs';
1
+ import { T as TraceHealth } from '../types-eLelJBj-.mjs';
2
+ import '../ir-BPYh68mv.mjs';
3
3
  import '../dialect.mjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { T as TraceHealth } from '../types-Cp9ot1HV.js';
2
- import '../ir-CTx026t0.js';
1
+ import { T as TraceHealth } from '../types-BCHv34P7.js';
2
+ import '../ir-BWnE6LaB.js';
3
3
  import '../dialect.js';
4
4
 
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { G as GlassboxEvent } from '../types-cBzinzUR.mjs';
2
- import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-DD36cCbZ.mjs';
3
- export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-DD36cCbZ.mjs';
4
- import '../ir-DeYMLWge.mjs';
1
+ import { G as GlassboxEvent } from '../types-BgvLmT3s.mjs';
2
+ import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-eLelJBj-.mjs';
3
+ export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-eLelJBj-.mjs';
4
+ import '../ir-BPYh68mv.mjs';
5
5
  import '../dialect.mjs';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
- import { G as GlassboxEvent } from '../types-BKbRtmUb.js';
2
- import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-Cp9ot1HV.js';
3
- export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-Cp9ot1HV.js';
4
- import '../ir-CTx026t0.js';
1
+ import { G as GlassboxEvent } from '../types-BhxC4hdx.js';
2
+ import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-BCHv34P7.js';
3
+ export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-BCHv34P7.js';
4
+ import '../ir-BWnE6LaB.js';
5
5
  import '../dialect.js';
6
6
 
7
7
  /**
@@ -570,9 +570,19 @@ var PROFILES_RAW = [
570
570
  // thresholds. The brain will validate/relax these as evidence accumulates
571
571
  // per (archetype, model) tuple. Currently ZERO brain rows for this model.
572
572
  id: "gemini-2.5-flash-lite",
573
- verifiedAgainstDocs: "2026-08-14",
573
+ verifiedAgainstDocs: "2026-08-27",
574
574
  provider: "google",
575
- status: "current",
575
+ // alpha.91 — AVAILABILITY demotion, same class as gemini-2.5-pro below.
576
+ // Google refuses the model for newer account cohorts: "This model is no
577
+ // longer available to new users. Please update your code to use
578
+ // models/gemini-3.5-flash-lite" (tt-intel TT-49 runtime evidence,
579
+ // 2026-08-26, interfaces/kgauto.md ## Requested). It ranked FIRST in
580
+ // getFallbackChain('gemini-2.5-pro') — a dead-for-new-accounts model as
581
+ // the cheapest fallback pick. `legacy` removes it from chains and new
582
+ // selection; explicit-id consumers still resolve it. Successor is the
583
+ // one Google's own error names: gemini-3.5-flash-lite (onboarded this
584
+ // release, same price point).
585
+ status: "legacy",
576
586
  maxContextTokens: 1048576,
577
587
  maxOutputTokens: 65536,
578
588
  maxTools: 128,
@@ -1297,9 +1307,12 @@ var PROFILES_RAW = [
1297
1307
  //
1298
1308
  // Cliffs are HYPOTHESIZED from 2.5-flash family; brain evidence pending.
1299
1309
  id: "gemini-3.1-flash-lite",
1300
- verifiedAgainstDocs: "2026-05-21",
1310
+ verifiedAgainstDocs: "2026-08-27",
1301
1311
  provider: "google",
1302
- status: "preview",
1312
+ // alpha.91 — docs page now labels it "Stable" and the brain row has been
1313
+ // `current` since catalog-sync moved it; the bundle lagged (the L-073
1314
+ // layer-parity shape, caught during the TT-49 delisting release).
1315
+ status: "current",
1303
1316
  maxContextTokens: 1048576,
1304
1317
  maxOutputTokens: 65536,
1305
1318
  maxTools: 128,
@@ -1391,6 +1404,122 @@ var PROFILES_RAW = [
1391
1404
  }
1392
1405
  },
1393
1406
  // ─────────────────────────────────────────────────────────────────────────
1407
+ // Gemini 3.5 Flash-Lite — onboarded s91 (2026-08-27)
1408
+ //
1409
+ // The successor Google's own delisting error names: "This model
1410
+ // [gemini-2.5-flash-lite] is no longer available to new users. Please
1411
+ // update your code to use models/gemini-3.5-flash-lite" (tt-intel TT-49,
1412
+ // 2026-08-26). Same price point as the 2.5 Lite rung it replaces in the
1413
+ // summarize/classify starter chains ($0.30/$2.50 vs the old $0.10/$0.40
1414
+ // era pricing), same 1M/65K limits, same 10× cache discount ($0.03 vs
1415
+ // $0.30 input). Positioning: "fastest, most cost-effective 3.5 model for
1416
+ // high-throughput execution … high-volume agentic tasks, translation, and
1417
+ // simple data processing."
1418
+ //
1419
+ // Cliffs + archetypePerf inherited from the Flash-Lite family as starter
1420
+ // hypotheses — ZERO brain rows on this id yet; first 50 rows per archetype
1421
+ // validate or relax.
1422
+ //
1423
+ // Specs verified 2026-08-27 against:
1424
+ // ai.google.dev/gemini-api/docs/models/gemini-3.5-flash-lite
1425
+ // (Stable; input limit 1,048,576; output limit 65,536; function
1426
+ // calling / structured outputs / thinking / caching all Supported)
1427
+ // ai.google.dev/gemini-api/docs/pricing ($0.30 in / $2.50 out incl.
1428
+ // thinking tokens; context caching $0.03)
1429
+ // ─────────────────────────────────────────────────────────────────────────
1430
+ {
1431
+ id: "gemini-3.5-flash-lite",
1432
+ verifiedAgainstDocs: "2026-08-27",
1433
+ provider: "google",
1434
+ status: "current",
1435
+ maxContextTokens: 1048576,
1436
+ maxOutputTokens: 65536,
1437
+ maxTools: 128,
1438
+ parallelToolCalls: true,
1439
+ structuredOutput: "native",
1440
+ systemPromptMode: "separate",
1441
+ streaming: true,
1442
+ cliffs: [
1443
+ {
1444
+ metric: "input_tokens",
1445
+ threshold: 8e3,
1446
+ action: "downgrade_quality_warning",
1447
+ reason: "Inherited from Flash family: quality degrades above ~8K. Lite tier \u2014 assume it degrades at least as fast. Re-tune from brain after n\u226520."
1448
+ },
1449
+ {
1450
+ metric: "tool_count",
1451
+ threshold: 10,
1452
+ action: "drop_to_top_relevant",
1453
+ reason: "Conservative: Flash drops at 20, Lite tier is smaller \u2014 assume tighter ceiling until brain proves otherwise."
1454
+ },
1455
+ {
1456
+ metric: "thinking_with_short_output",
1457
+ threshold: 1,
1458
+ action: "force_thinking_budget_zero",
1459
+ reason: "Thinking Supported per model page \u2014 same drain risk as Flash; thinking tokens consume maxOutputTokens."
1460
+ },
1461
+ {
1462
+ // Strong prior: Flash hit 5/5 empty rate on summarize+tools (s11
1463
+ // trust artifact). Flash-Lite siblings carry the guard preemptively;
1464
+ // brain telemetry confirms or relaxes per id.
1465
+ metric: "tool_count",
1466
+ threshold: 1,
1467
+ whenIntent: "summarize",
1468
+ action: "strip_tools",
1469
+ reason: "Inherited from Flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on 3.5 Flash-Lite specifically."
1470
+ }
1471
+ ],
1472
+ costInputPer1m: 0.3,
1473
+ costOutputPer1m: 2.5,
1474
+ lowering: {
1475
+ ...GOOGLE_LOWERING_BASE,
1476
+ // Cache discount 10× — pricing page: $0.03/M cached vs $0.30/M input.
1477
+ // Material for repeat-prompt workloads (classify shape).
1478
+ cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
1479
+ thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
1480
+ },
1481
+ recovery: [
1482
+ {
1483
+ signal: "empty_response_after_tool",
1484
+ action: "retry_with_params",
1485
+ retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
1486
+ maxRetries: 1,
1487
+ reason: "Known on Flash family: empty after tool result \u2014 retry with thinking off."
1488
+ },
1489
+ {
1490
+ signal: "empty_response",
1491
+ action: "retry_with_params",
1492
+ retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
1493
+ maxRetries: 1,
1494
+ reason: "Empty response \u2014 try with thinking off."
1495
+ },
1496
+ {
1497
+ signal: "malformed_function_call",
1498
+ action: "escalate",
1499
+ reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target."
1500
+ }
1501
+ ],
1502
+ strengths: ["low_cost", "speed", "volume", "classification", "summarize", "1m_context", "cache_friendly"],
1503
+ weaknesses: ["complex_reasoning", "large_tool_sets", "complex_schemas", "structured_output_unproven", "long_context_quality"],
1504
+ notes: 'Onboarded s91 (2026-08-27) as the Google-named successor to availability-restricted gemini-2.5-flash-lite. $0.30/$2.50 per 1M, 1M context, 65K max output, cache $0.03/M (10\xD7 discount). "Fastest, most cost-effective 3.5 model for high-throughput execution." Cliffs hypothesized from the Flash family \u2014 brain evidence pending.',
1505
+ // Lite-tier floor for summarize/classify chains. ZERO brain rows — all
1506
+ // values are starter hypotheses anchored to the Flash-Lite family shape.
1507
+ archetypePerf: {
1508
+ classify: 6,
1509
+ // starter hypothesis — verify (Flash is 7, lite likely ≤)
1510
+ summarize: 6,
1511
+ // starter hypothesis — verify; cliff strips tools
1512
+ transform: 6,
1513
+ // starter hypothesis — verify
1514
+ ask: 5,
1515
+ hunt: 5,
1516
+ generate: 4,
1517
+ extract: 4,
1518
+ plan: 3,
1519
+ critique: 3
1520
+ }
1521
+ },
1522
+ // ─────────────────────────────────────────────────────────────────────────
1394
1523
  // Gemini 3.5 Flash — hand-onboarded s37 (2026-05-21)
1395
1524
  //
1396
1525
  // Google positioning ("Most intelligent for sustained frontier performance
@@ -1850,7 +1979,8 @@ var SUPPORTED_PROVIDERS = Object.freeze([
1850
1979
  "openai",
1851
1980
  "deepseek",
1852
1981
  "zai",
1853
- "moonshot"
1982
+ "moonshot",
1983
+ "openrouter"
1854
1984
  ]);
1855
1985
  function isSupportedProvider(p) {
1856
1986
  return SUPPORTED_PROVIDERS.includes(p);
@@ -1871,7 +2001,11 @@ var PROVIDER_ENV_KEYS = Object.freeze({
1871
2001
  // alpha.65 — Moonshot AI (Kimi family). MOONSHOT_API_KEY is canonical
1872
2002
  // (api.moonshot.ai); KIMI_API_KEY covers the platform.kimi.ai rebrand
1873
2003
  // surface so consumers keyed under either name resolve.
1874
- moonshot: Object.freeze(["MOONSHOT_API_KEY", "KIMI_API_KEY"])
2004
+ moonshot: Object.freeze(["MOONSHOT_API_KEY", "KIMI_API_KEY"]),
2005
+ // alpha.92 — the OpenRouter gateway route (execute-leg contract). This is
2006
+ // a ROUTE key, not a vendor key: it never makes a vendor "reachable" for
2007
+ // chain composition — only explicit `route: 'openrouter'` calls use it.
2008
+ openrouter: Object.freeze(["OPENROUTER_API_KEY"])
1875
2009
  });
1876
2010
  function defaultEnv() {
1877
2011
  return typeof process !== "undefined" && process.env ? process.env : {};
@@ -2176,7 +2310,7 @@ var STARTER_CHAINS_GROUNDED = {
2176
2310
  { id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost-sensitive primary \u2014 engineer pick" },
2177
2311
  { id: "deepseek-v4-flash", grounding: "measured", reason: "Brain-validated tier 1 for cost-sensitive summarize workloads", n: 169 },
2178
2312
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Quality safety net" },
2179
- { id: "gemini-2.5-flash-lite", grounding: "judgment", reason: "Emergency floor \u2014 onboarded s22, no brain evidence yet" },
2313
+ { id: "gemini-3.5-flash-lite", grounding: "judgment", reason: "Emergency floor. alpha.91: retargeted from availability-restricted gemini-2.5-flash-lite (Google refuses it for new accounts, TT-49 2026-08-26); 3.5-flash-lite is the successor Google\u2019s own error names" },
2180
2314
  { id: "gpt-5.4-nano", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=6) \u2014 cheapest OpenAI, matches summarize cost-band" }
2181
2315
  ],
2182
2316
  // Brain-validated DeepSeek tier 1 (169 rows, 0% empty rate).
@@ -2184,7 +2318,7 @@ var STARTER_CHAINS_GROUNDED = {
2184
2318
  { id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost-sensitive primary \u2014 engineer pick" },
2185
2319
  { id: "deepseek-v4-flash", grounding: "measured", reason: "Brain-validated tier 1 (169 rows, 0% empty rate)", n: 169 },
2186
2320
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Quality safety net" },
2187
- { id: "gemini-2.5-flash-lite", grounding: "judgment", reason: "Cache-discount 10\xD7 floor for repeat-prompt workloads" },
2321
+ { id: "gemini-3.5-flash-lite", grounding: "judgment", reason: "Cache-discount 10\xD7 floor for repeat-prompt workloads ($0.03/M cached). alpha.91: retargeted from availability-restricted gemini-2.5-flash-lite" },
2188
2322
  { id: "gpt-5.4-nano", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=6) \u2014 cheapest OpenAI for classify" }
2189
2323
  ]
2190
2324
  };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ARCHETYPE_FLOOR_DEFAULT,
3
3
  getDefaultFallbackChain
4
- } from "../chunk-ENELVMJI.mjs";
4
+ } from "../chunk-4G73BYES.mjs";
5
5
  import {
6
6
  tryGetProfile
7
- } from "../chunk-OK2TMFRR.mjs";
7
+ } from "../chunk-T53ISC2F.mjs";
8
8
  import {
9
9
  subscribe,
10
10
  subscribeApp
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as TraceDetail } from '../../types-DD36cCbZ.mjs';
3
- import '../../ir-DeYMLWge.mjs';
2
+ import { a as TraceDetail } from '../../types-eLelJBj-.mjs';
3
+ import '../../ir-BPYh68mv.mjs';
4
4
  import '../../dialect.mjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as TraceDetail } from '../../types-Cp9ot1HV.js';
3
- import '../../ir-CTx026t0.js';
2
+ import { a as TraceDetail } from '../../types-BCHv34P7.js';
3
+ import '../../ir-BWnE6LaB.js';
4
4
  import '../../dialect.js';
5
5
 
6
6
  /**