@warmdrift/kgauto-compiler 2.0.0-alpha.13 → 2.0.0-alpha.15

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.
@@ -614,6 +614,211 @@ var PROFILES_RAW = [
614
614
  hunt: 4
615
615
  // sequential tools — same as V4-Flash
616
616
  }
617
+ },
618
+ // ── Auto-onboarded (UNVERIFIED) ──
619
+ // Cloned by scripts/auto-onboard-models.mjs from a same-family template.
620
+ // Each entry's pricing/context/cliffs/lowering reflects the template, NOT
621
+ // provider docs. Verify before promoting status to 'current' (L-049/L-081).
622
+ {
623
+ id: "gemini-3-flash-preview",
624
+ verifiedAgainstDocs: "UNVERIFIED-AUTO-ONBOARD",
625
+ provider: "google",
626
+ status: "preview",
627
+ maxContextTokens: 1048576,
628
+ maxOutputTokens: 65535,
629
+ maxTools: 128,
630
+ parallelToolCalls: true,
631
+ structuredOutput: "native",
632
+ systemPromptMode: "separate",
633
+ streaming: true,
634
+ cliffs: [
635
+ {
636
+ metric: "input_tokens",
637
+ threshold: 8e3,
638
+ action: "downgrade_quality_warning",
639
+ reason: "Quality degrades significantly above ~8K context tokens"
640
+ },
641
+ {
642
+ metric: "tool_count",
643
+ threshold: 20,
644
+ action: "drop_to_top_relevant",
645
+ reason: "Tool reliability drops above ~20 tools (despite 128 hard limit)"
646
+ },
647
+ {
648
+ metric: "thinking_with_short_output",
649
+ threshold: 1,
650
+ action: "force_thinking_budget_zero",
651
+ reason: "Thinking tokens consume maxOutputTokens \u2014 empty response if drained"
652
+ },
653
+ {
654
+ // s11 trust artifact (2026-05-02): brain showed 5/5 empty rate on
655
+ // tt-intelligence/summarize/gemini-2.5-flash with tools offered.
656
+ // v1's disable_thinking_for_short_output already fired and didn't
657
+ // help — disabling thinking is necessary but not sufficient. Tools
658
+ // present + summarize intent confuses Flash into a no-output state
659
+ // (likely tool-decision purgatory). Strip tools entirely for this
660
+ // archetype on this model.
661
+ metric: "tool_count",
662
+ threshold: 1,
663
+ whenIntent: "summarize",
664
+ action: "strip_tools",
665
+ reason: "Gemini Flash returns empty when summarize intent has tools offered (5/5 empty rate observed in v1 prod 2026-04-19, replayed into v2 brain 2026-04-29)"
666
+ }
667
+ ],
668
+ costInputPer1m: 0.3,
669
+ costOutputPer1m: 2.5,
670
+ lowering: {
671
+ ...GOOGLE_LOWERING_BASE,
672
+ thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
673
+ },
674
+ recovery: [
675
+ {
676
+ signal: "empty_response_after_tool",
677
+ action: "retry_with_params",
678
+ retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
679
+ maxRetries: 1,
680
+ reason: "Known: empty after tool result \u2014 retry with thinking off"
681
+ },
682
+ {
683
+ signal: "empty_response",
684
+ action: "retry_with_params",
685
+ retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
686
+ maxRetries: 1,
687
+ reason: "Empty response \u2014 try with thinking off"
688
+ },
689
+ {
690
+ signal: "malformed_function_call",
691
+ action: "escalate",
692
+ reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target"
693
+ }
694
+ ],
695
+ strengths: ["speed", "volume", "classification", "1m_context", "cost"],
696
+ weaknesses: ["complex_schemas", "large_tool_sets", "high_context_quality"],
697
+ notes: "AUTO-ONBOARDED 2026-05-16 from `gemini-2.5-flash`. Pricing, context, cliffs are template-cloned and UNVERIFIED \u2014 confirm against provider docs before promoting status to 'current'.",
698
+ // Master plan §6.2 anchor. Tier 0 for hunt (parallel tool throughput
699
+ // 15-75 calls/step beats Sonnet — L-040), summarize, classify.
700
+ archetypePerf: {
701
+ hunt: 9,
702
+ // L-040: parallel tool throughput 15-75/step
703
+ classify: 7,
704
+ // brain-validated, 218 rows
705
+ summarize: 7,
706
+ // brain-validated; cliff strips tools when present
707
+ transform: 7,
708
+ ask: 7,
709
+ generate: 6,
710
+ plan: 5,
711
+ extract: 6,
712
+ // alpha.8 MAX_TOKENS history on structured output
713
+ critique: 4
714
+ // reasoning shallower than Sonnet/Opus
715
+ }
716
+ },
717
+ {
718
+ // ── Gemini 2.5 Flash-Lite ──
719
+ // Onboarded 2026-05-13 (s22) after the model-release watcher surfaced
720
+ // it as a UNREGISTERED + NEW candidate. Released by Google July 2025,
721
+ // stable. Positioned BELOW Flash on the cost/perf frontier:
722
+ // input $0.10/M (Flash $0.30/M) — 3× cheaper
723
+ // output $0.40/M (Flash $2.50/M) — 6× cheaper
724
+ // cache $0.01/M — 1/10 of input (vs Flash 0.25 discount)
725
+ // Cliffs are HYPOTHESIZED from Flash's known failure modes — Flash-Lite
726
+ // is a smaller sibling, so we inherit Flash's cliffs at equal-or-tighter
727
+ // thresholds. The brain will validate/relax these as evidence accumulates
728
+ // per (archetype, model) tuple. Currently ZERO brain rows for this model.
729
+ id: "gemini-3.1-flash-lite",
730
+ verifiedAgainstDocs: "UNVERIFIED-AUTO-ONBOARD",
731
+ provider: "google",
732
+ status: "preview",
733
+ maxContextTokens: 1048576,
734
+ maxOutputTokens: 65536,
735
+ maxTools: 128,
736
+ parallelToolCalls: true,
737
+ structuredOutput: "native",
738
+ systemPromptMode: "separate",
739
+ streaming: true,
740
+ cliffs: [
741
+ {
742
+ metric: "input_tokens",
743
+ threshold: 8e3,
744
+ action: "downgrade_quality_warning",
745
+ reason: "Inherited from Flash: quality degrades above ~8K. Smaller model \u2014 likely degrades faster. Re-tune from brain after n\u226520."
746
+ },
747
+ {
748
+ metric: "tool_count",
749
+ threshold: 10,
750
+ action: "drop_to_top_relevant",
751
+ reason: "Conservative: Flash drops at 20, Flash-Lite is smaller \u2014 assume tighter ceiling until brain proves otherwise."
752
+ },
753
+ {
754
+ metric: "thinking_with_short_output",
755
+ threshold: 1,
756
+ action: "force_thinking_budget_zero",
757
+ reason: "Thinking enabled per Google API (thinking: true). Same drain risk as Flash \u2014 thinking tokens consume maxOutputTokens."
758
+ },
759
+ {
760
+ // Strong prior: Flash hit 5/5 empty rate on summarize+tools (s11
761
+ // trust artifact, kgauto commit 3872832). Flash-Lite shares the
762
+ // same architectural family — almost certainly inherits this cliff.
763
+ // Ship the guard preemptively; brain telemetry confirms or relaxes.
764
+ metric: "tool_count",
765
+ threshold: 1,
766
+ whenIntent: "summarize",
767
+ action: "strip_tools",
768
+ reason: "Inherited from Flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on Flash-Lite specifically."
769
+ }
770
+ ],
771
+ costInputPer1m: 0.1,
772
+ costOutputPer1m: 0.4,
773
+ lowering: {
774
+ ...GOOGLE_LOWERING_BASE,
775
+ // Cache discount 10× (vs Flash 4×) — Google's spec is $0.01/M cache vs
776
+ // $0.10/M input. Material for repeat-prompt workloads (classify shape).
777
+ cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
778
+ thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
779
+ },
780
+ recovery: [
781
+ {
782
+ signal: "empty_response_after_tool",
783
+ action: "retry_with_params",
784
+ retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
785
+ maxRetries: 1,
786
+ reason: "Known on Flash family: empty after tool result \u2014 retry with thinking off."
787
+ },
788
+ {
789
+ signal: "empty_response",
790
+ action: "retry_with_params",
791
+ retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
792
+ maxRetries: 1,
793
+ reason: "Empty response \u2014 try with thinking off."
794
+ },
795
+ {
796
+ signal: "malformed_function_call",
797
+ action: "escalate",
798
+ reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target."
799
+ }
800
+ ],
801
+ strengths: ["lowest_cost", "speed", "volume", "classification", "summarize", "1m_context", "cache_friendly"],
802
+ weaknesses: ["complex_reasoning", "large_tool_sets", "complex_schemas", "structured_output_unproven", "long_context_quality"],
803
+ notes: "AUTO-ONBOARDED 2026-05-16 from `gemini-2.5-flash-lite`. Pricing, context, cliffs are template-cloned and UNVERIFIED \u2014 confirm against provider docs before promoting status to 'current'.",
804
+ // Tier 3 emergency floor for summarize/classify chains. ZERO brain
805
+ // rows — all values are starter hypotheses anchored to "smaller
806
+ // sibling of Flash, at-or-below Flash perf on every archetype." The
807
+ // first 50 brain rows per archetype will validate or relax these.
808
+ archetypePerf: {
809
+ classify: 6,
810
+ // starter hypothesis — verify (Flash is 7, lite likely ≤)
811
+ summarize: 6,
812
+ // starter hypothesis — verify; cliff strips tools
813
+ transform: 6,
814
+ // starter hypothesis — verify
815
+ ask: 5,
816
+ hunt: 5,
817
+ generate: 4,
818
+ extract: 4,
819
+ plan: 3,
820
+ critique: 3
821
+ }
617
822
  }
