@warmdrift/kgauto-compiler 2.0.0-alpha.26 → 2.0.0-alpha.28
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-7MTHFSNY.mjs → chunk-JQGRWJZO.mjs} +181 -48
- package/dist/chunk-WXCFWUCN.mjs +678 -0
- package/dist/glassbox/index.d.mts +3 -3
- package/dist/glassbox/index.d.ts +3 -3
- package/dist/glassbox-routes/index.d.mts +88 -6
- package/dist/glassbox-routes/index.d.ts +88 -6
- package/dist/glassbox-routes/index.js +1820 -8
- package/dist/glassbox-routes/index.mjs +320 -8
- package/dist/index.d.mts +184 -3
- package/dist/index.d.ts +184 -3
- package/dist/index.js +342 -53
- package/dist/index.mjs +108 -581
- package/dist/{ir-B_XX2LAO.d.ts → ir-5W0efxt9.d.ts} +86 -1
- package/dist/{ir-B9zqlwjH.d.mts → ir-MXCJA8L7.d.mts} +86 -1
- package/dist/profiles.d.mts +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +181 -48
- package/dist/profiles.mjs +1 -1
- package/dist/{types-bt0aVJb8.d.ts → types-CiZ9HLIU.d.ts} +1 -1
- package/dist/{types-o9etg93a.d.mts → types-sDZQzPM6.d.mts} +1 -1
- package/package.json +1 -1
|
@@ -346,7 +346,57 @@ interface BestPracticeAdvisory {
|
|
|
346
346
|
* - `'architecture-change'` — the issue isn't fixable at the kgauto layer
|
|
347
347
|
*/
|
|
348
348
|
recommendationType?: 'model-swap' | 'prompt-fix' | 'caching-fix' | 'no-ai-needed' | 'tier-down' | 'architecture-change';
|
|
349
|
+
/**
|
|
350
|
+
* alpha.28 — when a rule wants to surface a specific structural adaptation
|
|
351
|
+
* (not just a swap or a prompt fix), it attaches the adapter shape here.
|
|
352
|
+
* Shape is the canonical {@link Adapter} discriminated union defined in
|
|
353
|
+
* this module; `compatibility.ts` re-exports it so
|
|
354
|
+
* `getModelCompatibility()` and `BestPracticeAdvisory.suggestedAdaptation`
|
|
355
|
+
* share one source of truth.
|
|
356
|
+
*
|
|
357
|
+
* Today fired by `archetype-perf-floor-breach` (alpha.28) when a
|
|
358
|
+
* documented adapter exists for the chosen model's archetype cliff.
|
|
359
|
+
* Absent on rules without a structural adapter (caching-off-on-claude,
|
|
360
|
+
* tool-bloat, etc.) and on the `reject` branch of
|
|
361
|
+
* `archetype-perf-floor-breach` where no adapter would help.
|
|
362
|
+
*
|
|
363
|
+
* CLOSED discriminated union (R3 from consultation doc) — future adapter
|
|
364
|
+
* parameters extend the union in `compatibility.ts` in named alpha
|
|
365
|
+
* releases. No `| string` escape hatch; consumer code can write
|
|
366
|
+
* exhaustive `switch (suggestedAdaptation.parameter)`.
|
|
367
|
+
*
|
|
368
|
+
* Phase 2 cross-builder coherence: Builder A's
|
|
369
|
+
* `AdvisoryRecord.suggestedAdaptation` (in `glassbox-routes/types.ts`)
|
|
370
|
+
* MUST type to the same union. Phase 2 integration verifies.
|
|
371
|
+
*/
|
|
372
|
+
suggestedAdaptation?: Adapter;
|
|
349
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* alpha.28 — adapter shape attached to advisories and returned by
|
|
376
|
+
* `getModelCompatibility()`. A CLOSED discriminated union: future adapter
|
|
377
|
+
* parameters extend it explicitly in named alpha releases. NO `| string`
|
|
378
|
+
* escape hatch — consumer policy code SHOULD write exhaustive
|
|
379
|
+
* `switch (adapter.parameter)` and rely on the compiler to flag
|
|
380
|
+
* "I added a new adapter parameter and forgot to update consumer policy."
|
|
381
|
+
*
|
|
382
|
+
* Defined here (in `ir.ts`, the foundational types module) and re-exported
|
|
383
|
+
* from `compatibility.ts` for ergonomic consumer imports. Anchoring it
|
|
384
|
+
* here avoids the import cycle that would form if both files tried to be
|
|
385
|
+
* the source of truth (ir.ts → compatibility.ts → profiles.ts → ir.ts).
|
|
386
|
+
*
|
|
387
|
+
* alpha.28 variants:
|
|
388
|
+
* - `{ parameter: 'toolOrchestration'; value: 'sequential'; consequence }`
|
|
389
|
+
* Lifts DeepSeek V4-family on `hunt` from the sequential-tool cliff
|
|
390
|
+
* (L-040). `consequence` is consumer-renderable plain English.
|
|
391
|
+
*
|
|
392
|
+
* Future alpha releases will add e.g. `parallelToolCalls`, `maxTools`,
|
|
393
|
+
* `thinkingBudget` (per tt-intel-Cairn priority list).
|
|
394
|
+
*/
|
|
395
|
+
type Adapter = {
|
|
396
|
+
parameter: 'toolOrchestration';
|
|
397
|
+
value: 'sequential';
|
|
398
|
+
consequence: string;
|
|
399
|
+
};
|
|
350
400
|
interface CompileResult {
|
|
351
401
|
/** Unique handle for this call — pass to record() to correlate the outcome. */
|
|
352
402
|
handle: string;
|
|
@@ -695,6 +745,41 @@ interface RecordInput {
|
|
|
695
745
|
* Empty array / undefined → no second POST fires.
|
|
696
746
|
*/
|
|
697
747
|
advisories?: BestPracticeAdvisory[];
|
|
748
|
+
/**
|
|
749
|
+
* alpha.28 — Glass-Box renderer substrate fields (migration 018).
|
|
750
|
+
*
|
|
751
|
+
* All optional. When omitted, brain stores NULL and the renderer falls
|
|
752
|
+
* back to "—" / hidden rows. Library callers (`call.ts`) populate what
|
|
753
|
+
* they observe; adapter / SDK consumers can populate the rest from their
|
|
754
|
+
* own provider response surface.
|
|
755
|
+
*/
|
|
756
|
+
/**
|
|
757
|
+
* Provider finish reason. Captured from NormalizedResponse.finishReason
|
|
758
|
+
* (Anthropic `stop_reason`, Google `finishReason`, OpenAI `finish_reason`).
|
|
759
|
+
* Lower-case canonicalization is the brain's job; consumers can pass
|
|
760
|
+
* raw provider strings.
|
|
761
|
+
*/
|
|
762
|
+
finishReason?: string;
|
|
763
|
+
/**
|
|
764
|
+
* End-to-end wall-clock latency in ms. Distinct from `latencyMs` only
|
|
765
|
+
* insofar as `latencyMs` was the historical name for the same metric;
|
|
766
|
+
* `totalMs` is the new column on `compile_outcomes` (migration 018).
|
|
767
|
+
* When omitted, brain mirrors `latency_ms`.
|
|
768
|
+
*/
|
|
769
|
+
totalMs?: number;
|
|
770
|
+
/** Tools kept after the tool-relevance pass. */
|
|
771
|
+
toolsCount?: number;
|
|
772
|
+
/** Number of history messages at compile time. */
|
|
773
|
+
historyDepth?: number;
|
|
774
|
+
/** Rendered system prompt size in characters. */
|
|
775
|
+
systemPromptChars?: number;
|
|
776
|
+
/** Model originally targeted when a fallback fired. */
|
|
777
|
+
fellOverFrom?: string;
|
|
778
|
+
/**
|
|
779
|
+
* Why the fallback fired. Closed set mirroring CallResult.fallbackReason —
|
|
780
|
+
* keep in sync with the wire-contract enum (TraceDetail.fallbackReason).
|
|
781
|
+
*/
|
|
782
|
+
fallbackReason?: 'rate_limit' | 'provider_auth_failed' | 'provider_error' | 'cliff' | 'cost_cap' | 'contract_violation';
|
|
698
783
|
}
|
|
699
784
|
/**
|
|
700
785
|
* alpha.20 Entry 4: kinds of consumer-declared outcomes feeding the quality
|
|
@@ -834,4 +919,4 @@ interface PerAxisMetrics {
|
|
|
834
919
|
/** Per-axis metrics keyed by model — used for chain-comparison views. */
|
|
835
920
|
type PerAxisMetricsByModel = Record<string, PerAxisMetrics>;
|
|
836
921
|
|
|
837
|
-
export { type ApiKeys as A, type BestPracticeAdvisory as B, type CompilePolicy as C, type FallbackReason as F, type Grounding as G, type HistoryCachePolicy as H, type IntentDeclaration as I, type Message as M, type NormalizedResponse as N, type OutcomeResult as O, type ProviderOverrides as P, type RecordInput as R, type ToolCall as T, type CompiledRequest as a, type PromptIR as b, type CallOptions as c, type CallResult as d, type RecordOutcomeInput as e, type OracleScore as f, type CompileResult as g, type
|
|
922
|
+
export { type ApiKeys as A, type BestPracticeAdvisory as B, type CompilePolicy as C, type FallbackReason as F, type Grounding as G, type HistoryCachePolicy as H, type IntentDeclaration as I, type Message as M, type NormalizedResponse as N, type OutcomeResult as O, type ProviderOverrides as P, type RecordInput as R, type ToolCall as T, type CompiledRequest as a, type PromptIR as b, type CallOptions as c, type CallResult as d, type RecordOutcomeInput as e, type OracleScore as f, type CompileResult as g, type Adapter as h, type PerAxisMetrics as i, type Provider as j, type ChainEntry as k, type CallAttempt as l, CallError as m, type ChainWithGrounding as n, type Constraints as o, type MutationApplied as p, type NormalizedTokens as q, type OutcomeKind as r, type PerAxisMetricsByModel as s, type PromptSection as t, type ToolDefinition as u };
|
|
@@ -346,7 +346,57 @@ interface BestPracticeAdvisory {
|
|
|
346
346
|
* - `'architecture-change'` — the issue isn't fixable at the kgauto layer
|
|
347
347
|
*/
|
|
348
348
|
recommendationType?: 'model-swap' | 'prompt-fix' | 'caching-fix' | 'no-ai-needed' | 'tier-down' | 'architecture-change';
|
|
349
|
+
/**
|
|
350
|
+
* alpha.28 — when a rule wants to surface a specific structural adaptation
|
|
351
|
+
* (not just a swap or a prompt fix), it attaches the adapter shape here.
|
|
352
|
+
* Shape is the canonical {@link Adapter} discriminated union defined in
|
|
353
|
+
* this module; `compatibility.ts` re-exports it so
|
|
354
|
+
* `getModelCompatibility()` and `BestPracticeAdvisory.suggestedAdaptation`
|
|
355
|
+
* share one source of truth.
|
|
356
|
+
*
|
|
357
|
+
* Today fired by `archetype-perf-floor-breach` (alpha.28) when a
|
|
358
|
+
* documented adapter exists for the chosen model's archetype cliff.
|
|
359
|
+
* Absent on rules without a structural adapter (caching-off-on-claude,
|
|
360
|
+
* tool-bloat, etc.) and on the `reject` branch of
|
|
361
|
+
* `archetype-perf-floor-breach` where no adapter would help.
|
|
362
|
+
*
|
|
363
|
+
* CLOSED discriminated union (R3 from consultation doc) — future adapter
|
|
364
|
+
* parameters extend the union in `compatibility.ts` in named alpha
|
|
365
|
+
* releases. No `| string` escape hatch; consumer code can write
|
|
366
|
+
* exhaustive `switch (suggestedAdaptation.parameter)`.
|
|
367
|
+
*
|
|
368
|
+
* Phase 2 cross-builder coherence: Builder A's
|
|
369
|
+
* `AdvisoryRecord.suggestedAdaptation` (in `glassbox-routes/types.ts`)
|
|
370
|
+
* MUST type to the same union. Phase 2 integration verifies.
|
|
371
|
+
*/
|
|
372
|
+
suggestedAdaptation?: Adapter;
|
|
349
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* alpha.28 — adapter shape attached to advisories and returned by
|
|
376
|
+
* `getModelCompatibility()`. A CLOSED discriminated union: future adapter
|
|
377
|
+
* parameters extend it explicitly in named alpha releases. NO `| string`
|
|
378
|
+
* escape hatch — consumer policy code SHOULD write exhaustive
|
|
379
|
+
* `switch (adapter.parameter)` and rely on the compiler to flag
|
|
380
|
+
* "I added a new adapter parameter and forgot to update consumer policy."
|
|
381
|
+
*
|
|
382
|
+
* Defined here (in `ir.ts`, the foundational types module) and re-exported
|
|
383
|
+
* from `compatibility.ts` for ergonomic consumer imports. Anchoring it
|
|
384
|
+
* here avoids the import cycle that would form if both files tried to be
|
|
385
|
+
* the source of truth (ir.ts → compatibility.ts → profiles.ts → ir.ts).
|
|
386
|
+
*
|
|
387
|
+
* alpha.28 variants:
|
|
388
|
+
* - `{ parameter: 'toolOrchestration'; value: 'sequential'; consequence }`
|
|
389
|
+
* Lifts DeepSeek V4-family on `hunt` from the sequential-tool cliff
|
|
390
|
+
* (L-040). `consequence` is consumer-renderable plain English.
|
|
391
|
+
*
|
|
392
|
+
* Future alpha releases will add e.g. `parallelToolCalls`, `maxTools`,
|
|
393
|
+
* `thinkingBudget` (per tt-intel-Cairn priority list).
|
|
394
|
+
*/
|
|
395
|
+
type Adapter = {
|
|
396
|
+
parameter: 'toolOrchestration';
|
|
397
|
+
value: 'sequential';
|
|
398
|
+
consequence: string;
|
|
399
|
+
};
|
|
350
400
|
interface CompileResult {
|
|
351
401
|
/** Unique handle for this call — pass to record() to correlate the outcome. */
|
|
352
402
|
handle: string;
|
|
@@ -695,6 +745,41 @@ interface RecordInput {
|
|
|
695
745
|
* Empty array / undefined → no second POST fires.
|
|
696
746
|
*/
|
|
697
747
|
advisories?: BestPracticeAdvisory[];
|
|
748
|
+
/**
|
|
749
|
+
* alpha.28 — Glass-Box renderer substrate fields (migration 018).
|
|
750
|
+
*
|
|
751
|
+
* All optional. When omitted, brain stores NULL and the renderer falls
|
|
752
|
+
* back to "—" / hidden rows. Library callers (`call.ts`) populate what
|
|
753
|
+
* they observe; adapter / SDK consumers can populate the rest from their
|
|
754
|
+
* own provider response surface.
|
|
755
|
+
*/
|
|
756
|
+
/**
|
|
757
|
+
* Provider finish reason. Captured from NormalizedResponse.finishReason
|
|
758
|
+
* (Anthropic `stop_reason`, Google `finishReason`, OpenAI `finish_reason`).
|
|
759
|
+
* Lower-case canonicalization is the brain's job; consumers can pass
|
|
760
|
+
* raw provider strings.
|
|
761
|
+
*/
|
|
762
|
+
finishReason?: string;
|
|
763
|
+
/**
|
|
764
|
+
* End-to-end wall-clock latency in ms. Distinct from `latencyMs` only
|
|
765
|
+
* insofar as `latencyMs` was the historical name for the same metric;
|
|
766
|
+
* `totalMs` is the new column on `compile_outcomes` (migration 018).
|
|
767
|
+
* When omitted, brain mirrors `latency_ms`.
|
|
768
|
+
*/
|
|
769
|
+
totalMs?: number;
|
|
770
|
+
/** Tools kept after the tool-relevance pass. */
|
|
771
|
+
toolsCount?: number;
|
|
772
|
+
/** Number of history messages at compile time. */
|
|
773
|
+
historyDepth?: number;
|
|
774
|
+
/** Rendered system prompt size in characters. */
|
|
775
|
+
systemPromptChars?: number;
|
|
776
|
+
/** Model originally targeted when a fallback fired. */
|
|
777
|
+
fellOverFrom?: string;
|
|
778
|
+
/**
|
|
779
|
+
* Why the fallback fired. Closed set mirroring CallResult.fallbackReason —
|
|
780
|
+
* keep in sync with the wire-contract enum (TraceDetail.fallbackReason).
|
|
781
|
+
*/
|
|
782
|
+
fallbackReason?: 'rate_limit' | 'provider_auth_failed' | 'provider_error' | 'cliff' | 'cost_cap' | 'contract_violation';
|
|
698
783
|
}
|
|
699
784
|
/**
|
|
700
785
|
* alpha.20 Entry 4: kinds of consumer-declared outcomes feeding the quality
|
|
@@ -834,4 +919,4 @@ interface PerAxisMetrics {
|
|
|
834
919
|
/** Per-axis metrics keyed by model — used for chain-comparison views. */
|
|
835
920
|
type PerAxisMetricsByModel = Record<string, PerAxisMetrics>;
|
|
836
921
|
|
|
837
|
-
export { type ApiKeys as A, type BestPracticeAdvisory as B, type CompilePolicy as C, type FallbackReason as F, type Grounding as G, type HistoryCachePolicy as H, type IntentDeclaration as I, type Message as M, type NormalizedResponse as N, type OutcomeResult as O, type ProviderOverrides as P, type RecordInput as R, type ToolCall as T, type CompiledRequest as a, type PromptIR as b, type CallOptions as c, type CallResult as d, type RecordOutcomeInput as e, type OracleScore as f, type CompileResult as g, type
|
|
922
|
+
export { type ApiKeys as A, type BestPracticeAdvisory as B, type CompilePolicy as C, type FallbackReason as F, type Grounding as G, type HistoryCachePolicy as H, type IntentDeclaration as I, type Message as M, type NormalizedResponse as N, type OutcomeResult as O, type ProviderOverrides as P, type RecordInput as R, type ToolCall as T, type CompiledRequest as a, type PromptIR as b, type CallOptions as c, type CallResult as d, type RecordOutcomeInput as e, type OracleScore as f, type CompileResult as g, type Adapter as h, type PerAxisMetrics as i, type Provider as j, type ChainEntry as k, type CallAttempt as l, CallError as m, type ChainWithGrounding as n, type Constraints as o, type MutationApplied as p, type NormalizedTokens as q, type OutcomeKind as r, type PerAxisMetricsByModel as s, type PromptSection as t, type ToolDefinition as u };
|
package/dist/profiles.d.mts
CHANGED
package/dist/profiles.d.ts
CHANGED
package/dist/profiles.js
CHANGED
|
@@ -859,12 +859,23 @@ var PROFILES_RAW = [
|
|
|
859
859
|
// Each entry's pricing/context/cliffs/lowering reflects the template, NOT
|
|
860
860
|
// provider docs. Verify before promoting status to 'current' (L-049/L-081).
|
|
861
861
|
{
|
|
862
|
+
// s37 (2026-05-21): UNVERIFIED-AUTO-ONBOARD → verified against
|
|
863
|
+
// ai.google.dev/gemini-api/docs/models/gemini-3-flash-preview +
|
|
864
|
+
// ai.google.dev/gemini-api/docs/pricing. L-081 catches:
|
|
865
|
+
// maxOutputTokens 65_535 → 65_536 (off-by-one)
|
|
866
|
+
// costInputPer1m 0.30 → 0.50 (template-cloned from 2.5-flash; actual is 1.67× more expensive)
|
|
867
|
+
// costOutputPer1m 2.50 → 3.00 (template-cloned; actual 1.2× more expensive)
|
|
868
|
+
// cache discount default 0.25 → 0.10 (10× discount, $0.05/$0.50 per docs)
|
|
869
|
+
// Cliffs inherited from 2.5-flash conservatively. The 8K-context-quality
|
|
870
|
+
// cliff was a 2.5-Flash observation — Google positions Gemini 3 as
|
|
871
|
+
// sustained-frontier-on-long-context; brain evidence will validate/relax.
|
|
872
|
+
// Kept as guard for now.
|
|
862
873
|
id: "gemini-3-flash-preview",
|
|
863
|
-
verifiedAgainstDocs: "
|
|
874
|
+
verifiedAgainstDocs: "2026-05-21",
|
|
864
875
|
provider: "google",
|
|
865
876
|
status: "preview",
|
|
866
877
|
maxContextTokens: 1048576,
|
|
867
|
-
maxOutputTokens:
|
|
878
|
+
maxOutputTokens: 65536,
|
|
868
879
|
maxTools: 128,
|
|
869
880
|
parallelToolCalls: true,
|
|
870
881
|
structuredOutput: "native",
|
|
@@ -875,13 +886,13 @@ var PROFILES_RAW = [
|
|
|
875
886
|
metric: "input_tokens",
|
|
876
887
|
threshold: 8e3,
|
|
877
888
|
action: "downgrade_quality_warning",
|
|
878
|
-
reason: "
|
|
889
|
+
reason: "Inherited from 2.5-flash guard; brain evidence on Gemini 3 long-context quality will validate/relax"
|
|
879
890
|
},
|
|
880
891
|
{
|
|
881
892
|
metric: "tool_count",
|
|
882
893
|
threshold: 20,
|
|
883
894
|
action: "drop_to_top_relevant",
|
|
884
|
-
reason: "Tool reliability drops above ~20 tools (despite 128 hard limit)"
|
|
895
|
+
reason: "Tool reliability drops above ~20 tools (despite 128 hard limit) \u2014 inherited from Flash family"
|
|
885
896
|
},
|
|
886
897
|
{
|
|
887
898
|
metric: "thinking_with_short_output",
|
|
@@ -890,24 +901,22 @@ var PROFILES_RAW = [
|
|
|
890
901
|
reason: "Thinking tokens consume maxOutputTokens \u2014 empty response if drained"
|
|
891
902
|
},
|
|
892
903
|
{
|
|
893
|
-
//
|
|
894
|
-
//
|
|
895
|
-
//
|
|
896
|
-
// help — disabling thinking is necessary but not sufficient. Tools
|
|
897
|
-
// present + summarize intent confuses Flash into a no-output state
|
|
898
|
-
// (likely tool-decision purgatory). Strip tools entirely for this
|
|
899
|
-
// archetype on this model.
|
|
904
|
+
// Inherited from gemini-2.5-flash s11 trust artifact. Family-likely
|
|
905
|
+
// failure mode for Flash architecture. Keep preemptively until brain
|
|
906
|
+
// evidence on Gemini 3 specifically.
|
|
900
907
|
metric: "tool_count",
|
|
901
908
|
threshold: 1,
|
|
902
909
|
whenIntent: "summarize",
|
|
903
910
|
action: "strip_tools",
|
|
904
|
-
reason: "
|
|
911
|
+
reason: "Inherited from 2.5-flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on 3-flash-preview specifically."
|
|
905
912
|
}
|
|
906
913
|
],
|
|
907
|
-
costInputPer1m: 0.
|
|
908
|
-
costOutputPer1m:
|
|
914
|
+
costInputPer1m: 0.5,
|
|
915
|
+
costOutputPer1m: 3,
|
|
909
916
|
lowering: {
|
|
910
917
|
...GOOGLE_LOWERING_BASE,
|
|
918
|
+
// 10× cache discount per Google pricing: $0.05/M cached vs $0.50/M input.
|
|
919
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
911
920
|
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
912
921
|
},
|
|
913
922
|
recovery: [
|
|
@@ -933,40 +942,45 @@ var PROFILES_RAW = [
|
|
|
933
942
|
],
|
|
934
943
|
strengths: ["speed", "volume", "classification", "1m_context", "cost"],
|
|
935
944
|
weaknesses: ["complex_schemas", "large_tool_sets", "high_context_quality"],
|
|
936
|
-
notes: "
|
|
937
|
-
//
|
|
938
|
-
//
|
|
945
|
+
notes: "Verified s37 (2026-05-21) against Google docs. Step-change positioning vs 2.5-flash on agentic loops per Google's release notes (Dec 2025). Pricing 1.67\xD7/1.2\xD7 higher than 2.5-flash; cache discount 10\xD7 (vs 4\xD7 for 2.5). Status=preview until brain evidence accumulates.",
|
|
946
|
+
// Anchored to 2.5-flash archetypePerf as starter, with judgment adjustments
|
|
947
|
+
// for Google's "step-change on agentic" positioning. Brain evidence (zero
|
|
948
|
+
// rows today) will replace these starter values.
|
|
939
949
|
archetypePerf: {
|
|
940
950
|
hunt: 9,
|
|
941
|
-
// L-040
|
|
951
|
+
// Inherits 2.5-flash L-040 parallel-tool tier; Google positions 3 as agentic-loop upgrade
|
|
942
952
|
classify: 7,
|
|
943
|
-
// brain-validated
|
|
953
|
+
// Inherits 2.5-flash brain-validated tier (218 rows on 2.5)
|
|
944
954
|
summarize: 7,
|
|
945
|
-
//
|
|
955
|
+
// Inherits 2.5-flash; cliff strips tools when present
|
|
946
956
|
transform: 7,
|
|
947
|
-
ask:
|
|
948
|
-
|
|
949
|
-
|
|
957
|
+
ask: 8,
|
|
958
|
+
// +1 vs 2.5-flash — sustained-frontier positioning
|
|
959
|
+
generate: 7,
|
|
960
|
+
// +1 vs 2.5-flash — agentic coding upgrade per Google
|
|
961
|
+
plan: 6,
|
|
962
|
+
// +1 vs 2.5-flash — complex iterations per positioning
|
|
950
963
|
extract: 6,
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
// reasoning shallower than Sonnet/Opus
|
|
964
|
+
critique: 5
|
|
965
|
+
// +1 vs 2.5-flash — but still below Sonnet/Opus reasoning floor
|
|
954
966
|
}
|
|
955
967
|
},
|
|
956
968
|
{
|
|
957
|
-
// ── Gemini
|
|
958
|
-
// Onboarded 2026-05-
|
|
959
|
-
//
|
|
960
|
-
//
|
|
961
|
-
//
|
|
962
|
-
//
|
|
963
|
-
//
|
|
964
|
-
//
|
|
965
|
-
//
|
|
966
|
-
//
|
|
967
|
-
//
|
|
969
|
+
// ── Gemini 3.1 Flash-Lite ──
|
|
970
|
+
// Onboarded 2026-05-16 by auto-onboarder; s37 (2026-05-21) verified
|
|
971
|
+
// against ai.google.dev/gemini-api/docs/pricing.
|
|
972
|
+
//
|
|
973
|
+
// L-081 CATCHES (template clone from 2.5-flash-lite was 2.5-3.75× too cheap):
|
|
974
|
+
// costInputPer1m 0.10 → 0.25 (template clone undervalued by 2.5×)
|
|
975
|
+
// costOutputPer1m 0.40 → 1.50 (template clone undervalued by 3.75×)
|
|
976
|
+
//
|
|
977
|
+
// Real 3.1-flash-lite is NOT a cost-equivalent successor to 2.5-flash-lite —
|
|
978
|
+
// it sits between 2.5-flash-lite ($0.10/$0.40) and 2.5-flash ($0.30/$2.50).
|
|
979
|
+
// Cache discount 10× verified ($0.025/M cached vs $0.25/M input).
|
|
980
|
+
//
|
|
981
|
+
// Cliffs are HYPOTHESIZED from 2.5-flash family; brain evidence pending.
|
|
968
982
|
id: "gemini-3.1-flash-lite",
|
|
969
|
-
verifiedAgainstDocs: "
|
|
983
|
+
verifiedAgainstDocs: "2026-05-21",
|
|
970
984
|
provider: "google",
|
|
971
985
|
status: "preview",
|
|
972
986
|
maxContextTokens: 1048576,
|
|
@@ -1007,12 +1021,12 @@ var PROFILES_RAW = [
|
|
|
1007
1021
|
reason: "Inherited from Flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on Flash-Lite specifically."
|
|
1008
1022
|
}
|
|
1009
1023
|
],
|
|
1010
|
-
costInputPer1m: 0.
|
|
1011
|
-
costOutputPer1m:
|
|
1024
|
+
costInputPer1m: 0.25,
|
|
1025
|
+
costOutputPer1m: 1.5,
|
|
1012
1026
|
lowering: {
|
|
1013
1027
|
...GOOGLE_LOWERING_BASE,
|
|
1014
|
-
// Cache discount 10× (vs Flash 4×) — Google
|
|
1015
|
-
// $0.
|
|
1028
|
+
// Cache discount 10× (vs Flash 4×) — Google docs s37: $0.025/M cached vs
|
|
1029
|
+
// $0.25/M input. Material for repeat-prompt workloads (classify shape).
|
|
1016
1030
|
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
1017
1031
|
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
1018
1032
|
},
|
|
@@ -1037,13 +1051,13 @@ var PROFILES_RAW = [
|
|
|
1037
1051
|
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target."
|
|
1038
1052
|
}
|
|
1039
1053
|
],
|
|
1040
|
-
strengths: ["
|
|
1054
|
+
strengths: ["low_cost", "speed", "volume", "classification", "summarize", "1m_context", "cache_friendly"],
|
|
1041
1055
|
weaknesses: ["complex_reasoning", "large_tool_sets", "complex_schemas", "structured_output_unproven", "long_context_quality"],
|
|
1042
|
-
notes: "
|
|
1043
|
-
// Tier 3
|
|
1044
|
-
// rows —
|
|
1045
|
-
// sibling of Flash
|
|
1046
|
-
//
|
|
1056
|
+
notes: "Verified s37 (2026-05-21) against Google docs. Sits between 2.5-flash-lite (cheaper) and 2.5-flash (more expensive) on cost frontier; 2.5\xD7 more expensive than initial template-clone. Cliffs hypothesized from Flash family \u2014 brain evidence pending.",
|
|
1057
|
+
// Tier 2-3 floor for summarize/classify chains at the new (verified) price
|
|
1058
|
+
// point. ZERO brain rows — values are starter hypotheses anchored to
|
|
1059
|
+
// "smaller sibling of Flash at higher cost than 2.5-flash-lite." The first
|
|
1060
|
+
// 50 brain rows per archetype will validate or relax these.
|
|
1047
1061
|
archetypePerf: {
|
|
1048
1062
|
classify: 6,
|
|
1049
1063
|
// starter hypothesis — verify (Flash is 7, lite likely ≤)
|
|
@@ -1058,6 +1072,125 @@ var PROFILES_RAW = [
|
|
|
1058
1072
|
plan: 3,
|
|
1059
1073
|
critique: 3
|
|
1060
1074
|
}
|
|
1075
|
+
},
|
|
1076
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
1077
|
+
// Gemini 3.5 Flash — hand-onboarded s37 (2026-05-21)
|
|
1078
|
+
//
|
|
1079
|
+
// Google positioning ("Most intelligent for sustained frontier performance
|
|
1080
|
+
// on agentic and coding tasks" / "particularly effective for rapid agentic
|
|
1081
|
+
// loops involving complex coding cycles and iterations") suggests this is
|
|
1082
|
+
// the Flash-family upgrade specifically aimed at hunt-shape workloads.
|
|
1083
|
+
// Pricing 5× input / 3.6× output vs 2.5-flash — material cost premium.
|
|
1084
|
+
// archetypePerf adjusted +1 vs 2.5-flash on ask/generate/plan/critique
|
|
1085
|
+
// (sustained-frontier positioning); hunt held at 9 inherited from L-040
|
|
1086
|
+
// family parallel-tool tier; brain evidence will validate within 50 rows.
|
|
1087
|
+
//
|
|
1088
|
+
// Cliffs inherited conservatively from 2.5-flash. Google's "sustained
|
|
1089
|
+
// frontier on long-context" positioning suggests the 8K cliff may not
|
|
1090
|
+
// apply to 3.5 — keep as guard until brain evidence shows otherwise.
|
|
1091
|
+
//
|
|
1092
|
+
// Specs verified against:
|
|
1093
|
+
// ai.google.dev/gemini-api/docs/models/gemini-3.5-flash
|
|
1094
|
+
// ai.google.dev/gemini-api/docs/pricing (Standard tier)
|
|
1095
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
1096
|
+
{
|
|
1097
|
+
id: "gemini-3.5-flash",
|
|
1098
|
+
verifiedAgainstDocs: "2026-05-21",
|
|
1099
|
+
provider: "google",
|
|
1100
|
+
status: "current",
|
|
1101
|
+
maxContextTokens: 1048576,
|
|
1102
|
+
maxOutputTokens: 65536,
|
|
1103
|
+
maxTools: 128,
|
|
1104
|
+
parallelToolCalls: true,
|
|
1105
|
+
structuredOutput: "native",
|
|
1106
|
+
systemPromptMode: "separate",
|
|
1107
|
+
streaming: true,
|
|
1108
|
+
cliffs: [
|
|
1109
|
+
{
|
|
1110
|
+
metric: "input_tokens",
|
|
1111
|
+
threshold: 8e3,
|
|
1112
|
+
action: "downgrade_quality_warning",
|
|
1113
|
+
reason: "Inherited from 2.5-flash guard; Google positions 3.5 as sustained-frontier-on-long-context but brain evidence pending"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
metric: "tool_count",
|
|
1117
|
+
threshold: 20,
|
|
1118
|
+
action: "drop_to_top_relevant",
|
|
1119
|
+
reason: "Inherited from Flash family: tool reliability drops above ~20 (despite 128 hard limit). Validate per (archetype, model) after n\u226520."
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
metric: "thinking_with_short_output",
|
|
1123
|
+
threshold: 1,
|
|
1124
|
+
action: "force_thinking_budget_zero",
|
|
1125
|
+
reason: "Thinking mode supported per Google docs; same drain risk as 2.5-flash \u2014 thinking tokens consume maxOutputTokens"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
// Inherited from 2.5-flash s11 trust artifact (5/5 empty rate on
|
|
1129
|
+
// tt-intelligence/summarize/gemini-2.5-flash with tools offered).
|
|
1130
|
+
// Family-likely failure mode for Flash architecture across versions.
|
|
1131
|
+
// Keep preemptively until brain evidence on 3.5-flash specifically.
|
|
1132
|
+
metric: "tool_count",
|
|
1133
|
+
threshold: 1,
|
|
1134
|
+
whenIntent: "summarize",
|
|
1135
|
+
action: "strip_tools",
|
|
1136
|
+
reason: "Inherited from 2.5-flash s11 cliff (kgauto commit 3872832): summarize+tools \u2192 empty response. Preemptive guard until brain evidence on 3.5-flash specifically."
|
|
1137
|
+
}
|
|
1138
|
+
],
|
|
1139
|
+
costInputPer1m: 1.5,
|
|
1140
|
+
costOutputPer1m: 9,
|
|
1141
|
+
lowering: {
|
|
1142
|
+
...GOOGLE_LOWERING_BASE,
|
|
1143
|
+
// 10× cache discount per Google pricing: $0.15/M cached vs $1.50/M input.
|
|
1144
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
1145
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
1146
|
+
},
|
|
1147
|
+
recovery: [
|
|
1148
|
+
{
|
|
1149
|
+
signal: "empty_response_after_tool",
|
|
1150
|
+
action: "retry_with_params",
|
|
1151
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1152
|
+
maxRetries: 1,
|
|
1153
|
+
reason: "Inherited Flash-family pattern: empty after tool result \u2014 retry with thinking off"
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
signal: "empty_response",
|
|
1157
|
+
action: "retry_with_params",
|
|
1158
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1159
|
+
maxRetries: 1,
|
|
1160
|
+
reason: "Empty response \u2014 try with thinking off"
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
signal: "malformed_function_call",
|
|
1164
|
+
action: "escalate",
|
|
1165
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target"
|
|
1166
|
+
}
|
|
1167
|
+
],
|
|
1168
|
+
strengths: ["agentic_loops", "coding", "1m_context", "parallel_tools", "thinking_mode", "sustained_frontier"],
|
|
1169
|
+
weaknesses: ["cost_vs_2_5_flash", "no_brain_evidence_yet"],
|
|
1170
|
+
notes: "Hand-onboarded s37 (2026-05-21) verified against Google docs. Stable status; positioned as Flash-family upgrade for agentic loops and coding. 5\xD7/3.6\xD7 more expensive than 2.5-flash but Google claims step-change on sustained frontier work. archetypePerf adjustments are judgment-grounded starter hypotheses \u2014 brain evidence will validate within ~50 rows per archetype.",
|
|
1171
|
+
// Starter hypothesis: anchored to 2.5-flash archetypePerf with +1
|
|
1172
|
+
// adjustments where Google's positioning explicitly supports
|
|
1173
|
+
// (agentic/coding/sustained). Hunt held at 9 inherited from L-040 family
|
|
1174
|
+
// parallel-tool tier. Brain evidence will replace.
|
|
1175
|
+
archetypePerf: {
|
|
1176
|
+
hunt: 9,
|
|
1177
|
+
// Inherited from 2.5-flash L-040 parallel-tool tier; Google positions 3.5 as agentic-loop champion
|
|
1178
|
+
classify: 7,
|
|
1179
|
+
// Inherited from 2.5-flash brain-validated tier (218 rows on 2.5)
|
|
1180
|
+
summarize: 7,
|
|
1181
|
+
// Inherited from 2.5-flash; cliff strips tools when present
|
|
1182
|
+
transform: 7,
|
|
1183
|
+
ask: 8,
|
|
1184
|
+
// +1 vs 2.5-flash — sustained-frontier positioning
|
|
1185
|
+
generate: 8,
|
|
1186
|
+
// +1 vs 2.5-flash (6→8) — Google: "complex coding cycles and iterations"
|
|
1187
|
+
plan: 7,
|
|
1188
|
+
// +1 vs 2.5-flash (5→7) — "complex iterations" positioning
|
|
1189
|
+
extract: 7,
|
|
1190
|
+
// +1 vs 2.5-flash — sustained-frontier on structured tasks
|
|
1191
|
+
critique: 5
|
|
1192
|
+
// +1 vs 2.5-flash — but still below Sonnet/Opus reasoning floor
|
|
1193
|
+
}
|
|
1061
1194
|
}
|
|
1062
1195
|
];
|
|
1063
1196
|
var ALIASES = {
|
package/dist/profiles.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, l as CallAttempt } from './ir-5W0efxt9.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, l as CallAttempt } from './ir-MXCJA8L7.mjs';
|
|
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.28",
|
|
4
4
|
"description": "Prompt compiler + central learning brain for multi-model AI apps. Swap models without rewriting prompts.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|