@warmdrift/kgauto-compiler 2.0.0-alpha.86 → 2.0.0-alpha.88
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-QDWOMQYN.mjs → chunk-DSHWJFM2.mjs} +5 -1
- package/dist/{chunk-V4T2CBRI.mjs → chunk-GCOVYPJA.mjs} +1 -1
- package/dist/{chunk-2MQIVVEU.mjs → chunk-UNTUOZAG.mjs} +180 -24
- 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 +123 -23
- 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 +23 -5
- package/dist/index.d.ts +23 -5
- package/dist/index.js +290 -30
- package/dist/index.mjs +112 -8
- package/dist/{ir-5TJLAYKR.d.mts → ir-P3NEU8z4.d.mts} +84 -1
- package/dist/{ir-C1zmvAh6.d.ts → ir-ZgN2KkuF.d.ts} +84 -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 +184 -24
- package/dist/profiles.mjs +9 -1
- package/dist/{types-BiV-qN_x.d.mts → types-7sF3adLO.d.mts} +1 -1
- package/dist/{types-C2H37XLR.d.ts → types-B_MjEB0h.d.ts} +1 -1
- package/dist/{types-8Goj1cKf.d.ts → types-BgfuVIVI.d.ts} +1 -1
- package/dist/{types-BcYPDXgJ.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-24",
|
|
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-24",
|
|
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-24",
|
|
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-24",
|
|
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-24",
|
|
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-24",
|
|
553
557
|
provider: "google",
|
|
554
558
|
status: "current",
|
|
555
559
|
maxContextTokens: 1048576,
|
|
@@ -706,7 +710,7 @@ var PROFILES_RAW = [
|
|
|
706
710
|
},
|
|
707
711
|
{
|
|
708
712
|
id: "gemini-3.1-pro-preview",
|
|
709
|
-
verifiedAgainstDocs: "2026-
|
|
713
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
710
714
|
provider: "google",
|
|
711
715
|
status: "preview",
|
|
712
716
|
maxContextTokens: 1048576,
|
|
@@ -766,7 +770,7 @@ var PROFILES_RAW = [
|
|
|
766
770
|
// deepseek-reasoner registered as aliases (see ALIASES below).
|
|
767
771
|
{
|
|
768
772
|
id: "deepseek-v4-flash",
|
|
769
|
-
verifiedAgainstDocs: "2026-
|
|
773
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
770
774
|
provider: "deepseek",
|
|
771
775
|
status: "current",
|
|
772
776
|
maxContextTokens: 1e6,
|
|
@@ -784,8 +788,8 @@ var PROFILES_RAW = [
|
|
|
784
788
|
reason: "Sequential tool calls only \u2014 L-040"
|
|
785
789
|
}
|
|
786
790
|
],
|
|
787
|
-
costInputPer1m: 0.
|
|
788
|
-
costOutputPer1m:
|
|
791
|
+
costInputPer1m: 0.44,
|
|
792
|
+
costOutputPer1m: 1.32,
|
|
789
793
|
lowering: {
|
|
790
794
|
system: { mode: "inline" },
|
|
791
795
|
cache: { strategy: "unsupported" },
|
|
@@ -804,7 +808,7 @@ var PROFILES_RAW = [
|
|
|
804
808
|
// baseQuality (it carries 'reasoning') with no latency counterweight,
|
|
805
809
|
// leapfrogged gemini-2.5-flash as PB's summarize leader once reachable.
|
|
806
810
|
latencyTier: "slow",
|
|
807
|
-
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. PEAK/OFF-PEAK since 2026-08-16 (page fetched 2026-08-24): peak = weekdays 01:00-04:00 + 06:00-10:00 UTC, off-peak = all other hours at HALF peak. Encoded prices ARE the peak rate (conservative: never understate cost); off-peak traffic costs half what the estimate says. alpha.87 shipped the DEAD pre-transition prices ($0.14/$0.28 flash, $0.435/$0.87 pro) with a fresh verification stamp \u2014 corrected here (alpha.88). A single price field cannot represent a two-rate schedule; catalog-sync extractions oscillate between the rates day-to-day (peak read 08-21, off-peak read 08-22) \u2014 time-of-day pricing remains unmodeled, roadmap.",
|
|
808
812
|
// Master plan §6.2 anchor. Brain-validated tier 1 cross-provider for
|
|
809
813
|
// classify (169 rows, 0% empty). Tier 0 for summarize-with-no-tools.
|
|
810
814
|
// Falls off on hunt (sequential tools — L-040) and reasoning depth.
|
|
@@ -839,7 +843,7 @@ var PROFILES_RAW = [
|
|
|
839
843
|
},
|
|
840
844
|
{
|
|
841
845
|
id: "deepseek-v4-pro",
|
|
842
|
-
verifiedAgainstDocs: "2026-
|
|
846
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
843
847
|
provider: "deepseek",
|
|
844
848
|
status: "current",
|
|
845
849
|
maxContextTokens: 1e6,
|
|
@@ -863,8 +867,8 @@ var PROFILES_RAW = [
|
|
|
863
867
|
// cache-hit in; no promo caveat). The old $1.74/$3.48 "regular post-promo"
|
|
864
868
|
// was a projected revert that never happened (L-073/L-081) — it 4×-overstated
|
|
865
869
|
// cost and suppressed V4-Pro in cost-aware ranking.
|
|
866
|
-
costInputPer1m:
|
|
867
|
-
costOutputPer1m:
|
|
870
|
+
costInputPer1m: 1.32,
|
|
871
|
+
costOutputPer1m: 3.96,
|
|
868
872
|
lowering: {
|
|
869
873
|
system: { mode: "inline" },
|
|
870
874
|
cache: { strategy: "unsupported" },
|
|
@@ -880,7 +884,7 @@ var PROFILES_RAW = [
|
|
|
880
884
|
// of the served set. Tag derivation would say 'medium'; the measurement says
|
|
881
885
|
// otherwise.
|
|
882
886
|
latencyTier: "slow",
|
|
883
|
-
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. PEAK/OFF-PEAK since 2026-08-16 (page fetched 2026-08-24): peak = weekdays 01:00-04:00 + 06:00-10:00 UTC, off-peak = all other hours at HALF peak. Encoded prices ARE the peak rate (conservative: never understate cost); off-peak traffic costs half what the estimate says. alpha.87 shipped the DEAD pre-transition prices ($0.14/$0.28 flash, $0.435/$0.87 pro) with a fresh verification stamp \u2014 corrected here (alpha.88). A single price field cannot represent a two-rate schedule; catalog-sync extractions oscillate between the rates day-to-day (peak read 08-21, off-peak read 08-22) \u2014 time-of-day pricing remains unmodeled, roadmap.",
|
|
884
888
|
// Master plan §3.3: tier 3 cross-provider for plan chain. Reasoning
|
|
885
889
|
// bumped one notch over V4-Flash; same parallel-tool ceiling.
|
|
886
890
|
archetypePerf: {
|
|
@@ -1488,13 +1492,111 @@ var PROFILES_RAW = [
|
|
|
1488
1492
|
// +1 vs 2.5-flash — but still below Sonnet/Opus reasoning floor
|
|
1489
1493
|
}
|
|
1490
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-24",
|
|
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: 0.75,
|
|
1547
|
+
// promo through 2026-12-31; $1.50 from 2027-01-01 (TIME_BOUNDED_PRICING_ROWS carries the transition)
|
|
1548
|
+
costOutputPer1m: 3.75,
|
|
1549
|
+
// promo through 2026-12-31; $7.50 from 2027-01-01
|
|
1550
|
+
lowering: {
|
|
1551
|
+
...GOOGLE_LOWERING_BASE,
|
|
1552
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
1553
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
1554
|
+
},
|
|
1555
|
+
recovery: [
|
|
1556
|
+
{
|
|
1557
|
+
signal: "empty_response_after_tool",
|
|
1558
|
+
action: "retry_with_params",
|
|
1559
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1560
|
+
maxRetries: 1,
|
|
1561
|
+
reason: "Inherited Flash-family pattern: empty after tool result \u2014 retry with thinking off"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
signal: "empty_response",
|
|
1565
|
+
action: "retry_with_params",
|
|
1566
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1567
|
+
maxRetries: 1,
|
|
1568
|
+
reason: "Empty response \u2014 try with thinking off"
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
signal: "malformed_function_call",
|
|
1572
|
+
action: "escalate",
|
|
1573
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target"
|
|
1574
|
+
}
|
|
1575
|
+
],
|
|
1576
|
+
strengths: ["agentic_loops", "coding", "1m_context", "parallel_tools", "thinking_mode"],
|
|
1577
|
+
weaknesses: ["no_brain_evidence_yet"],
|
|
1578
|
+
notes: "Hand-onboarded s86 (2026-08-24; the session ran under a 10-day-slow machine clock, hence 08-14 stamps in kin artifacts), step-zero verified: 1,048,576 ctx / 65,536 out (Google model page). PRICING (page 2026-08-24): $0.75/$3.75 promo through 2026-12-31, $1.50/$7.50 from 2027-01-01 \u2014 the alpha.87 profile carried the post-promo rate as if current; corrected alpha.88. 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 (2026-07-24); ~31 days in the onboarding queue.",
|
|
1579
|
+
archetypePerf: {
|
|
1580
|
+
hunt: 9,
|
|
1581
|
+
// Flash-family parallel-tool tier (L-040); inherited from 3.5-flash
|
|
1582
|
+
classify: 7,
|
|
1583
|
+
summarize: 7,
|
|
1584
|
+
transform: 7,
|
|
1585
|
+
ask: 8,
|
|
1586
|
+
generate: 8,
|
|
1587
|
+
plan: 7,
|
|
1588
|
+
extract: 7,
|
|
1589
|
+
critique: 5
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1491
1592
|
{
|
|
1492
1593
|
// Auto-onboarded 2026-07-01 from `claude-sonnet-4-6`; VERIFIED 2026-07-02
|
|
1493
1594
|
// against the claude-api reference (cc-portfolio ratification pass). The
|
|
1494
|
-
// clone got context right (1M)
|
|
1495
|
-
//
|
|
1496
|
-
//
|
|
1497
|
-
//
|
|
1595
|
+
// clone got context right (1M). PRICING RE-BASED 2026-08-14 (s86): the
|
|
1596
|
+
// introductory $2/$10 was made PERMANENT — Anthropic's pricing page now
|
|
1597
|
+
// states the scheduled Sept-1 increase to $3/$15 "will not occur", so
|
|
1598
|
+
// $2/$10 IS the sticker. (The $3/$15 encoded 07-02 was correct under the
|
|
1599
|
+
// time-bounded-pricing convention at the time; the bound was cancelled.) The clone got max output WRONG:
|
|
1498
1600
|
// Sonnet 5 is 128k, not 4-6's 64k — corrected. New tokenizer (~30% more
|
|
1499
1601
|
// tokens for the same text vs 4-6): byte-budget consumers should re-baseline.
|
|
1500
1602
|
// API quirks (claude-api ref): (a) NON-DEFAULT temperature/top_p/top_k
|
|
@@ -1507,7 +1609,7 @@ var PROFILES_RAW = [
|
|
|
1507
1609
|
// 'preview' per the Fable precedent — no brain evidence yet; promotion to
|
|
1508
1610
|
// 'current' is an explicit call. (L-049/L-081.)
|
|
1509
1611
|
id: "claude-sonnet-5",
|
|
1510
|
-
verifiedAgainstDocs: "2026-
|
|
1612
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
1511
1613
|
provider: "anthropic",
|
|
1512
1614
|
status: "current",
|
|
1513
1615
|
// s76 2026-07-25: GA per docs; was preview.
|
|
@@ -1519,8 +1621,9 @@ var PROFILES_RAW = [
|
|
|
1519
1621
|
systemPromptMode: "inline",
|
|
1520
1622
|
streaming: true,
|
|
1521
1623
|
cliffs: [],
|
|
1522
|
-
costInputPer1m:
|
|
1523
|
-
|
|
1624
|
+
costInputPer1m: 2,
|
|
1625
|
+
// 2026-08-24: intro price made PERMANENT (docs: "the previously scheduled increase to $3/$15 on September 1, 2026 will not occur")
|
|
1626
|
+
costOutputPer1m: 10,
|
|
1524
1627
|
lowering: ANTHROPIC_LOWERING_BASE,
|
|
1525
1628
|
recovery: [
|
|
1526
1629
|
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate" },
|
|
@@ -1711,6 +1814,55 @@ function _setProfileBrainHook(hook) {
|
|
|
1711
1814
|
function canonicalId(id) {
|
|
1712
1815
|
return brainHook.resolveAlias?.(id) ?? ALIASES[id] ?? id;
|
|
1713
1816
|
}
|
|
1817
|
+
var CONSUMER_INDEX = /* @__PURE__ */ new Map();
|
|
1818
|
+
function registerProfiles(profiles) {
|
|
1819
|
+
for (const p of profiles) CONSUMER_INDEX.set(p.id, p);
|
|
1820
|
+
}
|
|
1821
|
+
function _testClearConsumerProfiles() {
|
|
1822
|
+
CONSUMER_INDEX.clear();
|
|
1823
|
+
}
|
|
1824
|
+
function inferProviderFromId(id) {
|
|
1825
|
+
const lower = id.toLowerCase();
|
|
1826
|
+
if (lower.startsWith("claude")) return "anthropic";
|
|
1827
|
+
if (lower.startsWith("gemini") || lower.startsWith("palm")) return "google";
|
|
1828
|
+
if (lower.startsWith("gpt") || /^o[0-9]/.test(lower) || lower.startsWith("chatgpt")) return "openai";
|
|
1829
|
+
if (lower.startsWith("deepseek")) return "deepseek";
|
|
1830
|
+
if (lower.startsWith("glm")) return "zai";
|
|
1831
|
+
if (lower.startsWith("kimi") || lower.startsWith("moonshot")) return "moonshot";
|
|
1832
|
+
return void 0;
|
|
1833
|
+
}
|
|
1834
|
+
function bestEffortProfile(id) {
|
|
1835
|
+
const canonical = canonicalId(id);
|
|
1836
|
+
const existing = tryGetProfile(canonical);
|
|
1837
|
+
if (existing) return existing;
|
|
1838
|
+
const provider = inferProviderFromId(canonical);
|
|
1839
|
+
if (!provider) return void 0;
|
|
1840
|
+
const donor = PROFILES_RAW.find((p) => p.provider === provider && p.status === "current") ?? PROFILES_RAW.find((p) => p.provider === provider);
|
|
1841
|
+
if (!donor) return void 0;
|
|
1842
|
+
const synth = {
|
|
1843
|
+
id: canonical,
|
|
1844
|
+
provider,
|
|
1845
|
+
bestEffort: true,
|
|
1846
|
+
status: "preview",
|
|
1847
|
+
maxContextTokens: 128e3,
|
|
1848
|
+
maxOutputTokens: 4096,
|
|
1849
|
+
maxTools: donor.maxTools,
|
|
1850
|
+
parallelToolCalls: false,
|
|
1851
|
+
structuredOutput: "none",
|
|
1852
|
+
systemPromptMode: donor.systemPromptMode,
|
|
1853
|
+
streaming: donor.streaming,
|
|
1854
|
+
cliffs: [],
|
|
1855
|
+
costInputPer1m: 0,
|
|
1856
|
+
costOutputPer1m: 0,
|
|
1857
|
+
lowering: donor.lowering,
|
|
1858
|
+
recovery: [],
|
|
1859
|
+
strengths: [],
|
|
1860
|
+
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data"],
|
|
1861
|
+
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.`
|
|
1862
|
+
};
|
|
1863
|
+
CONSUMER_INDEX.set(canonical, synth);
|
|
1864
|
+
return synth;
|
|
1865
|
+
}
|
|
1714
1866
|
function resolveModelAlias(id) {
|
|
1715
1867
|
return canonicalId(id);
|
|
1716
1868
|
}
|
|
@@ -1719,18 +1871,22 @@ var PROFILE_INDEX = new Map(
|
|
|
1719
1871
|
);
|
|
1720
1872
|
function getProfile(id) {
|
|
1721
1873
|
const canonical = canonicalId(id);
|
|
1874
|
+
const fromConsumer = CONSUMER_INDEX.get(canonical);
|
|
1875
|
+
if (fromConsumer) return fromConsumer;
|
|
1722
1876
|
const fromBrain = brainHook.getProfile?.(canonical);
|
|
1723
1877
|
if (fromBrain) return fromBrain;
|
|
1724
1878
|
const p = PROFILE_INDEX.get(canonical);
|
|
1725
1879
|
if (!p) {
|
|
1726
1880
|
const known = [...PROFILE_INDEX.keys(), ...Object.keys(ALIASES)].join(", ");
|
|
1727
|
-
throw new Error(
|
|
1881
|
+
throw new Error(
|
|
1882
|
+
`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).`
|
|
1883
|
+
);
|
|
1728
1884
|
}
|
|
1729
1885
|
return p;
|
|
1730
1886
|
}
|
|
1731
1887
|
function tryGetProfile(id) {
|
|
1732
1888
|
const canonical = canonicalId(id);
|
|
1733
|
-
return brainHook.getProfile?.(canonical) ?? PROFILE_INDEX.get(canonical);
|
|
1889
|
+
return CONSUMER_INDEX.get(canonical) ?? brainHook.getProfile?.(canonical) ?? PROFILE_INDEX.get(canonical);
|
|
1734
1890
|
}
|
|
1735
1891
|
function allProfiles() {
|
|
1736
1892
|
return PROFILES_RAW;
|
|
@@ -1746,11 +1902,15 @@ function profilesByProvider(provider) {
|
|
|
1746
1902
|
ALIASES,
|
|
1747
1903
|
LATENCY_TIER_MS,
|
|
1748
1904
|
_setProfileBrainHook,
|
|
1905
|
+
_testClearConsumerProfiles,
|
|
1749
1906
|
allProfiles,
|
|
1750
1907
|
allProfilesRaw,
|
|
1908
|
+
bestEffortProfile,
|
|
1751
1909
|
getProfile,
|
|
1910
|
+
inferProviderFromId,
|
|
1752
1911
|
latencyTierOf,
|
|
1753
1912
|
profilesByProvider,
|
|
1913
|
+
registerProfiles,
|
|
1754
1914
|
resolveModelAlias,
|
|
1755
1915
|
tryGetProfile
|
|
1756
1916
|
});
|
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-UNTUOZAG.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.88",
|
|
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
|
+
}
|