618
823
  ];
619
824
  var ALIASES = {
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as ModelProfile, C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, R as RecordInput, O as OracleScore, e as CompileResult, B as BestPracticeAdvisory, f as Provider } from './profiles-B5MCp_0L.mjs';
2
- export { g as ALIASES, h as CacheStrategy, i as CallAttempt, j as CallError, k as CliffRule, l as Constraints, F as FallbackReason, H as HistoryCachePolicy, I as IntentDeclaration, L as LoweringSpec, m as Message, n as MutationApplied, o as NormalizedTokens, p as PromptSection, q as RecoveryRule, S as StructuredOutputCapability, r as SystemPromptMode, T as ToolCall, s as ToolDefinition, t as allProfiles, u as getProfile, v as profilesByProvider, w as tryGetProfile } from './profiles-B5MCp_0L.mjs';
1
+ import { M as ModelProfile, C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, R as RecordInput, O as OracleScore, e as CompileResult, B as BestPracticeAdvisory, f as Provider } from './profiles-DTnIzGsA.mjs';
2
+ export { g as ALIASES, h as CacheStrategy, i as CallAttempt, j as CallError, k as CliffRule, l as Constraints, F as FallbackReason, H as HistoryCachePolicy, I as IntentDeclaration, L as LoweringSpec, m as Message, n as MutationApplied, o as NormalizedTokens, p as PromptSection, q as RecoveryRule, S as StructuredOutputCapability, r as SystemPromptMode, T as ToolCall, s as ToolDefinition, t as allProfiles, u as getProfile, v as profilesByProvider, w as tryGetProfile } from './profiles-DTnIzGsA.mjs';
3
3
  import { IntentArchetypeName } from './dialect.mjs';
