@warmdrift/kgauto-compiler 2.0.0-alpha.85 → 2.0.0-alpha.87
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/dist/{chunk-LO2JXTGG.mjs → chunk-G3MKT7IR.mjs} +25 -13
- package/dist/{chunk-WXN7FNXP.mjs → chunk-GMZT4ZXD.mjs} +1 -1
- package/dist/{chunk-FD3NFXDC.mjs → chunk-YVKTTTTB.mjs} +189 -23
- package/dist/glassbox/index.d.mts +3 -3
- package/dist/glassbox/index.d.ts +3 -3
- package/dist/glassbox-routes/format.d.mts +2 -2
- package/dist/glassbox-routes/format.d.ts +2 -2
- package/dist/glassbox-routes/index.d.mts +4 -4
- package/dist/glassbox-routes/index.d.ts +4 -4
- package/dist/glassbox-routes/index.js +152 -34
- package/dist/glassbox-routes/index.mjs +2 -2
- package/dist/glassbox-routes/react/index.d.mts +2 -2
- package/dist/glassbox-routes/react/index.d.ts +2 -2
- package/dist/index.d.mts +60 -5
- package/dist/index.d.ts +60 -5
- package/dist/index.js +409 -44
- package/dist/index.mjs +200 -11
- package/dist/{ir-JUoybVM-.d.mts → ir-P3NEU8z4.d.mts} +116 -1
- package/dist/{ir-DfrM71pA.d.ts → ir-ZgN2KkuF.d.ts} +116 -1
- package/dist/key-health.js +1 -1
- package/dist/key-health.mjs +1 -1
- package/dist/profiles.d.mts +43 -2
- package/dist/profiles.d.ts +43 -2
- package/dist/profiles.js +193 -23
- package/dist/profiles.mjs +9 -1
- package/dist/{types-y42mwdvM.d.mts → types-7sF3adLO.d.mts} +1 -1
- package/dist/{types-BqTKRECa.d.ts → types-B_MjEB0h.d.ts} +1 -1
- package/dist/{types-DLDJbCha.d.ts → types-BgfuVIVI.d.ts} +1 -1
- package/dist/{types-BGH_KAHu.d.mts → types-CK0zUlVE.d.mts} +1 -1
- package/package.json +8 -2
package/dist/profiles.js
CHANGED
|
@@ -23,11 +23,15 @@ __export(profiles_exports, {
|
|
|
23
23
|
ALIASES: () => ALIASES,
|
|
24
24
|
LATENCY_TIER_MS: () => LATENCY_TIER_MS,
|
|
25
25
|
_setProfileBrainHook: () => _setProfileBrainHook,
|
|
26
|
+
_testClearConsumerProfiles: () => _testClearConsumerProfiles,
|
|
26
27
|
allProfiles: () => allProfiles,
|
|
27
28
|
allProfilesRaw: () => allProfilesRaw,
|
|
29
|
+
bestEffortProfile: () => bestEffortProfile,
|
|
28
30
|
getProfile: () => getProfile,
|
|
31
|
+
inferProviderFromId: () => inferProviderFromId,
|
|
29
32
|
latencyTierOf: () => latencyTierOf,
|
|
30
33
|
profilesByProvider: () => profilesByProvider,
|
|
34
|
+
registerProfiles: () => registerProfiles,
|
|
31
35
|
resolveModelAlias: () => resolveModelAlias,
|
|
32
36
|
tryGetProfile: () => tryGetProfile
|
|
33
37
|
});
|
|
@@ -244,7 +248,7 @@ var PROFILES_RAW = [
|
|
|
244
248
|
},
|
|
245
249
|
{
|
|
246
250
|
id: "claude-opus-4-7",
|
|
247
|
-
verifiedAgainstDocs: "2026-
|
|
251
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
248
252
|
provider: "anthropic",
|
|
249
253
|
status: "legacy",
|
|
250
254
|
// s76 2026-07-25: docs list as LEGACY (Opus 5 is current). Bundle said current while the brain already said legacy — the two disagreed.
|
|
@@ -294,7 +298,7 @@ var PROFILES_RAW = [
|
|
|
294
298
|
},
|
|
295
299
|
{
|
|
296
300
|
id: "claude-opus-4-6",
|
|
297
|
-
verifiedAgainstDocs: "2026-
|
|
301
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
298
302
|
provider: "anthropic",
|
|
299
303
|
status: "legacy",
|
|
300
304
|
maxContextTokens: 1e6,
|
|
@@ -339,7 +343,7 @@ var PROFILES_RAW = [
|
|
|
339
343
|
},
|
|
340
344
|
{
|
|
341
345
|
id: "claude-sonnet-4-6",
|
|
342
|
-
verifiedAgainstDocs: "2026-
|
|
346
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
343
347
|
provider: "anthropic",
|
|
344
348
|
status: "legacy",
|
|
345
349
|
// s76 2026-07-25: docs list as LEGACY (Sonnet 5 is current).
|
|
@@ -380,7 +384,7 @@ var PROFILES_RAW = [
|
|
|
380
384
|
},
|
|
381
385
|
{
|
|
382
386
|
id: "claude-haiku-4-5",
|
|
383
|
-
verifiedAgainstDocs: "2026-
|
|
387
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
384
388
|
provider: "anthropic",
|
|
385
389
|
status: "current",
|
|
386
390
|
maxContextTokens: 2e5,
|
|
@@ -443,7 +447,7 @@ var PROFILES_RAW = [
|
|
|
443
447
|
// ── Google ──
|
|
444
448
|
{
|
|
445
449
|
id: "gemini-2.5-flash",
|
|
446
|
-
verifiedAgainstDocs: "2026-
|
|
450
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
447
451
|
provider: "google",
|
|
448
452
|
status: "current",
|
|
449
453
|
maxContextTokens: 1048576,
|
|
@@ -549,7 +553,7 @@ var PROFILES_RAW = [
|
|
|
549
553
|
// thresholds. The brain will validate/relax these as evidence accumulates
|
|
550
554
|
// per (archetype, model) tuple. Currently ZERO brain rows for this model.
|
|
551
555
|
id: "gemini-2.5-flash-lite",
|
|
552
|
-
verifiedAgainstDocs: "2026-
|
|
556
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
553
557
|
provider: "google",
|
|
554
558
|
status: "current",
|
|
555
559
|
maxContextTokens: 1048576,
|
|
@@ -644,9 +648,21 @@ var PROFILES_RAW = [
|
|
|
644
648
|
},
|
|
645
649
|
{
|
|
646
650
|
id: "gemini-2.5-pro",
|
|
647
|
-
verifiedAgainstDocs: "2026-
|
|
651
|
+
verifiedAgainstDocs: "2026-08-08",
|
|
648
652
|
provider: "google",
|
|
649
|
-
|
|
653
|
+
// alpha.86 — AVAILABILITY demotion, not a provider-lifecycle mirror.
|
|
654
|
+
// Google's docs still list 2.5-pro as Stable, but the serving layer
|
|
655
|
+
// disagrees per account cohort: tt-intel measured 4/4 refusals
|
|
656
|
+
// ("no longer available to new users", 2026-08-02, their bench), and
|
|
657
|
+
// kgauto's own key 429s on a FreeTier per-day quota (probed
|
|
658
|
+
// 2026-08-08). A chain anchor that hard-fails for whole account
|
|
659
|
+
// cohorts is not an anchor; `legacy` removes it from cost-ordered
|
|
660
|
+
// chains and new selection while keeping the profile resolvable for
|
|
661
|
+
// consumers who pass it explicitly. Re-promotion is one status flip
|
|
662
|
+
// if Google restores availability. The registry cannot yet express
|
|
663
|
+
// account-cohort availability as data — see interfaces/kgauto.md
|
|
664
|
+
// ## Requested 2026-08-02.
|
|
665
|
+
status: "legacy",
|
|
650
666
|
maxContextTokens: 1048576,
|
|
651
667
|
maxOutputTokens: 65535,
|
|
652
668
|
maxTools: 128,
|
|
@@ -676,7 +692,7 @@ var PROFILES_RAW = [
|
|
|
676
692
|
}
|
|
677
693
|
],
|
|
678
694
|
strengths: ["reasoning", "1m_context", "structured_output", "tool_use"],
|
|
679
|
-
weaknesses: ["pricing_above_200k"],
|
|
695
|
+
weaknesses: ["pricing_above_200k", "availability_restricted_by_account_cohort"],
|
|
680
696
|
// Master plan §3.3 anchor: tier-2 cross-provider in almost every chain.
|
|
681
697
|
// Sits on the frontier at perf-9 — close to Sonnet but cheaper input.
|
|
682
698
|
archetypePerf: {
|
|
@@ -694,7 +710,7 @@ var PROFILES_RAW = [
|
|
|
694
710
|
},
|
|
695
711
|
{
|
|
696
712
|
id: "gemini-3.1-pro-preview",
|
|
697
|
-
verifiedAgainstDocs: "2026-
|
|
713
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
698
714
|
provider: "google",
|
|
699
715
|
status: "preview",
|
|
700
716
|
maxContextTokens: 1048576,
|
|
@@ -754,7 +770,7 @@ var PROFILES_RAW = [
|
|
|
754
770
|
// deepseek-reasoner registered as aliases (see ALIASES below).
|
|
755
771
|
{
|
|
756
772
|
id: "deepseek-v4-flash",
|
|
757
|
-
verifiedAgainstDocs: "2026-
|
|
773
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
758
774
|
provider: "deepseek",
|
|
759
775
|
status: "current",
|
|
760
776
|
maxContextTokens: 1e6,
|
|
@@ -792,7 +808,7 @@ var PROFILES_RAW = [
|
|
|
792
808
|
// baseQuality (it carries 'reasoning') with no latency counterweight,
|
|
793
809
|
// leapfrogged gemini-2.5-flash as PB's summarize leader once reachable.
|
|
794
810
|
latencyTier: "slow",
|
|
795
|
-
notes: "Cheap workhorse. 1M context, 384k max output. Cache-hit input $0.0028/M (1/50\xD7 of miss). Aliased as `deepseek-chat` (non-thinking) and `deepseek-reasoner` (thinking) \u2014 see ALIASES.",
|
|
811
|
+
notes: "Cheap workhorse. 1M context, 384k max output. Cache-hit input $0.0028/M (1/50\xD7 of miss). Aliased as `deepseek-chat` (non-thinking) and `deepseek-reasoner` (thinking) \u2014 see ALIASES. PRICING MODEL CHANGE effective 2026-08-16: DeepSeek moves to peak/off-peak billing, off-peak at HALF the peak rate (docs, fetched 2026-08-14). Encoded prices are peak; cost math for off-peak traffic will overstate by up to 2x until time-of-day pricing is modeled.",
|
|
796
812
|
// Master plan §6.2 anchor. Brain-validated tier 1 cross-provider for
|
|
797
813
|
// classify (169 rows, 0% empty). Tier 0 for summarize-with-no-tools.
|
|
798
814
|
// Falls off on hunt (sequential tools — L-040) and reasoning depth.
|
|
@@ -827,7 +843,7 @@ var PROFILES_RAW = [
|
|
|
827
843
|
},
|
|
828
844
|
{
|
|
829
845
|
id: "deepseek-v4-pro",
|
|
830
|
-
verifiedAgainstDocs: "2026-
|
|
846
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
831
847
|
provider: "deepseek",
|
|
832
848
|
status: "current",
|
|
833
849
|
maxContextTokens: 1e6,
|
|
@@ -868,7 +884,7 @@ var PROFILES_RAW = [
|
|
|
868
884
|
// of the served set. Tag derivation would say 'medium'; the measurement says
|
|
869
885
|
// otherwise.
|
|
870
886
|
latencyTier: "slow",
|
|
871
|
-
notes: "Pro tier. 1M context, 384k max output. $0.435/$0.87 per 1M (cache-hit in $0.003625) \u2014 verified live 2026-06-22; the launch promo became the standing price (no revert). Default mode = thinking.",
|
|
887
|
+
notes: "Pro tier. 1M context, 384k max output. $0.435/$0.87 per 1M (cache-hit in $0.003625) \u2014 verified live 2026-06-22; the launch promo became the standing price (no revert). Default mode = thinking. PRICING MODEL CHANGE effective 2026-08-16: DeepSeek moves to peak/off-peak billing, off-peak at HALF the peak rate (docs, fetched 2026-08-14). Encoded prices are peak; cost math for off-peak traffic will overstate by up to 2x until time-of-day pricing is modeled.",
|
|
872
888
|
// Master plan §3.3: tier 3 cross-provider for plan chain. Reasoning
|
|
873
889
|
// bumped one notch over V4-Flash; same parallel-tool ceiling.
|
|
874
890
|
archetypePerf: {
|
|
@@ -1476,13 +1492,109 @@ var PROFILES_RAW = [
|
|
|
1476
1492
|
// +1 vs 2.5-flash — but still below Sonnet/Opus reasoning floor
|
|
1477
1493
|
}
|
|
1478
1494
|
},
|
|
1495
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
1496
|
+
// gemini-3.6-flash — hand-onboarded s86 (2026-08-14), step-zero against
|
|
1497
|
+
// Google docs (models/gemini-3.6-flash page + pricing via catalog-sync's
|
|
1498
|
+
// two-agreeing-extraction the same day). Docs list it as Stable and call
|
|
1499
|
+
// it "previous-generation Flash" (3.5-flash is now "legacy" in Google's
|
|
1500
|
+
// wording) — but kgauto status is 'preview' per the standing entry rule:
|
|
1501
|
+
// a new model enters on capability data verified only at the docs level,
|
|
1502
|
+
// preview is unreachable by starter chains, and promotion to routing
|
|
1503
|
+
// happens through brain evidence, not through Google's marketing tier.
|
|
1504
|
+
// This also means NO family-primary retarget rides this release.
|
|
1505
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
1506
|
+
{
|
|
1507
|
+
id: "gemini-3.6-flash",
|
|
1508
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
1509
|
+
versionAdded: "2.0.0-alpha.87",
|
|
1510
|
+
provider: "google",
|
|
1511
|
+
status: "preview",
|
|
1512
|
+
maxContextTokens: 1048576,
|
|
1513
|
+
maxOutputTokens: 65536,
|
|
1514
|
+
maxTools: 128,
|
|
1515
|
+
parallelToolCalls: true,
|
|
1516
|
+
structuredOutput: "native",
|
|
1517
|
+
systemPromptMode: "separate",
|
|
1518
|
+
streaming: true,
|
|
1519
|
+
cliffs: [
|
|
1520
|
+
{
|
|
1521
|
+
metric: "input_tokens",
|
|
1522
|
+
threshold: 8e3,
|
|
1523
|
+
action: "downgrade_quality_warning",
|
|
1524
|
+
reason: "Inherited Flash-family guard (2.5\u21923.5 lineage); no 3.6 brain evidence yet"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
metric: "tool_count",
|
|
1528
|
+
threshold: 20,
|
|
1529
|
+
action: "drop_to_top_relevant",
|
|
1530
|
+
reason: "Inherited from Flash family: tool reliability drops above ~20 (despite 128 hard limit). Validate per (archetype, model) after n\u226520."
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
metric: "thinking_with_short_output",
|
|
1534
|
+
threshold: 1,
|
|
1535
|
+
action: "force_thinking_budget_zero",
|
|
1536
|
+
reason: "Thinking supported per Google docs; same drain risk as 2.5/3.5-flash \u2014 thinking tokens consume maxOutputTokens"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
metric: "tool_count",
|
|
1540
|
+
threshold: 1,
|
|
1541
|
+
whenIntent: "summarize",
|
|
1542
|
+
action: "strip_tools",
|
|
1543
|
+
reason: "Inherited from 2.5-flash s11 cliff: summarize+tools \u2192 empty response. Preemptive family guard until brain evidence on 3.6-flash specifically."
|
|
1544
|
+
}
|
|
1545
|
+
],
|
|
1546
|
+
costInputPer1m: 1.5,
|
|
1547
|
+
costOutputPer1m: 7.5,
|
|
1548
|
+
lowering: {
|
|
1549
|
+
...GOOGLE_LOWERING_BASE,
|
|
1550
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
1551
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
1552
|
+
},
|
|
1553
|
+
recovery: [
|
|
1554
|
+
{
|
|
1555
|
+
signal: "empty_response_after_tool",
|
|
1556
|
+
action: "retry_with_params",
|
|
1557
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1558
|
+
maxRetries: 1,
|
|
1559
|
+
reason: "Inherited Flash-family pattern: empty after tool result \u2014 retry with thinking off"
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
signal: "empty_response",
|
|
1563
|
+
action: "retry_with_params",
|
|
1564
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1565
|
+
maxRetries: 1,
|
|
1566
|
+
reason: "Empty response \u2014 try with thinking off"
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
signal: "malformed_function_call",
|
|
1570
|
+
action: "escalate",
|
|
1571
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target"
|
|
1572
|
+
}
|
|
1573
|
+
],
|
|
1574
|
+
strengths: ["agentic_loops", "coding", "1m_context", "parallel_tools", "thinking_mode"],
|
|
1575
|
+
weaknesses: ["no_brain_evidence_yet"],
|
|
1576
|
+
notes: "Hand-onboarded s86 (2026-08-14), step-zero verified: 1,048,576 ctx / 65,536 out (Google model page), $1.50/$7.50 per 1M (catalog-sync two-agreeing-extraction same day \u2014 CHEAPER output than 3.5-flash at $9.00). Docs status Stable; enters kgauto as preview per standing rule (availability != lifecycle, promotion via brain evidence). Function calling + structured outputs + thinking per docs; parallel tools assumed per Flash family (docs silent). First flagged by the release watcher s73; sat in the onboarding queue 18 days \u2014 drained by the s86 catalog-sync run.",
|
|
1577
|
+
archetypePerf: {
|
|
1578
|
+
hunt: 9,
|
|
1579
|
+
// Flash-family parallel-tool tier (L-040); inherited from 3.5-flash
|
|
1580
|
+
classify: 7,
|
|
1581
|
+
summarize: 7,
|
|
1582
|
+
transform: 7,
|
|
1583
|
+
ask: 8,
|
|
1584
|
+
generate: 8,
|
|
1585
|
+
plan: 7,
|
|
1586
|
+
extract: 7,
|
|
1587
|
+
critique: 5
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1479
1590
|
{
|
|
1480
1591
|
// Auto-onboarded 2026-07-01 from `claude-sonnet-4-6`; VERIFIED 2026-07-02
|
|
1481
1592
|
// against the claude-api reference (cc-portfolio ratification pass). The
|
|
1482
|
-
// clone got context right (1M)
|
|
1483
|
-
//
|
|
1484
|
-
//
|
|
1485
|
-
//
|
|
1593
|
+
// clone got context right (1M). PRICING RE-BASED 2026-08-14 (s86): the
|
|
1594
|
+
// introductory $2/$10 was made PERMANENT — Anthropic's pricing page now
|
|
1595
|
+
// states the scheduled Sept-1 increase to $3/$15 "will not occur", so
|
|
1596
|
+
// $2/$10 IS the sticker. (The $3/$15 encoded 07-02 was correct under the
|
|
1597
|
+
// time-bounded-pricing convention at the time; the bound was cancelled.) The clone got max output WRONG:
|
|
1486
1598
|
// Sonnet 5 is 128k, not 4-6's 64k — corrected. New tokenizer (~30% more
|
|
1487
1599
|
// tokens for the same text vs 4-6): byte-budget consumers should re-baseline.
|
|
1488
1600
|
// API quirks (claude-api ref): (a) NON-DEFAULT temperature/top_p/top_k
|
|
@@ -1495,7 +1607,7 @@ var PROFILES_RAW = [
|
|
|
1495
1607
|
// 'preview' per the Fable precedent — no brain evidence yet; promotion to
|
|
1496
1608
|
// 'current' is an explicit call. (L-049/L-081.)
|
|
1497
1609
|
id: "claude-sonnet-5",
|
|
1498
|
-
verifiedAgainstDocs: "2026-
|
|
1610
|
+
verifiedAgainstDocs: "2026-08-14",
|
|
1499
1611
|
provider: "anthropic",
|
|
1500
1612
|
status: "current",
|
|
1501
1613
|
// s76 2026-07-25: GA per docs; was preview.
|
|
@@ -1507,8 +1619,9 @@ var PROFILES_RAW = [
|
|
|
1507
1619
|
systemPromptMode: "inline",
|
|
1508
1620
|
streaming: true,
|
|
1509
1621
|
cliffs: [],
|
|
1510
|
-
costInputPer1m:
|
|
1511
|
-
|
|
1622
|
+
costInputPer1m: 2,
|
|
1623
|
+
// 2026-08-14: intro price made PERMANENT (docs: "the previously scheduled increase to $3/$15 on September 1, 2026 will not occur")
|
|
1624
|
+
costOutputPer1m: 10,
|
|
1512
1625
|
lowering: ANTHROPIC_LOWERING_BASE,
|
|
1513
1626
|
recovery: [
|
|
1514
1627
|
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate" },
|
|
@@ -1699,6 +1812,55 @@ function _setProfileBrainHook(hook) {
|
|
|
1699
1812
|
function canonicalId(id) {
|
|
1700
1813
|
return brainHook.resolveAlias?.(id) ?? ALIASES[id] ?? id;
|
|
1701
1814
|
}
|
|
1815
|
+
var CONSUMER_INDEX = /* @__PURE__ */ new Map();
|
|
1816
|
+
function registerProfiles(profiles) {
|
|
1817
|
+
for (const p of profiles) CONSUMER_INDEX.set(p.id, p);
|
|
1818
|
+
}
|
|
1819
|
+
function _testClearConsumerProfiles() {
|
|
1820
|
+
CONSUMER_INDEX.clear();
|
|
1821
|
+
}
|
|
1822
|
+
function inferProviderFromId(id) {
|
|
1823
|
+
const lower = id.toLowerCase();
|
|
1824
|
+
if (lower.startsWith("claude")) return "anthropic";
|
|
1825
|
+
if (lower.startsWith("gemini") || lower.startsWith("palm")) return "google";
|
|
1826
|
+
if (lower.startsWith("gpt") || /^o[0-9]/.test(lower) || lower.startsWith("chatgpt")) return "openai";
|
|
1827
|
+
if (lower.startsWith("deepseek")) return "deepseek";
|
|
1828
|
+
if (lower.startsWith("glm")) return "zai";
|
|
1829
|
+
if (lower.startsWith("kimi") || lower.startsWith("moonshot")) return "moonshot";
|
|
1830
|
+
return void 0;
|
|
1831
|
+
}
|
|
1832
|
+
function bestEffortProfile(id) {
|
|
1833
|
+
const canonical = canonicalId(id);
|
|
1834
|
+
const existing = tryGetProfile(canonical);
|
|
1835
|
+
if (existing) return existing;
|
|
1836
|
+
const provider = inferProviderFromId(canonical);
|
|
1837
|
+
if (!provider) return void 0;
|
|
1838
|
+
const donor = PROFILES_RAW.find((p) => p.provider === provider && p.status === "current") ?? PROFILES_RAW.find((p) => p.provider === provider);
|
|
1839
|
+
if (!donor) return void 0;
|
|
1840
|
+
const synth = {
|
|
1841
|
+
id: canonical,
|
|
1842
|
+
provider,
|
|
1843
|
+
bestEffort: true,
|
|
1844
|
+
status: "preview",
|
|
1845
|
+
maxContextTokens: 128e3,
|
|
1846
|
+
maxOutputTokens: 4096,
|
|
1847
|
+
maxTools: donor.maxTools,
|
|
1848
|
+
parallelToolCalls: false,
|
|
1849
|
+
structuredOutput: "none",
|
|
1850
|
+
systemPromptMode: donor.systemPromptMode,
|
|
1851
|
+
streaming: donor.streaming,
|
|
1852
|
+
cliffs: [],
|
|
1853
|
+
costInputPer1m: 0,
|
|
1854
|
+
costOutputPer1m: 0,
|
|
1855
|
+
lowering: donor.lowering,
|
|
1856
|
+
recovery: [],
|
|
1857
|
+
strengths: [],
|
|
1858
|
+
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data"],
|
|
1859
|
+
notes: `Synthesized by onUnprofiledModel:'best-effort' (provider ${provider} inferred from id; wire mechanics borrowed from ${donor.id}). No cliffs, no measured knowledge, cost UNKNOWN (recorded as 0). Replace via registerProfiles() for real guards.`
|
|
1860
|
+
};
|
|
1861
|
+
CONSUMER_INDEX.set(canonical, synth);
|
|
1862
|
+
return synth;
|
|
1863
|
+
}
|
|
1702
1864
|
function resolveModelAlias(id) {
|
|
1703
1865
|
return canonicalId(id);
|
|
1704
1866
|
}
|
|
@@ -1707,18 +1869,22 @@ var PROFILE_INDEX = new Map(
|
|
|
1707
1869
|
);
|
|
1708
1870
|
function getProfile(id) {
|
|
1709
1871
|
const canonical = canonicalId(id);
|
|
1872
|
+
const fromConsumer = CONSUMER_INDEX.get(canonical);
|
|
1873
|
+
if (fromConsumer) return fromConsumer;
|
|
1710
1874
|
const fromBrain = brainHook.getProfile?.(canonical);
|
|
1711
1875
|
if (fromBrain) return fromBrain;
|
|
1712
1876
|
const p = PROFILE_INDEX.get(canonical);
|
|
1713
1877
|
if (!p) {
|
|
1714
1878
|
const known = [...PROFILE_INDEX.keys(), ...Object.keys(ALIASES)].join(", ");
|
|
1715
|
-
throw new Error(
|
|
1879
|
+
throw new Error(
|
|
1880
|
+
`Unknown model id: "${id}". Known: ${known}. For a model kgauto has not onboarded: registerProfiles([...]) supplies a full profile, or policy.onUnprofiledModel:'best-effort' compiles with guards skipped (alpha.87).`
|
|
1881
|
+
);
|
|
1716
1882
|
}
|
|
1717
1883
|
return p;
|
|
1718
1884
|
}
|
|
1719
1885
|
function tryGetProfile(id) {
|
|
1720
1886
|
const canonical = canonicalId(id);
|
|
1721
|
-
return brainHook.getProfile?.(canonical) ?? PROFILE_INDEX.get(canonical);
|
|
1887
|
+
return CONSUMER_INDEX.get(canonical) ?? brainHook.getProfile?.(canonical) ?? PROFILE_INDEX.get(canonical);
|
|
1722
1888
|
}
|
|
1723
1889
|
function allProfiles() {
|
|
1724
1890
|
return PROFILES_RAW;
|
|
@@ -1734,11 +1900,15 @@ function profilesByProvider(provider) {
|
|
|
1734
1900
|
ALIASES,
|
|
1735
1901
|
LATENCY_TIER_MS,
|
|
1736
1902
|
_setProfileBrainHook,
|
|
1903
|
+
_testClearConsumerProfiles,
|
|
1737
1904
|
allProfiles,
|
|
1738
1905
|
allProfilesRaw,
|
|
1906
|
+
bestEffortProfile,
|
|
1739
1907
|
getProfile,
|
|
1908
|
+
inferProviderFromId,
|
|
1740
1909
|
latencyTierOf,
|
|
1741
1910
|
profilesByProvider,
|
|
1911
|
+
registerProfiles,
|
|
1742
1912
|
resolveModelAlias,
|
|
1743
1913
|
tryGetProfile
|
|
1744
1914
|
});
|
package/dist/profiles.mjs
CHANGED
|
@@ -2,23 +2,31 @@ import {
|
|
|
2
2
|
ALIASES,
|
|
3
3
|
LATENCY_TIER_MS,
|
|
4
4
|
_setProfileBrainHook,
|
|
5
|
+
_testClearConsumerProfiles,
|
|
5
6
|
allProfiles,
|
|
6
7
|
allProfilesRaw,
|
|
8
|
+
bestEffortProfile,
|
|
7
9
|
getProfile,
|
|
10
|
+
inferProviderFromId,
|
|
8
11
|
latencyTierOf,
|
|
9
12
|
profilesByProvider,
|
|
13
|
+
registerProfiles,
|
|
10
14
|
resolveModelAlias,
|
|
11
15
|
tryGetProfile
|
|
12
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YVKTTTTB.mjs";
|
|
13
17
|
export {
|
|
14
18
|
ALIASES,
|
|
15
19
|
LATENCY_TIER_MS,
|
|
16
20
|
_setProfileBrainHook,
|
|
21
|
+
_testClearConsumerProfiles,
|
|
17
22
|
allProfiles,
|
|
18
23
|
allProfilesRaw,
|
|
24
|
+
bestEffortProfile,
|
|
19
25
|
getProfile,
|
|
26
|
+
inferProviderFromId,
|
|
20
27
|
latencyTierOf,
|
|
21
28
|
profilesByProvider,
|
|
29
|
+
registerProfiles,
|
|
22
30
|
resolveModelAlias,
|
|
23
31
|
tryGetProfile
|
|
24
32
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, n as CallAttempt } from './ir-P3NEU8z4.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, n as CallAttempt } from './ir-ZgN2KkuF.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmdrift/kgauto-compiler",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.87",
|
|
4
4
|
"description": "Prompt compiler with executable provider knowledge for multi-model AI apps: normalized multi-provider transport with fallback chains, compile-time cliff guards, a curated model registry, and a telemetry flight recorder. Swap models without rewriting prompts.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -77,6 +77,12 @@
|
|
|
77
77
|
"model-fallback"
|
|
78
78
|
],
|
|
79
79
|
"license": "MIT",
|
|
80
|
+
"repository": {
|
|
81
|
+
"type": "git",
|
|
82
|
+
"url": "git+https://github.com/stue/kgauto.git",
|
|
83
|
+
"directory": "v2"
|
|
84
|
+
},
|
|
85
|
+
"homepage": "https://github.com/stue/kgauto/tree/main/v2#readme",
|
|
80
86
|
"peerDependencies": {
|
|
81
87
|
"js-tiktoken": ">=1.0.0",
|
|
82
88
|
"react": ">=18.0.0",
|
|
@@ -103,4 +109,4 @@
|
|
|
103
109
|
"typescript": "^5.7.0",
|
|
104
110
|
"vitest": "^3.1.0"
|
|
105
111
|
}
|
|
106
|
-
}
|
|
112
|
+
}
|