@warmdrift/kgauto-compiler 2.0.0-alpha.3 → 2.0.0-alpha.31
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/README.md +87 -3
- package/dist/chunk-JQGRWJZO.mjs +1216 -0
- package/dist/chunk-NBO4R5PC.mjs +313 -0
- package/dist/chunk-RO22VFIF.mjs +29 -0
- package/dist/chunk-WXCFWUCN.mjs +678 -0
- package/dist/glassbox/index.d.mts +59 -0
- package/dist/glassbox/index.d.ts +59 -0
- package/dist/glassbox/index.js +312 -0
- package/dist/glassbox/index.mjs +12 -0
- package/dist/glassbox-routes/index.d.mts +242 -0
- package/dist/glassbox-routes/index.d.ts +242 -0
- package/dist/glassbox-routes/index.js +2458 -0
- package/dist/glassbox-routes/index.mjs +658 -0
- package/dist/index.d.mts +1195 -11
- package/dist/index.d.ts +1195 -11
- package/dist/index.js +3503 -236
- package/dist/index.mjs +1588 -78
- package/dist/ir-BIAT9gJk.d.ts +1031 -0
- package/dist/ir-De2AQtlr.d.mts +1031 -0
- package/dist/profiles.d.mts +137 -2
- package/dist/profiles.d.ts +137 -2
- package/dist/profiles.js +820 -11
- package/dist/profiles.mjs +5 -1
- package/dist/types-BjrIFPGe.d.mts +131 -0
- package/dist/types-D_JAhCv4.d.ts +131 -0
- package/package.json +12 -2
- package/dist/chunk-MBEI5UOM.mjs +0 -409
- package/dist/profiles-BiyrF36f.d.mts +0 -489
- package/dist/profiles-C5lVqF8_.d.ts +0 -489
package/dist/profiles.js
CHANGED
|
@@ -21,7 +21,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var profiles_exports = {};
|
|
22
22
|
__export(profiles_exports, {
|
|
23
23
|
ALIASES: () => ALIASES,
|
|
24
|
+
_setProfileBrainHook: () => _setProfileBrainHook,
|
|
24
25
|
allProfiles: () => allProfiles,
|
|
26
|
+
allProfilesRaw: () => allProfilesRaw,
|
|
25
27
|
getProfile: () => getProfile,
|
|
26
28
|
profilesByProvider: () => profilesByProvider,
|
|
27
29
|
tryGetProfile: () => tryGetProfile
|
|
@@ -79,7 +81,24 @@ var PROFILES_RAW = [
|
|
|
79
81
|
],
|
|
80
82
|
strengths: ["reasoning", "agentic_coding", "long_context", "reliable_tool_use", "structured_output"],
|
|
81
83
|
weaknesses: ["cost", "latency"],
|
|
82
|
-
notes: "Frontier (2026-05). Step-change improvement over 4.6 in agentic coding. Adaptive thinking only \u2014 no extended-thinking toggle. 1M context, 128k max output."
|
|
84
|
+
notes: "Frontier (2026-05). Step-change improvement over 4.6 in agentic coding. Adaptive thinking only \u2014 no extended-thinking toggle. 1M context, 128k max output.",
|
|
85
|
+
// Frontier perf. Drops on archetypes where parallel-tool throughput
|
|
86
|
+
// (hunt) or low-budget cost-sensitivity (classify/summarize) matters
|
|
87
|
+
// more than reasoning depth.
|
|
88
|
+
archetypePerf: {
|
|
89
|
+
critique: 10,
|
|
90
|
+
plan: 10,
|
|
91
|
+
generate: 9,
|
|
92
|
+
ask: 9,
|
|
93
|
+
extract: 9,
|
|
94
|
+
transform: 9,
|
|
95
|
+
hunt: 8,
|
|
96
|
+
// strong but Flash dominates parallel tool throughput
|
|
97
|
+
summarize: 8,
|
|
98
|
+
// overkill for tolerant archetype; cost-out of frontier
|
|
99
|
+
classify: 8
|
|
100
|
+
// overkill; brain-validated cheaper models cover this
|
|
101
|
+
}
|
|
83
102
|
},
|
|
84
103
|
{
|
|
85
104
|
id: "claude-opus-4-6",
|
|
@@ -111,7 +130,20 @@ var PROFILES_RAW = [
|
|
|
111
130
|
],
|
|
112
131
|
strengths: ["reasoning", "long_context", "reliable_tool_use", "structured_output", "extended_thinking"],
|
|
113
132
|
weaknesses: ["cost", "latency"],
|
|
114
|
-
notes: "Predecessor to 4.7. Still current in Anthropic legacy table. Same pricing as 4.7 \u2014 choose 4.7 unless you need extended-thinking budget control (4.7 is adaptive-only)."
|
|
133
|
+
notes: "Predecessor to 4.7. Still current in Anthropic legacy table. Same pricing as 4.7 \u2014 choose 4.7 unless you need extended-thinking budget control (4.7 is adaptive-only).",
|
|
134
|
+
// One notch below 4.7 across the board — extended-thinking edge does
|
|
135
|
+
// not flip any archetype ranking. Legacy: chains should prefer 4.7.
|
|
136
|
+
archetypePerf: {
|
|
137
|
+
critique: 9,
|
|
138
|
+
plan: 9,
|
|
139
|
+
generate: 9,
|
|
140
|
+
ask: 9,
|
|
141
|
+
extract: 9,
|
|
142
|
+
transform: 9,
|
|
143
|
+
hunt: 7,
|
|
144
|
+
summarize: 8,
|
|
145
|
+
classify: 8
|
|
146
|
+
}
|
|
115
147
|
},
|
|
116
148
|
{
|
|
117
149
|
id: "claude-sonnet-4-6",
|
|
@@ -135,7 +167,23 @@ var PROFILES_RAW = [
|
|
|
135
167
|
],
|
|
136
168
|
strengths: ["quality", "tool_use", "long_context", "cache_friendly", "extended_thinking"],
|
|
137
169
|
weaknesses: [],
|
|
138
|
-
notes: "Workhorse. Best price/quality for most multi-turn agentic work. 1M context, 64k max output."
|
|
170
|
+
notes: "Workhorse. Best price/quality for most multi-turn agentic work. 1M context, 64k max output.",
|
|
171
|
+
// Master plan §6.2 anchor. Tier 0 for plan/generate/ask/extract/transform
|
|
172
|
+
// in starter chains; tier 1 cross-provider for hunt/summarize/classify.
|
|
173
|
+
archetypePerf: {
|
|
174
|
+
ask: 9,
|
|
175
|
+
generate: 9,
|
|
176
|
+
plan: 9,
|
|
177
|
+
critique: 9,
|
|
178
|
+
extract: 9,
|
|
179
|
+
transform: 9,
|
|
180
|
+
hunt: 7,
|
|
181
|
+
// strong but Flash beats on parallel tool throughput
|
|
182
|
+
summarize: 8,
|
|
183
|
+
// overkill for tolerant archetype
|
|
184
|
+
classify: 8
|
|
185
|
+
// overkill
|
|
186
|
+
}
|
|
139
187
|
},
|
|
140
188
|
{
|
|
141
189
|
id: "claude-haiku-4-5",
|
|
@@ -165,7 +213,23 @@ var PROFILES_RAW = [
|
|
|
165
213
|
],
|
|
166
214
|
strengths: ["speed", "cost", "classification", "cache_friendly", "extended_thinking"],
|
|
167
215
|
weaknesses: ["complex_reasoning", "large_tool_sets"],
|
|
168
|
-
notes: "Cheapest Anthropic. Great for classify, summarize, ask shapes. 200k context, 64k max output. API alias `claude-haiku-4-5` resolves to dated snapshot `claude-haiku-4-5-20251001`."
|
|
216
|
+
notes: "Cheapest Anthropic. Great for classify, summarize, ask shapes. 200k context, 64k max output. API alias `claude-haiku-4-5` resolves to dated snapshot `claude-haiku-4-5-20251001`.",
|
|
217
|
+
// Tier 1 cross-provider anchor for short-output chains (classify/
|
|
218
|
+
// summarize/extract/transform). Falls off on plan/critique where
|
|
219
|
+
// reasoning depth matters; competes with Pro on cost+latency.
|
|
220
|
+
archetypePerf: {
|
|
221
|
+
classify: 8,
|
|
222
|
+
summarize: 8,
|
|
223
|
+
ask: 7,
|
|
224
|
+
transform: 7,
|
|
225
|
+
extract: 7,
|
|
226
|
+
hunt: 6,
|
|
227
|
+
// tool reliability drops at 16 — cliff guard fires
|
|
228
|
+
generate: 6,
|
|
229
|
+
plan: 5,
|
|
230
|
+
critique: 4
|
|
231
|
+
// reasoning depth gap vs Sonnet/Opus
|
|
232
|
+
}
|
|
169
233
|
},
|
|
170
234
|
// ── Google ──
|
|
171
235
|
{
|
|
@@ -243,7 +307,131 @@ var PROFILES_RAW = [
|
|
|
243
307
|
],
|
|
244
308
|
strengths: ["speed", "volume", "classification", "1m_context", "cost"],
|
|
245
309
|
weaknesses: ["complex_schemas", "large_tool_sets", "high_context_quality"],
|
|
246
|
-
notes: "Fast and cheap with 1M context. Quality cliffs at 8K context and 20 tools \u2014 guard with cliffs."
|
|
310
|
+
notes: "Fast and cheap with 1M context. Quality cliffs at 8K context and 20 tools \u2014 guard with cliffs.",
|
|
311
|
+
// Master plan §6.2 anchor. Tier 0 for hunt (parallel tool throughput
|
|
312
|
+
// 15-75 calls/step beats Sonnet — L-040), summarize, classify.
|
|
313
|
+
archetypePerf: {
|
|
314
|
+
hunt: 9,
|
|
315
|
+
// L-040: parallel tool throughput 15-75/step
|
|
316
|
+
classify: 7,
|
|
317
|
+
// brain-validated, 218 rows
|
|
318
|
+
summarize: 7,
|
|
319
|
+
// brain-validated; cliff strips tools when present
|
|
320
|
+
transform: 7,
|
|
321
|
+
ask: 7,
|
|
322
|
+
generate: 6,
|
|
323
|
+
plan: 5,
|
|
324
|
+
extract: 6,
|
|
325
|
+
// alpha.8 MAX_TOKENS history on structured output
|
|
326
|
+
critique: 4
|
|
327
|
+
// reasoning shallower than Sonnet/Opus
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
// ── Gemini 2.5 Flash-Lite ──
|
|
332
|
+
// Onboarded 2026-05-13 (s22) after the model-release watcher surfaced
|
|
333
|
+
// it as a UNREGISTERED + NEW candidate. Released by Google July 2025,
|
|
334
|
+
// stable. Positioned BELOW Flash on the cost/perf frontier:
|
|
335
|
+
// input $0.10/M (Flash $0.30/M) — 3× cheaper
|
|
336
|
+
// output $0.40/M (Flash $2.50/M) — 6× cheaper
|
|
337
|
+
// cache $0.01/M — 1/10 of input (vs Flash 0.25 discount)
|
|
338
|
+
// Cliffs are HYPOTHESIZED from Flash's known failure modes — Flash-Lite
|
|
339
|
+
// is a smaller sibling, so we inherit Flash's cliffs at equal-or-tighter
|
|
340
|
+
// thresholds. The brain will validate/relax these as evidence accumulates
|
|
341
|
+
// per (archetype, model) tuple. Currently ZERO brain rows for this model.
|
|
342
|
+
id: "gemini-2.5-flash-lite",
|
|
343
|
+
verifiedAgainstDocs: "2026-05-13",
|
|
344
|
+
provider: "google",
|
|
345
|
+
status: "current",
|
|
346
|
+
maxContextTokens: 1048576,
|
|
347
|
+
maxOutputTokens: 65536,
|
|
348
|
+
maxTools: 128,
|
|
349
|
+
parallelToolCalls: true,
|
|
350
|
+
structuredOutput: "native",
|
|
351
|
+
systemPromptMode: "separate",
|
|
352
|
+
streaming: true,
|
|
353
|
+
cliffs: [
|
|
354
|
+
{
|
|
355
|
+
metric: "input_tokens",
|
|
356
|
+
threshold: 8e3,
|
|
357
|
+
action: "downgrade_quality_warning",
|
|
358
|
+
reason: "Inherited from Flash: quality degrades above ~8K. Smaller model \u2014 likely degrades faster. Re-tune from brain after n\u226520."
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
metric: "tool_count",
|
|
362
|
+
threshold: 10,
|
|
363
|
+
action: "drop_to_top_relevant",
|
|
364
|
+
reason: "Conservative: Flash drops at 20, Flash-Lite is smaller \u2014 assume tighter ceiling until brain proves otherwise."
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
metric: "thinking_with_short_output",
|
|
368
|
+
threshold: 1,
|
|
369
|
+
action: "force_thinking_budget_zero",
|
|
370
|
+
reason: "Thinking enabled per Google API (thinking: true). Same drain risk as Flash \u2014 thinking tokens consume maxOutputTokens."
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
// Strong prior: Flash hit 5/5 empty rate on summarize+tools (s11
|
|
374
|
+
// trust artifact, kgauto commit 3872832). Flash-Lite shares the
|
|
375
|
+
// same architectural family — almost certainly inherits this cliff.
|
|
376
|
+
// Ship the guard preemptively; brain telemetry confirms or relaxes.
|
|
377
|
+
metric: "tool_count",
|
|
378
|
+
threshold: 1,
|
|
379
|
+
whenIntent: "summarize",
|
|
380
|
+
action: "strip_tools",
|
|
381
|
+
reason: "Inherited from Flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on Flash-Lite specifically."
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
costInputPer1m: 0.1,
|
|
385
|
+
costOutputPer1m: 0.4,
|
|
386
|
+
lowering: {
|
|
387
|
+
...GOOGLE_LOWERING_BASE,
|
|
388
|
+
// Cache discount 10× (vs Flash 4×) — Google's spec is $0.01/M cache vs
|
|
389
|
+
// $0.10/M input. Material for repeat-prompt workloads (classify shape).
|
|
390
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
391
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
392
|
+
},
|
|
393
|
+
recovery: [
|
|
394
|
+
{
|
|
395
|
+
signal: "empty_response_after_tool",
|
|
396
|
+
action: "retry_with_params",
|
|
397
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
398
|
+
maxRetries: 1,
|
|
399
|
+
reason: "Known on Flash family: empty after tool result \u2014 retry with thinking off."
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
signal: "empty_response",
|
|
403
|
+
action: "retry_with_params",
|
|
404
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
405
|
+
maxRetries: 1,
|
|
406
|
+
reason: "Empty response \u2014 try with thinking off."
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
signal: "malformed_function_call",
|
|
410
|
+
action: "escalate",
|
|
411
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target."
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
strengths: ["lowest_cost", "speed", "volume", "classification", "summarize", "1m_context", "cache_friendly"],
|
|
415
|
+
weaknesses: ["complex_reasoning", "large_tool_sets", "complex_schemas", "structured_output_unproven", "long_context_quality"],
|
|
416
|
+
notes: "Bottom-frontier anchor on cost: $0.10/$0.40 per 1M tokens, 1M context, 65K max output. Released July 2025 (stable). Positioned for classify / summarize / transform archetypes where quality bar is forgiving. Cliffs inherited from Flash at equal-or-tighter thresholds \u2014 re-tune per (archetype) once brain has n\u226520 rows. Alpha.8 contract layer handles MAX_TOKENS-on-structured-output via fallback chain, so structuredOutput=native is safe to declare even though Flash had alpha.8 history. Cache discount in spec: $0.01/M = 1/10 of input (richer than Flash 25%) \u2014 meaningful for repeat-prompt workloads.",
|
|
417
|
+
// Tier 3 emergency floor for summarize/classify chains. ZERO brain
|
|
418
|
+
// rows — all values are starter hypotheses anchored to "smaller
|
|
419
|
+
// sibling of Flash, at-or-below Flash perf on every archetype." The
|
|
420
|
+
// first 50 brain rows per archetype will validate or relax these.
|
|
421
|
+
archetypePerf: {
|
|
422
|
+
classify: 6,
|
|
423
|
+
// starter hypothesis — verify (Flash is 7, lite likely ≤)
|
|
424
|
+
summarize: 6,
|
|
425
|
+
// starter hypothesis — verify; cliff strips tools
|
|
426
|
+
transform: 6,
|
|
427
|
+
// starter hypothesis — verify
|
|
428
|
+
ask: 5,
|
|
429
|
+
hunt: 5,
|
|
430
|
+
generate: 4,
|
|
431
|
+
extract: 4,
|
|
432
|
+
plan: 3,
|
|
433
|
+
critique: 3
|
|
434
|
+
}
|
|
247
435
|
},
|
|
248
436
|
{
|
|
249
437
|
id: "gemini-2.5-pro",
|
|
@@ -279,7 +467,21 @@ var PROFILES_RAW = [
|
|
|
279
467
|
}
|
|
280
468
|
],
|
|
281
469
|
strengths: ["reasoning", "1m_context", "structured_output", "tool_use"],
|
|
282
|
-
weaknesses: ["pricing_above_200k"]
|
|
470
|
+
weaknesses: ["pricing_above_200k"],
|
|
471
|
+
// Master plan §3.3 anchor: tier-2 cross-provider in almost every chain.
|
|
472
|
+
// Sits on the frontier at perf-9 — close to Sonnet but cheaper input.
|
|
473
|
+
archetypePerf: {
|
|
474
|
+
critique: 9,
|
|
475
|
+
plan: 9,
|
|
476
|
+
ask: 8,
|
|
477
|
+
generate: 8,
|
|
478
|
+
extract: 8,
|
|
479
|
+
transform: 8,
|
|
480
|
+
hunt: 8,
|
|
481
|
+
// tier 1 cross-provider for hunt chain
|
|
482
|
+
summarize: 7,
|
|
483
|
+
classify: 7
|
|
484
|
+
}
|
|
283
485
|
},
|
|
284
486
|
{
|
|
285
487
|
id: "gemini-3.1-pro-preview",
|
|
@@ -317,7 +519,23 @@ var PROFILES_RAW = [
|
|
|
317
519
|
],
|
|
318
520
|
strengths: ["reasoning", "1m_context", "agentic_coding", "structured_output", "tool_use"],
|
|
319
521
|
weaknesses: ["cost", "preview_status", "pricing_above_200k"],
|
|
320
|
-
notes: "Frontier Gemini (preview, 2026-Q2). Step-change agentic coding per Google. Cache discount 10\xD7 (vs 4\xD7 for 2.5 Pro). Use status=preview to flag rollback path until GA."
|
|
522
|
+
notes: "Frontier Gemini (preview, 2026-Q2). Step-change agentic coding per Google. Cache discount 10\xD7 (vs 4\xD7 for 2.5 Pro). Use status=preview to flag rollback path until GA.",
|
|
523
|
+
// Frontier-Gemini preview — bumped one notch over 2.5 Pro on agentic
|
|
524
|
+
// coding / reasoning per Google's release notes. Preview status:
|
|
525
|
+
// chains should stay on 2.5 Pro until GA. Starter hypothesis.
|
|
526
|
+
archetypePerf: {
|
|
527
|
+
critique: 10,
|
|
528
|
+
// Google claims step-change on reasoning
|
|
529
|
+
plan: 10,
|
|
530
|
+
ask: 9,
|
|
531
|
+
generate: 9,
|
|
532
|
+
extract: 9,
|
|
533
|
+
transform: 8,
|
|
534
|
+
hunt: 9,
|
|
535
|
+
// step-change agentic per Google
|
|
536
|
+
summarize: 8,
|
|
537
|
+
classify: 7
|
|
538
|
+
}
|
|
321
539
|
},
|
|
322
540
|
// ── DeepSeek ──
|
|
323
541
|
// 2026-05-08 audit (L-073): DeepSeek's `deepseek-chat` was silently aliased
|
|
@@ -357,7 +575,24 @@ var PROFILES_RAW = [
|
|
|
357
575
|
],
|
|
358
576
|
strengths: ["cost", "1m_context", "json_output", "code", "reasoning"],
|
|
359
577
|
weaknesses: ["parallel_tools", "large_tool_sets"],
|
|
360
|
-
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."
|
|
578
|
+
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.",
|
|
579
|
+
// Master plan §6.2 anchor. Brain-validated tier 1 cross-provider for
|
|
580
|
+
// classify (169 rows, 0% empty). Tier 0 for summarize-with-no-tools.
|
|
581
|
+
// Falls off on hunt (sequential tools — L-040) and reasoning depth.
|
|
582
|
+
archetypePerf: {
|
|
583
|
+
classify: 7,
|
|
584
|
+
// brain-validated, 169 rows
|
|
585
|
+
summarize: 7,
|
|
586
|
+
// archetype-tolerant, no brain evidence yet
|
|
587
|
+
ask: 6,
|
|
588
|
+
transform: 6,
|
|
589
|
+
generate: 5,
|
|
590
|
+
plan: 5,
|
|
591
|
+
extract: 5,
|
|
592
|
+
critique: 4,
|
|
593
|
+
hunt: 4
|
|
594
|
+
// sequential tool calls only — L-040
|
|
595
|
+
}
|
|
361
596
|
},
|
|
362
597
|
{
|
|
363
598
|
id: "deepseek-v4-pro",
|
|
@@ -393,7 +628,569 @@ var PROFILES_RAW = [
|
|
|
393
628
|
],
|
|
394
629
|
strengths: ["quality", "reasoning", "1m_context", "json_output", "code", "extended_thinking"],
|
|
395
630
|
weaknesses: ["parallel_tools", "large_tool_sets"],
|
|
396
|
-
notes: "Pro tier. 1M context, 384k max output. Regular pricing $1.74/$3.48; 75% promo through 2026-05-31 ($0.435/$0.87). Default mode = thinking."
|
|
631
|
+
notes: "Pro tier. 1M context, 384k max output. Regular pricing $1.74/$3.48; 75% promo through 2026-05-31 ($0.435/$0.87). Default mode = thinking.",
|
|
632
|
+
// Master plan §3.3: tier 3 cross-provider for plan chain. Reasoning
|
|
633
|
+
// bumped one notch over V4-Flash; same parallel-tool ceiling.
|
|
634
|
+
archetypePerf: {
|
|
635
|
+
plan: 7,
|
|
636
|
+
// §3.3 tier 3 for plan
|
|
637
|
+
critique: 6,
|
|
638
|
+
ask: 7,
|
|
639
|
+
generate: 6,
|
|
640
|
+
classify: 7,
|
|
641
|
+
summarize: 7,
|
|
642
|
+
extract: 6,
|
|
643
|
+
transform: 6,
|
|
644
|
+
hunt: 4
|
|
645
|
+
// sequential tools — same as V4-Flash
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
// ── OpenAI ──
|
|
649
|
+
// alpha.16 (2026-05-17): close the half-supported provider gap. env.ts
|
|
650
|
+
// already registered OPENAI_API_KEY + executeOpenAI + normalizeOpenAILike
|
|
651
|
+
// + lowerOpenAI all existed; profile entries were missing, so the
|
|
652
|
+
// alpha.10 auto-filter would mark openai-keyed models reachable but
|
|
653
|
+
// there were no profiles to filter IN. Half-supported is now fully
|
|
654
|
+
// supported. PB request `openai-provider-profiles` (2026-05-16).
|
|
655
|
+
//
|
|
656
|
+
// Profile data verified against developers.openai.com/api/docs/pricing
|
|
657
|
+
// + per-model pages 2026-05-17. L-049/L-081 step-zero: no AI-trained
|
|
658
|
+
// numbers — fetched live from OpenAI's docs. As of 2026-05, OpenAI's
|
|
659
|
+
// current flagship is gpt-5.5 (2025-12 cutoff); gpt-5.4-{base,mini,nano}
|
|
660
|
+
// are the workhorse family. gpt-4.1 + gpt-4o are legacy.
|
|
661
|
+
//
|
|
662
|
+
// Both 5.5 and 5.4 carry a 272K input-token pricing cliff (2x input,
|
|
663
|
+
// 1.5x output beyond that). Modeled as a `downgrade_quality_warning`
|
|
664
|
+
// cliff because it ranks the model down at large-context shapes — the
|
|
665
|
+
// semantics of "this model is now 2x more expensive" map onto the
|
|
666
|
+
// existing penalty mechanism. Cost-watcher will catch high-context
|
|
667
|
+
// spikes empirically; the cliff prevents naive routing into the doubled
|
|
668
|
+
// pricing zone.
|
|
669
|
+
{
|
|
670
|
+
id: "gpt-5.5",
|
|
671
|
+
verifiedAgainstDocs: "2026-05-17",
|
|
672
|
+
provider: "openai",
|
|
673
|
+
status: "current",
|
|
674
|
+
maxContextTokens: 105e4,
|
|
675
|
+
maxOutputTokens: 128e3,
|
|
676
|
+
maxTools: 64,
|
|
677
|
+
parallelToolCalls: true,
|
|
678
|
+
structuredOutput: "native",
|
|
679
|
+
systemPromptMode: "inline",
|
|
680
|
+
streaming: true,
|
|
681
|
+
cliffs: [
|
|
682
|
+
{
|
|
683
|
+
metric: "input_tokens",
|
|
684
|
+
threshold: 272e3,
|
|
685
|
+
action: "downgrade_quality_warning",
|
|
686
|
+
reason: "OpenAI pricing tier shift: >272K input tokens billed at 2x input + 1.5x output rates"
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
costInputPer1m: 5,
|
|
690
|
+
costOutputPer1m: 30,
|
|
691
|
+
lowering: {
|
|
692
|
+
system: { mode: "inline" },
|
|
693
|
+
// OpenAI caching is implicit (auto-applied to repeated prefixes
|
|
694
|
+
// ≥1024 tokens for prompt_tokens_details.cached_tokens). No
|
|
695
|
+
// wire-format marker. Discount: 10x for cached input ($0.50/$5.00).
|
|
696
|
+
cache: { strategy: "unsupported", minTokens: 1024, discount: 0.1 },
|
|
697
|
+
tools: { format: "openai" }
|
|
698
|
+
},
|
|
699
|
+
recovery: [
|
|
700
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate to fallback chain" },
|
|
701
|
+
{ signal: "model_not_found", action: "escalate", reason: "Model deprecated/renamed \u2014 escalate (L-061)" }
|
|
702
|
+
],
|
|
703
|
+
strengths: ["reasoning", "agentic_coding", "long_context", "structured_output", "reliable_tool_use", "reasoning_effort_knob"],
|
|
704
|
+
weaknesses: ["cost", "pricing_cliff_at_272k"],
|
|
705
|
+
notes: "OpenAI frontier (2026-05). 1M context (1.05M total), 128K max output, 2025-12 cutoff. Reasoning effort knob (none/low/medium/high/xhigh). Pricing cliff at 272K input.",
|
|
706
|
+
// Frontier-tier perf hypothesis. Anchored to Opus 4.7 row (similar
|
|
707
|
+
// price/positioning). Brain evidence will refine; no telemetry yet.
|
|
708
|
+
archetypePerf: {
|
|
709
|
+
critique: 9,
|
|
710
|
+
plan: 9,
|
|
711
|
+
generate: 9,
|
|
712
|
+
ask: 9,
|
|
713
|
+
extract: 9,
|
|
714
|
+
transform: 9,
|
|
715
|
+
hunt: 8,
|
|
716
|
+
// parallel tool support good but cliff at 272K hurts deep multi-step
|
|
717
|
+
summarize: 7,
|
|
718
|
+
// overkill for tolerant archetype
|
|
719
|
+
classify: 7
|
|
720
|
+
// overkill; cheaper models cover this
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
id: "gpt-5.4",
|
|
725
|
+
verifiedAgainstDocs: "2026-05-17",
|
|
726
|
+
provider: "openai",
|
|
727
|
+
status: "current",
|
|
728
|
+
maxContextTokens: 105e4,
|
|
729
|
+
maxOutputTokens: 128e3,
|
|
730
|
+
maxTools: 64,
|
|
731
|
+
parallelToolCalls: true,
|
|
732
|
+
structuredOutput: "native",
|
|
733
|
+
systemPromptMode: "inline",
|
|
734
|
+
streaming: true,
|
|
735
|
+
cliffs: [
|
|
736
|
+
{
|
|
737
|
+
metric: "input_tokens",
|
|
738
|
+
threshold: 272e3,
|
|
739
|
+
action: "downgrade_quality_warning",
|
|
740
|
+
reason: "OpenAI pricing tier shift: >272K input tokens billed at 2x input + 1.5x output rates"
|
|
741
|
+
}
|
|
742
|
+
],
|
|
743
|
+
costInputPer1m: 2.5,
|
|
744
|
+
costOutputPer1m: 15,
|
|
745
|
+
lowering: {
|
|
746
|
+
system: { mode: "inline" },
|
|
747
|
+
cache: { strategy: "unsupported", minTokens: 1024, discount: 0.1 },
|
|
748
|
+
tools: { format: "openai" }
|
|
749
|
+
},
|
|
750
|
+
recovery: [
|
|
751
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate to fallback chain" },
|
|
752
|
+
{ signal: "model_not_found", action: "escalate", reason: "Model deprecated/renamed \u2014 escalate (L-061)" }
|
|
753
|
+
],
|
|
754
|
+
strengths: ["reasoning", "long_context", "structured_output", "reliable_tool_use"],
|
|
755
|
+
weaknesses: ["pricing_cliff_at_272k"],
|
|
756
|
+
notes: "OpenAI workhorse (2026-05). 1M context (1.05M total), 128K max output, 2025-08 cutoff. Pricing cliff at 272K input. Pairs cleanly with Sonnet 4.6 on cost ($2.50/$15.00 vs $3.00/$15.00).",
|
|
757
|
+
// Anchored to Sonnet 4.6 row (similar price/positioning). Slight
|
|
758
|
+
// anthropic-side edge on agentic coding per master plan vibe.
|
|
759
|
+
archetypePerf: {
|
|
760
|
+
critique: 8,
|
|
761
|
+
plan: 8,
|
|
762
|
+
generate: 8,
|
|
763
|
+
ask: 8,
|
|
764
|
+
extract: 8,
|
|
765
|
+
transform: 8,
|
|
766
|
+
hunt: 7,
|
|
767
|
+
summarize: 7,
|
|
768
|
+
classify: 7
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
id: "gpt-5.4-mini",
|
|
773
|
+
verifiedAgainstDocs: "2026-05-17",
|
|
774
|
+
provider: "openai",
|
|
775
|
+
status: "current",
|
|
776
|
+
maxContextTokens: 4e5,
|
|
777
|
+
maxOutputTokens: 128e3,
|
|
778
|
+
maxTools: 64,
|
|
779
|
+
parallelToolCalls: true,
|
|
780
|
+
structuredOutput: "native",
|
|
781
|
+
systemPromptMode: "inline",
|
|
782
|
+
streaming: true,
|
|
783
|
+
cliffs: [],
|
|
784
|
+
costInputPer1m: 0.75,
|
|
785
|
+
costOutputPer1m: 4.5,
|
|
786
|
+
lowering: {
|
|
787
|
+
system: { mode: "inline" },
|
|
788
|
+
cache: { strategy: "unsupported", minTokens: 1024, discount: 0.1 },
|
|
789
|
+
tools: { format: "openai" }
|
|
790
|
+
},
|
|
791
|
+
recovery: [
|
|
792
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate to fallback chain" },
|
|
793
|
+
{ signal: "model_not_found", action: "escalate", reason: "Model deprecated/renamed \u2014 escalate (L-061)" }
|
|
794
|
+
],
|
|
795
|
+
strengths: ["cost", "speed", "agentic_coding", "structured_output", "reliable_tool_use"],
|
|
796
|
+
weaknesses: ["reasoning_depth"],
|
|
797
|
+
notes: "OpenAI mini-tier (2026-05). 400K context, 128K max output, 2025-08 cutoff. OpenAI describes as 'strongest mini model for coding, computer use, subagents.' Cache discount 10x ($0.075 input).",
|
|
798
|
+
// Mini-tier hypothesis. Anchored to Haiku 4.5 + Flash row pricing.
|
|
799
|
+
// Cost is slightly higher than Haiku ($0.75 vs $0.50 input) but
|
|
800
|
+
// OpenAI claims strong coding/subagent perf.
|
|
801
|
+
archetypePerf: {
|
|
802
|
+
ask: 7,
|
|
803
|
+
generate: 7,
|
|
804
|
+
extract: 7,
|
|
805
|
+
transform: 7,
|
|
806
|
+
classify: 7,
|
|
807
|
+
summarize: 7,
|
|
808
|
+
hunt: 7,
|
|
809
|
+
plan: 6,
|
|
810
|
+
critique: 5
|
|
811
|
+
// reasoning depth gap — frontier models handle this
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
id: "gpt-5.4-nano",
|
|
816
|
+
verifiedAgainstDocs: "2026-05-17",
|
|
817
|
+
provider: "openai",
|
|
818
|
+
status: "current",
|
|
819
|
+
maxContextTokens: 4e5,
|
|
820
|
+
maxOutputTokens: 128e3,
|
|
821
|
+
maxTools: 64,
|
|
822
|
+
parallelToolCalls: true,
|
|
823
|
+
structuredOutput: "native",
|
|
824
|
+
systemPromptMode: "inline",
|
|
825
|
+
streaming: true,
|
|
826
|
+
cliffs: [],
|
|
827
|
+
costInputPer1m: 0.2,
|
|
828
|
+
costOutputPer1m: 1.25,
|
|
829
|
+
lowering: {
|
|
830
|
+
system: { mode: "inline" },
|
|
831
|
+
cache: { strategy: "unsupported", minTokens: 1024, discount: 0.1 },
|
|
832
|
+
tools: { format: "openai" }
|
|
833
|
+
},
|
|
834
|
+
recovery: [
|
|
835
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate to fallback chain" },
|
|
836
|
+
{ signal: "model_not_found", action: "escalate", reason: "Model deprecated/renamed \u2014 escalate (L-061)" }
|
|
837
|
+
],
|
|
838
|
+
strengths: ["cost", "speed", "volume", "structured_output"],
|
|
839
|
+
weaknesses: ["reasoning_depth", "no_computer_use"],
|
|
840
|
+
notes: "OpenAI nano-tier (2026-05). 400K context, 128K max output, 2025-08 cutoff. 'Cheapest GPT-5.4-class for simple high-volume tasks.' No fine-tuning, no computer-use tools. Cache discount 10x.",
|
|
841
|
+
// Nano-tier. Anchored to Flash-Lite row ($0.10/$0.40 vs nano's
|
|
842
|
+
// $0.20/$1.25). Slightly more expensive than Flash-Lite but with
|
|
843
|
+
// OpenAI brand reliability. Good fit for classify/summarize floor.
|
|
844
|
+
archetypePerf: {
|
|
845
|
+
classify: 7,
|
|
846
|
+
summarize: 6,
|
|
847
|
+
ask: 6,
|
|
848
|
+
transform: 6,
|
|
849
|
+
extract: 6,
|
|
850
|
+
generate: 5,
|
|
851
|
+
hunt: 5,
|
|
852
|
+
plan: 4,
|
|
853
|
+
critique: 3
|
|
854
|
+
// not for reasoning archetypes
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
// ── Auto-onboarded (UNVERIFIED) ──
|
|
858
|
+
// Cloned by scripts/auto-onboard-models.mjs from a same-family template.
|
|
859
|
+
// Each entry's pricing/context/cliffs/lowering reflects the template, NOT
|
|
860
|
+
// provider docs. Verify before promoting status to 'current' (L-049/L-081).
|
|
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.
|
|
873
|
+
id: "gemini-3-flash-preview",
|
|
874
|
+
verifiedAgainstDocs: "2026-05-21",
|
|
875
|
+
provider: "google",
|
|
876
|
+
status: "preview",
|
|
877
|
+
maxContextTokens: 1048576,
|
|
878
|
+
maxOutputTokens: 65536,
|
|
879
|
+
maxTools: 128,
|
|
880
|
+
parallelToolCalls: true,
|
|
881
|
+
structuredOutput: "native",
|
|
882
|
+
systemPromptMode: "separate",
|
|
883
|
+
streaming: true,
|
|
884
|
+
cliffs: [
|
|
885
|
+
{
|
|
886
|
+
metric: "input_tokens",
|
|
887
|
+
threshold: 8e3,
|
|
888
|
+
action: "downgrade_quality_warning",
|
|
889
|
+
reason: "Inherited from 2.5-flash guard; brain evidence on Gemini 3 long-context quality will validate/relax"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
metric: "tool_count",
|
|
893
|
+
threshold: 20,
|
|
894
|
+
action: "drop_to_top_relevant",
|
|
895
|
+
reason: "Tool reliability drops above ~20 tools (despite 128 hard limit) \u2014 inherited from Flash family"
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
metric: "thinking_with_short_output",
|
|
899
|
+
threshold: 1,
|
|
900
|
+
action: "force_thinking_budget_zero",
|
|
901
|
+
reason: "Thinking tokens consume maxOutputTokens \u2014 empty response if drained"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
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.
|
|
907
|
+
metric: "tool_count",
|
|
908
|
+
threshold: 1,
|
|
909
|
+
whenIntent: "summarize",
|
|
910
|
+
action: "strip_tools",
|
|
911
|
+
reason: "Inherited from 2.5-flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on 3-flash-preview specifically."
|
|
912
|
+
}
|
|
913
|
+
],
|
|
914
|
+
costInputPer1m: 0.5,
|
|
915
|
+
costOutputPer1m: 3,
|
|
916
|
+
lowering: {
|
|
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 },
|
|
920
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
921
|
+
},
|
|
922
|
+
recovery: [
|
|
923
|
+
{
|
|
924
|
+
signal: "empty_response_after_tool",
|
|
925
|
+
action: "retry_with_params",
|
|
926
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
927
|
+
maxRetries: 1,
|
|
928
|
+
reason: "Known: empty after tool result \u2014 retry with thinking off"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
signal: "empty_response",
|
|
932
|
+
action: "retry_with_params",
|
|
933
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
934
|
+
maxRetries: 1,
|
|
935
|
+
reason: "Empty response \u2014 try with thinking off"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
signal: "malformed_function_call",
|
|
939
|
+
action: "escalate",
|
|
940
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target"
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
strengths: ["speed", "volume", "classification", "1m_context", "cost"],
|
|
944
|
+
weaknesses: ["complex_schemas", "large_tool_sets", "high_context_quality"],
|
|
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.
|
|
949
|
+
archetypePerf: {
|
|
950
|
+
hunt: 9,
|
|
951
|
+
// Inherits 2.5-flash L-040 parallel-tool tier; Google positions 3 as agentic-loop upgrade
|
|
952
|
+
classify: 7,
|
|
953
|
+
// Inherits 2.5-flash brain-validated tier (218 rows on 2.5)
|
|
954
|
+
summarize: 7,
|
|
955
|
+
// Inherits 2.5-flash; cliff strips tools when present
|
|
956
|
+
transform: 7,
|
|
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
|
|
963
|
+
extract: 6,
|
|
964
|
+
critique: 5
|
|
965
|
+
// +1 vs 2.5-flash — but still below Sonnet/Opus reasoning floor
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
{
|
|
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.
|
|
982
|
+
id: "gemini-3.1-flash-lite",
|
|
983
|
+
verifiedAgainstDocs: "2026-05-21",
|
|
984
|
+
provider: "google",
|
|
985
|
+
status: "preview",
|
|
986
|
+
maxContextTokens: 1048576,
|
|
987
|
+
maxOutputTokens: 65536,
|
|
988
|
+
maxTools: 128,
|
|
989
|
+
parallelToolCalls: true,
|
|
990
|
+
structuredOutput: "native",
|
|
991
|
+
systemPromptMode: "separate",
|
|
992
|
+
streaming: true,
|
|
993
|
+
cliffs: [
|
|
994
|
+
{
|
|
995
|
+
metric: "input_tokens",
|
|
996
|
+
threshold: 8e3,
|
|
997
|
+
action: "downgrade_quality_warning",
|
|
998
|
+
reason: "Inherited from Flash: quality degrades above ~8K. Smaller model \u2014 likely degrades faster. Re-tune from brain after n\u226520."
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
metric: "tool_count",
|
|
1002
|
+
threshold: 10,
|
|
1003
|
+
action: "drop_to_top_relevant",
|
|
1004
|
+
reason: "Conservative: Flash drops at 20, Flash-Lite is smaller \u2014 assume tighter ceiling until brain proves otherwise."
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
metric: "thinking_with_short_output",
|
|
1008
|
+
threshold: 1,
|
|
1009
|
+
action: "force_thinking_budget_zero",
|
|
1010
|
+
reason: "Thinking enabled per Google API (thinking: true). Same drain risk as Flash \u2014 thinking tokens consume maxOutputTokens."
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
// Strong prior: Flash hit 5/5 empty rate on summarize+tools (s11
|
|
1014
|
+
// trust artifact, kgauto commit 3872832). Flash-Lite shares the
|
|
1015
|
+
// same architectural family — almost certainly inherits this cliff.
|
|
1016
|
+
// Ship the guard preemptively; brain telemetry confirms or relaxes.
|
|
1017
|
+
metric: "tool_count",
|
|
1018
|
+
threshold: 1,
|
|
1019
|
+
whenIntent: "summarize",
|
|
1020
|
+
action: "strip_tools",
|
|
1021
|
+
reason: "Inherited from Flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on Flash-Lite specifically."
|
|
1022
|
+
}
|
|
1023
|
+
],
|
|
1024
|
+
costInputPer1m: 0.25,
|
|
1025
|
+
costOutputPer1m: 1.5,
|
|
1026
|
+
lowering: {
|
|
1027
|
+
...GOOGLE_LOWERING_BASE,
|
|
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).
|
|
1030
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
1031
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
1032
|
+
},
|
|
1033
|
+
recovery: [
|
|
1034
|
+
{
|
|
1035
|
+
signal: "empty_response_after_tool",
|
|
1036
|
+
action: "retry_with_params",
|
|
1037
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1038
|
+
maxRetries: 1,
|
|
1039
|
+
reason: "Known on Flash family: empty after tool result \u2014 retry with thinking off."
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
signal: "empty_response",
|
|
1043
|
+
action: "retry_with_params",
|
|
1044
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1045
|
+
maxRetries: 1,
|
|
1046
|
+
reason: "Empty response \u2014 try with thinking off."
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
signal: "malformed_function_call",
|
|
1050
|
+
action: "escalate",
|
|
1051
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target."
|
|
1052
|
+
}
|
|
1053
|
+
],
|
|
1054
|
+
strengths: ["low_cost", "speed", "volume", "classification", "summarize", "1m_context", "cache_friendly"],
|
|
1055
|
+
weaknesses: ["complex_reasoning", "large_tool_sets", "complex_schemas", "structured_output_unproven", "long_context_quality"],
|
|
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.
|
|
1061
|
+
archetypePerf: {
|
|
1062
|
+
classify: 6,
|
|
1063
|
+
// starter hypothesis — verify (Flash is 7, lite likely ≤)
|
|
1064
|
+
summarize: 6,
|
|
1065
|
+
// starter hypothesis — verify; cliff strips tools
|
|
1066
|
+
transform: 6,
|
|
1067
|
+
// starter hypothesis — verify
|
|
1068
|
+
ask: 5,
|
|
1069
|
+
hunt: 5,
|
|
1070
|
+
generate: 4,
|
|
1071
|
+
extract: 4,
|
|
1072
|
+
plan: 3,
|
|
1073
|
+
critique: 3
|
|
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
|
+
}
|
|
397
1194
|
}
|
|
398
1195
|
];
|
|
399
1196
|
var ALIASES = {
|
|
@@ -403,14 +1200,20 @@ var ALIASES = {
|
|
|
403
1200
|
// Legacy kgauto typo — actual API alias is dash-form (alpha.1 had dot).
|
|
404
1201
|
"claude-haiku-4.5": "claude-haiku-4-5"
|
|
405
1202
|
};
|
|
1203
|
+
var brainHook = {};
|
|
1204
|
+
function _setProfileBrainHook(hook) {
|
|
1205
|
+
brainHook = hook;
|
|
1206
|
+
}
|
|
406
1207
|
function canonicalId(id) {
|
|
407
|
-
return ALIASES[id] ?? id;
|
|
1208
|
+
return brainHook.resolveAlias?.(id) ?? ALIASES[id] ?? id;
|
|
408
1209
|
}
|
|
409
1210
|
var PROFILE_INDEX = new Map(
|
|
410
1211
|
PROFILES_RAW.map((p) => [p.id, p])
|
|
411
1212
|
);
|
|
412
1213
|
function getProfile(id) {
|
|
413
1214
|
const canonical = canonicalId(id);
|
|
1215
|
+
const fromBrain = brainHook.getProfile?.(canonical);
|
|
1216
|
+
if (fromBrain) return fromBrain;
|
|
414
1217
|
const p = PROFILE_INDEX.get(canonical);
|
|
415
1218
|
if (!p) {
|
|
416
1219
|
const known = [...PROFILE_INDEX.keys(), ...Object.keys(ALIASES)].join(", ");
|
|
@@ -419,18 +1222,24 @@ function getProfile(id) {
|
|
|
419
1222
|
return p;
|
|
420
1223
|
}
|
|
421
1224
|
function tryGetProfile(id) {
|
|
422
|
-
|
|
1225
|
+
const canonical = canonicalId(id);
|
|
1226
|
+
return brainHook.getProfile?.(canonical) ?? PROFILE_INDEX.get(canonical);
|
|
423
1227
|
}
|
|
424
1228
|
function allProfiles() {
|
|
425
1229
|
return PROFILES_RAW;
|
|
426
1230
|
}
|
|
1231
|
+
function allProfilesRaw() {
|
|
1232
|
+
return PROFILES_RAW;
|
|
1233
|
+
}
|
|
427
1234
|
function profilesByProvider(provider) {
|
|
428
1235
|
return PROFILES_RAW.filter((p) => p.provider === provider);
|
|
429
1236
|
}
|
|
430
1237
|
// Annotate the CommonJS export names for ESM import in node:
|
|
431
1238
|
0 && (module.exports = {
|
|
432
1239
|
ALIASES,
|
|
1240
|
+
_setProfileBrainHook,
|
|
433
1241
|
allProfiles,
|
|
1242
|
+
allProfilesRaw,
|
|
434
1243
|
getProfile,
|
|
435
1244
|
profilesByProvider,
|
|
436
1245
|
tryGetProfile
|