4
4
  export { ALL_ARCHETYPES, ContextBucket, DIALECT_VERSION, HistoryDepth, INTENT_ARCHETYPES, OutputMode, ShapeSignature, ToolCountBucket, bucketContext, bucketHistory, bucketToolCount, hashShape, isArchetype, learningKey } from './dialect.mjs';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as ModelProfile, C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, R as RecordInput, O as OracleScore, e as CompileResult, B as BestPracticeAdvisory, f as Provider } from './profiles-B_sMA2eU.js';
2
- export { g as ALIASES, h as CacheStrategy, i as CallAttempt, j as CallError, k as CliffRule, l as Constraints, F as FallbackReason, H as HistoryCachePolicy, I as IntentDeclaration, L as LoweringSpec, m as Message, n as MutationApplied, o as NormalizedTokens, p as PromptSection, q as RecoveryRule, S as StructuredOutputCapability, r as SystemPromptMode, T as ToolCall, s as ToolDefinition, t as allProfiles, u as getProfile, v as profilesByProvider, w as tryGetProfile } from './profiles-B_sMA2eU.js';
1
+ import { M as ModelProfile, C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, R as RecordInput, O as OracleScore, e as CompileResult, B as BestPracticeAdvisory, f as Provider } from './profiles-D0y6aLk0.js';
2
+ export { g as ALIASES, h as CacheStrategy, i as CallAttempt, j as CallError, k as CliffRule, l as Constraints, F as FallbackReason, H as HistoryCachePolicy, I as IntentDeclaration, L as LoweringSpec, m as Message, n as MutationApplied, o as NormalizedTokens, p as PromptSection, q as RecoveryRule, S as StructuredOutputCapability, r as SystemPromptMode, T as ToolCall, s as ToolDefinition, t as allProfiles, u as getProfile, v as profilesByProvider, w as tryGetProfile } from './profiles-D0y6aLk0.js';
3
3
  import { IntentArchetypeName } from './dialect.js';
4
4
  export { ALL_ARCHETYPES, ContextBucket, DIALECT_VERSION, HistoryDepth, INTENT_ARCHETYPES, OutputMode, ShapeSignature, ToolCountBucket, bucketContext, bucketHistory, bucketToolCount, hashShape, isArchetype, learningKey } from './dialect.js';
5
5