@warmdrift/kgauto-compiler 2.0.0-alpha.10
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 +240 -0
- package/dist/chunk-3KVKELZN.mjs +657 -0
- package/dist/chunk-5TI6PNSK.mjs +95 -0
- package/dist/dialect.d.mts +99 -0
- package/dist/dialect.d.ts +99 -0
- package/dist/dialect.js +127 -0
- package/dist/dialect.mjs +22 -0
- package/dist/index.d.mts +509 -0
- package/dist/index.d.ts +509 -0
- package/dist/index.js +2559 -0
- package/dist/index.mjs +1784 -0
- package/dist/profiles-Bgri1pe7.d.ts +728 -0
- package/dist/profiles-DO6R9moS.d.mts +728 -0
- package/dist/profiles.d.mts +2 -0
- package/dist/profiles.d.ts +2 -0
- package/dist/profiles.js +685 -0
- package/dist/profiles.mjs +14 -0
- package/package.json +59 -0
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
// src/profiles.ts
|
|
2
|
+
var ANTHROPIC_LOWERING_BASE = {
|
|
3
|
+
system: { mode: "inline" },
|
|
4
|
+
cache: {
|
|
5
|
+
strategy: "cache_control",
|
|
6
|
+
minTokens: 1024,
|
|
7
|
+
discount: 0.1,
|
|
8
|
+
ttlSeconds: 300
|
|
9
|
+
},
|
|
10
|
+
tools: { format: "anthropic" }
|
|
11
|
+
};
|
|
12
|
+
var GOOGLE_LOWERING_BASE = {
|
|
13
|
+
system: { mode: "separate", field: "systemInstruction" },
|
|
14
|
+
cache: {
|
|
15
|
+
strategy: "cachedContent",
|
|
16
|
+
minTokens: 4096,
|
|
17
|
+
discount: 0.25,
|
|
18
|
+
ttlSeconds: 3600
|
|
19
|
+
},
|
|
20
|
+
tools: { format: "google" }
|
|
21
|
+
};
|
|
22
|
+
var PROFILES_RAW = [
|
|
23
|
+
// ── Anthropic ──
|
|
24
|
+
{
|
|
25
|
+
id: "claude-opus-4-7",
|
|
26
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
27
|
+
provider: "anthropic",
|
|
28
|
+
status: "current",
|
|
29
|
+
maxContextTokens: 1e6,
|
|
30
|
+
maxOutputTokens: 128e3,
|
|
31
|
+
maxTools: 64,
|
|
32
|
+
parallelToolCalls: true,
|
|
33
|
+
structuredOutput: "grammar",
|
|
34
|
+
systemPromptMode: "inline",
|
|
35
|
+
streaming: true,
|
|
36
|
+
cliffs: [],
|
|
37
|
+
costInputPer1m: 5,
|
|
38
|
+
costOutputPer1m: 25,
|
|
39
|
+
lowering: ANTHROPIC_LOWERING_BASE,
|
|
40
|
+
recovery: [
|
|
41
|
+
{
|
|
42
|
+
signal: "rate_limit",
|
|
43
|
+
action: "escalate",
|
|
44
|
+
reason: "429 from Anthropic \u2014 escalate to fallback chain"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
signal: "model_not_found",
|
|
48
|
+
action: "escalate",
|
|
49
|
+
reason: "Model deprecated/renamed \u2014 escalate (L-061)"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
strengths: ["reasoning", "agentic_coding", "long_context", "reliable_tool_use", "structured_output"],
|
|
53
|
+
weaknesses: ["cost", "latency"],
|
|
54
|
+
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.",
|
|
55
|
+
// Frontier perf. Drops on archetypes where parallel-tool throughput
|
|
56
|
+
// (hunt) or low-budget cost-sensitivity (classify/summarize) matters
|
|
57
|
+
// more than reasoning depth.
|
|
58
|
+
archetypePerf: {
|
|
59
|
+
critique: 10,
|
|
60
|
+
plan: 10,
|
|
61
|
+
generate: 9,
|
|
62
|
+
ask: 9,
|
|
63
|
+
extract: 9,
|
|
64
|
+
transform: 9,
|
|
65
|
+
hunt: 8,
|
|
66
|
+
// strong but Flash dominates parallel tool throughput
|
|
67
|
+
summarize: 8,
|
|
68
|
+
// overkill for tolerant archetype; cost-out of frontier
|
|
69
|
+
classify: 8
|
|
70
|
+
// overkill; brain-validated cheaper models cover this
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "claude-opus-4-6",
|
|
75
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
76
|
+
provider: "anthropic",
|
|
77
|
+
status: "legacy",
|
|
78
|
+
maxContextTokens: 1e6,
|
|
79
|
+
maxOutputTokens: 128e3,
|
|
80
|
+
maxTools: 64,
|
|
81
|
+
parallelToolCalls: true,
|
|
82
|
+
structuredOutput: "grammar",
|
|
83
|
+
systemPromptMode: "inline",
|
|
84
|
+
streaming: true,
|
|
85
|
+
cliffs: [],
|
|
86
|
+
costInputPer1m: 5,
|
|
87
|
+
costOutputPer1m: 25,
|
|
88
|
+
lowering: ANTHROPIC_LOWERING_BASE,
|
|
89
|
+
recovery: [
|
|
90
|
+
{
|
|
91
|
+
signal: "rate_limit",
|
|
92
|
+
action: "escalate",
|
|
93
|
+
reason: "429 from Anthropic \u2014 escalate to fallback chain"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
signal: "model_not_found",
|
|
97
|
+
action: "escalate",
|
|
98
|
+
reason: "Model deprecated/renamed \u2014 escalate (L-061)"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
strengths: ["reasoning", "long_context", "reliable_tool_use", "structured_output", "extended_thinking"],
|
|
102
|
+
weaknesses: ["cost", "latency"],
|
|
103
|
+
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).",
|
|
104
|
+
// One notch below 4.7 across the board — extended-thinking edge does
|
|
105
|
+
// not flip any archetype ranking. Legacy: chains should prefer 4.7.
|
|
106
|
+
archetypePerf: {
|
|
107
|
+
critique: 9,
|
|
108
|
+
plan: 9,
|
|
109
|
+
generate: 9,
|
|
110
|
+
ask: 9,
|
|
111
|
+
extract: 9,
|
|
112
|
+
transform: 9,
|
|
113
|
+
hunt: 7,
|
|
114
|
+
summarize: 8,
|
|
115
|
+
classify: 8
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "claude-sonnet-4-6",
|
|
120
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
121
|
+
provider: "anthropic",
|
|
122
|
+
status: "current",
|
|
123
|
+
maxContextTokens: 1e6,
|
|
124
|
+
maxOutputTokens: 64e3,
|
|
125
|
+
maxTools: 64,
|
|
126
|
+
parallelToolCalls: true,
|
|
127
|
+
structuredOutput: "grammar",
|
|
128
|
+
systemPromptMode: "inline",
|
|
129
|
+
streaming: true,
|
|
130
|
+
cliffs: [],
|
|
131
|
+
costInputPer1m: 3,
|
|
132
|
+
costOutputPer1m: 15,
|
|
133
|
+
lowering: ANTHROPIC_LOWERING_BASE,
|
|
134
|
+
recovery: [
|
|
135
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate" },
|
|
136
|
+
{ signal: "model_not_found", action: "escalate", reason: "Deprecated \u2014 escalate (L-061)" }
|
|
137
|
+
],
|
|
138
|
+
strengths: ["quality", "tool_use", "long_context", "cache_friendly", "extended_thinking"],
|
|
139
|
+
weaknesses: [],
|
|
140
|
+
notes: "Workhorse. Best price/quality for most multi-turn agentic work. 1M context, 64k max output.",
|
|
141
|
+
// Master plan §6.2 anchor. Tier 0 for plan/generate/ask/extract/transform
|
|
142
|
+
// in starter chains; tier 1 cross-provider for hunt/summarize/classify.
|
|
143
|
+
archetypePerf: {
|
|
144
|
+
ask: 9,
|
|
145
|
+
generate: 9,
|
|
146
|
+
plan: 9,
|
|
147
|
+
critique: 9,
|
|
148
|
+
extract: 9,
|
|
149
|
+
transform: 9,
|
|
150
|
+
hunt: 7,
|
|
151
|
+
// strong but Flash beats on parallel tool throughput
|
|
152
|
+
summarize: 8,
|
|
153
|
+
// overkill for tolerant archetype
|
|
154
|
+
classify: 8
|
|
155
|
+
// overkill
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: "claude-haiku-4-5",
|
|
160
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
161
|
+
provider: "anthropic",
|
|
162
|
+
status: "current",
|
|
163
|
+
maxContextTokens: 2e5,
|
|
164
|
+
maxOutputTokens: 64e3,
|
|
165
|
+
maxTools: 32,
|
|
166
|
+
parallelToolCalls: true,
|
|
167
|
+
structuredOutput: "grammar",
|
|
168
|
+
systemPromptMode: "inline",
|
|
169
|
+
streaming: true,
|
|
170
|
+
cliffs: [
|
|
171
|
+
{
|
|
172
|
+
metric: "tool_count",
|
|
173
|
+
threshold: 16,
|
|
174
|
+
action: "drop_to_top_relevant",
|
|
175
|
+
reason: "Haiku reliability degrades above ~16 tools"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
costInputPer1m: 1,
|
|
179
|
+
costOutputPer1m: 5,
|
|
180
|
+
lowering: ANTHROPIC_LOWERING_BASE,
|
|
181
|
+
recovery: [
|
|
182
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate to Sonnet" }
|
|
183
|
+
],
|
|
184
|
+
strengths: ["speed", "cost", "classification", "cache_friendly", "extended_thinking"],
|
|
185
|
+
weaknesses: ["complex_reasoning", "large_tool_sets"],
|
|
186
|
+
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`.",
|
|
187
|
+
// Tier 1 cross-provider anchor for short-output chains (classify/
|
|
188
|
+
// summarize/extract/transform). Falls off on plan/critique where
|
|
189
|
+
// reasoning depth matters; competes with Pro on cost+latency.
|
|
190
|
+
archetypePerf: {
|
|
191
|
+
classify: 8,
|
|
192
|
+
summarize: 8,
|
|
193
|
+
ask: 7,
|
|
194
|
+
transform: 7,
|
|
195
|
+
extract: 7,
|
|
196
|
+
hunt: 6,
|
|
197
|
+
// tool reliability drops at 16 — cliff guard fires
|
|
198
|
+
generate: 6,
|
|
199
|
+
plan: 5,
|
|
200
|
+
critique: 4
|
|
201
|
+
// reasoning depth gap vs Sonnet/Opus
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
// ── Google ──
|
|
205
|
+
{
|
|
206
|
+
id: "gemini-2.5-flash",
|
|
207
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
208
|
+
provider: "google",
|
|
209
|
+
status: "current",
|
|
210
|
+
maxContextTokens: 1048576,
|
|
211
|
+
maxOutputTokens: 65535,
|
|
212
|
+
maxTools: 128,
|
|
213
|
+
parallelToolCalls: true,
|
|
214
|
+
structuredOutput: "native",
|
|
215
|
+
systemPromptMode: "separate",
|
|
216
|
+
streaming: true,
|
|
217
|
+
cliffs: [
|
|
218
|
+
{
|
|
219
|
+
metric: "input_tokens",
|
|
220
|
+
threshold: 8e3,
|
|
221
|
+
action: "downgrade_quality_warning",
|
|
222
|
+
reason: "Quality degrades significantly above ~8K context tokens"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
metric: "tool_count",
|
|
226
|
+
threshold: 20,
|
|
227
|
+
action: "drop_to_top_relevant",
|
|
228
|
+
reason: "Tool reliability drops above ~20 tools (despite 128 hard limit)"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
metric: "thinking_with_short_output",
|
|
232
|
+
threshold: 1,
|
|
233
|
+
action: "force_thinking_budget_zero",
|
|
234
|
+
reason: "Thinking tokens consume maxOutputTokens \u2014 empty response if drained"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
// s11 trust artifact (2026-05-02): brain showed 5/5 empty rate on
|
|
238
|
+
// tt-intelligence/summarize/gemini-2.5-flash with tools offered.
|
|
239
|
+
// v1's disable_thinking_for_short_output already fired and didn't
|
|
240
|
+
// help — disabling thinking is necessary but not sufficient. Tools
|
|
241
|
+
// present + summarize intent confuses Flash into a no-output state
|
|
242
|
+
// (likely tool-decision purgatory). Strip tools entirely for this
|
|
243
|
+
// archetype on this model.
|
|
244
|
+
metric: "tool_count",
|
|
245
|
+
threshold: 1,
|
|
246
|
+
whenIntent: "summarize",
|
|
247
|
+
action: "strip_tools",
|
|
248
|
+
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)"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
costInputPer1m: 0.3,
|
|
252
|
+
costOutputPer1m: 2.5,
|
|
253
|
+
lowering: {
|
|
254
|
+
...GOOGLE_LOWERING_BASE,
|
|
255
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
256
|
+
},
|
|
257
|
+
recovery: [
|
|
258
|
+
{
|
|
259
|
+
signal: "empty_response_after_tool",
|
|
260
|
+
action: "retry_with_params",
|
|
261
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
262
|
+
maxRetries: 1,
|
|
263
|
+
reason: "Known: empty after tool result \u2014 retry with thinking off"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
signal: "empty_response",
|
|
267
|
+
action: "retry_with_params",
|
|
268
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
269
|
+
maxRetries: 1,
|
|
270
|
+
reason: "Empty response \u2014 try with thinking off"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
signal: "malformed_function_call",
|
|
274
|
+
action: "escalate",
|
|
275
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
strengths: ["speed", "volume", "classification", "1m_context", "cost"],
|
|
279
|
+
weaknesses: ["complex_schemas", "large_tool_sets", "high_context_quality"],
|
|
280
|
+
notes: "Fast and cheap with 1M context. Quality cliffs at 8K context and 20 tools \u2014 guard with cliffs.",
|
|
281
|
+
// Master plan §6.2 anchor. Tier 0 for hunt (parallel tool throughput
|
|
282
|
+
// 15-75 calls/step beats Sonnet — L-040), summarize, classify.
|
|
283
|
+
archetypePerf: {
|
|
284
|
+
hunt: 9,
|
|
285
|
+
// L-040: parallel tool throughput 15-75/step
|
|
286
|
+
classify: 7,
|
|
287
|
+
// brain-validated, 218 rows
|
|
288
|
+
summarize: 7,
|
|
289
|
+
// brain-validated; cliff strips tools when present
|
|
290
|
+
transform: 7,
|
|
291
|
+
ask: 7,
|
|
292
|
+
generate: 6,
|
|
293
|
+
plan: 5,
|
|
294
|
+
extract: 6,
|
|
295
|
+
// alpha.8 MAX_TOKENS history on structured output
|
|
296
|
+
critique: 4
|
|
297
|
+
// reasoning shallower than Sonnet/Opus
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
// ── Gemini 2.5 Flash-Lite ──
|
|
302
|
+
// Onboarded 2026-05-13 (s22) after the model-release watcher surfaced
|
|
303
|
+
// it as a UNREGISTERED + NEW candidate. Released by Google July 2025,
|
|
304
|
+
// stable. Positioned BELOW Flash on the cost/perf frontier:
|
|
305
|
+
// input $0.10/M (Flash $0.30/M) — 3× cheaper
|
|
306
|
+
// output $0.40/M (Flash $2.50/M) — 6× cheaper
|
|
307
|
+
// cache $0.01/M — 1/10 of input (vs Flash 0.25 discount)
|
|
308
|
+
// Cliffs are HYPOTHESIZED from Flash's known failure modes — Flash-Lite
|
|
309
|
+
// is a smaller sibling, so we inherit Flash's cliffs at equal-or-tighter
|
|
310
|
+
// thresholds. The brain will validate/relax these as evidence accumulates
|
|
311
|
+
// per (archetype, model) tuple. Currently ZERO brain rows for this model.
|
|
312
|
+
id: "gemini-2.5-flash-lite",
|
|
313
|
+
verifiedAgainstDocs: "2026-05-13",
|
|
314
|
+
provider: "google",
|
|
315
|
+
status: "current",
|
|
316
|
+
maxContextTokens: 1048576,
|
|
317
|
+
maxOutputTokens: 65536,
|
|
318
|
+
maxTools: 128,
|
|
319
|
+
parallelToolCalls: true,
|
|
320
|
+
structuredOutput: "native",
|
|
321
|
+
systemPromptMode: "separate",
|
|
322
|
+
streaming: true,
|
|
323
|
+
cliffs: [
|
|
324
|
+
{
|
|
325
|
+
metric: "input_tokens",
|
|
326
|
+
threshold: 8e3,
|
|
327
|
+
action: "downgrade_quality_warning",
|
|
328
|
+
reason: "Inherited from Flash: quality degrades above ~8K. Smaller model \u2014 likely degrades faster. Re-tune from brain after n\u226520."
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
metric: "tool_count",
|
|
332
|
+
threshold: 10,
|
|
333
|
+
action: "drop_to_top_relevant",
|
|
334
|
+
reason: "Conservative: Flash drops at 20, Flash-Lite is smaller \u2014 assume tighter ceiling until brain proves otherwise."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
metric: "thinking_with_short_output",
|
|
338
|
+
threshold: 1,
|
|
339
|
+
action: "force_thinking_budget_zero",
|
|
340
|
+
reason: "Thinking enabled per Google API (thinking: true). Same drain risk as Flash \u2014 thinking tokens consume maxOutputTokens."
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
// Strong prior: Flash hit 5/5 empty rate on summarize+tools (s11
|
|
344
|
+
// trust artifact, kgauto commit 3872832). Flash-Lite shares the
|
|
345
|
+
// same architectural family — almost certainly inherits this cliff.
|
|
346
|
+
// Ship the guard preemptively; brain telemetry confirms or relaxes.
|
|
347
|
+
metric: "tool_count",
|
|
348
|
+
threshold: 1,
|
|
349
|
+
whenIntent: "summarize",
|
|
350
|
+
action: "strip_tools",
|
|
351
|
+
reason: "Inherited from Flash s11 cliff: summarize+tools \u2192 empty response. Preemptive guard until brain evidence on Flash-Lite specifically."
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
costInputPer1m: 0.1,
|
|
355
|
+
costOutputPer1m: 0.4,
|
|
356
|
+
lowering: {
|
|
357
|
+
...GOOGLE_LOWERING_BASE,
|
|
358
|
+
// Cache discount 10× (vs Flash 4×) — Google's spec is $0.01/M cache vs
|
|
359
|
+
// $0.10/M input. Material for repeat-prompt workloads (classify shape).
|
|
360
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
361
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
362
|
+
},
|
|
363
|
+
recovery: [
|
|
364
|
+
{
|
|
365
|
+
signal: "empty_response_after_tool",
|
|
366
|
+
action: "retry_with_params",
|
|
367
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
368
|
+
maxRetries: 1,
|
|
369
|
+
reason: "Known on Flash family: empty after tool result \u2014 retry with thinking off."
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
signal: "empty_response",
|
|
373
|
+
action: "retry_with_params",
|
|
374
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
375
|
+
maxRetries: 1,
|
|
376
|
+
reason: "Empty response \u2014 try with thinking off."
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
signal: "malformed_function_call",
|
|
380
|
+
action: "escalate",
|
|
381
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target."
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
strengths: ["lowest_cost", "speed", "volume", "classification", "summarize", "1m_context", "cache_friendly"],
|
|
385
|
+
weaknesses: ["complex_reasoning", "large_tool_sets", "complex_schemas", "structured_output_unproven", "long_context_quality"],
|
|
386
|
+
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.",
|
|
387
|
+
// Tier 3 emergency floor for summarize/classify chains. ZERO brain
|
|
388
|
+
// rows — all values are starter hypotheses anchored to "smaller
|
|
389
|
+
// sibling of Flash, at-or-below Flash perf on every archetype." The
|
|
390
|
+
// first 50 brain rows per archetype will validate or relax these.
|
|
391
|
+
archetypePerf: {
|
|
392
|
+
classify: 6,
|
|
393
|
+
// starter hypothesis — verify (Flash is 7, lite likely ≤)
|
|
394
|
+
summarize: 6,
|
|
395
|
+
// starter hypothesis — verify; cliff strips tools
|
|
396
|
+
transform: 6,
|
|
397
|
+
// starter hypothesis — verify
|
|
398
|
+
ask: 5,
|
|
399
|
+
hunt: 5,
|
|
400
|
+
generate: 4,
|
|
401
|
+
extract: 4,
|
|
402
|
+
plan: 3,
|
|
403
|
+
critique: 3
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: "gemini-2.5-pro",
|
|
408
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
409
|
+
provider: "google",
|
|
410
|
+
status: "current",
|
|
411
|
+
maxContextTokens: 1048576,
|
|
412
|
+
maxOutputTokens: 65535,
|
|
413
|
+
maxTools: 128,
|
|
414
|
+
parallelToolCalls: true,
|
|
415
|
+
structuredOutput: "native",
|
|
416
|
+
systemPromptMode: "separate",
|
|
417
|
+
streaming: true,
|
|
418
|
+
cliffs: [
|
|
419
|
+
{
|
|
420
|
+
metric: "input_tokens",
|
|
421
|
+
threshold: 2e5,
|
|
422
|
+
action: "downgrade_quality_warning",
|
|
423
|
+
reason: "Pricing doubles above 200K: input $1.25\u2192$2.50/M, output $10\u2192$15/M"
|
|
424
|
+
}
|
|
425
|
+
],
|
|
426
|
+
costInputPer1m: 1.25,
|
|
427
|
+
costOutputPer1m: 10,
|
|
428
|
+
lowering: {
|
|
429
|
+
...GOOGLE_LOWERING_BASE,
|
|
430
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
431
|
+
},
|
|
432
|
+
recovery: [
|
|
433
|
+
{
|
|
434
|
+
signal: "malformed_function_call",
|
|
435
|
+
action: "escalate",
|
|
436
|
+
reason: "MALFORMED_FUNCTION_CALL \u2014 escalate"
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
strengths: ["reasoning", "1m_context", "structured_output", "tool_use"],
|
|
440
|
+
weaknesses: ["pricing_above_200k"],
|
|
441
|
+
// Master plan §3.3 anchor: tier-2 cross-provider in almost every chain.
|
|
442
|
+
// Sits on the frontier at perf-9 — close to Sonnet but cheaper input.
|
|
443
|
+
archetypePerf: {
|
|
444
|
+
critique: 9,
|
|
445
|
+
plan: 9,
|
|
446
|
+
ask: 8,
|
|
447
|
+
generate: 8,
|
|
448
|
+
extract: 8,
|
|
449
|
+
transform: 8,
|
|
450
|
+
hunt: 8,
|
|
451
|
+
// tier 1 cross-provider for hunt chain
|
|
452
|
+
summarize: 7,
|
|
453
|
+
classify: 7
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
id: "gemini-3.1-pro-preview",
|
|
458
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
459
|
+
provider: "google",
|
|
460
|
+
status: "preview",
|
|
461
|
+
maxContextTokens: 1048576,
|
|
462
|
+
maxOutputTokens: 65535,
|
|
463
|
+
maxTools: 128,
|
|
464
|
+
parallelToolCalls: true,
|
|
465
|
+
structuredOutput: "native",
|
|
466
|
+
systemPromptMode: "separate",
|
|
467
|
+
streaming: true,
|
|
468
|
+
cliffs: [
|
|
469
|
+
{
|
|
470
|
+
metric: "input_tokens",
|
|
471
|
+
threshold: 2e5,
|
|
472
|
+
action: "downgrade_quality_warning",
|
|
473
|
+
reason: "Pricing doubles above 200K: input $2\u2192$4/M, output $12\u2192$18/M"
|
|
474
|
+
}
|
|
475
|
+
],
|
|
476
|
+
costInputPer1m: 2,
|
|
477
|
+
costOutputPer1m: 12,
|
|
478
|
+
lowering: {
|
|
479
|
+
...GOOGLE_LOWERING_BASE,
|
|
480
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
481
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
482
|
+
},
|
|
483
|
+
recovery: [
|
|
484
|
+
{
|
|
485
|
+
signal: "malformed_function_call",
|
|
486
|
+
action: "escalate",
|
|
487
|
+
reason: "MALFORMED_FUNCTION_CALL \u2014 escalate"
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
strengths: ["reasoning", "1m_context", "agentic_coding", "structured_output", "tool_use"],
|
|
491
|
+
weaknesses: ["cost", "preview_status", "pricing_above_200k"],
|
|
492
|
+
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.",
|
|
493
|
+
// Frontier-Gemini preview — bumped one notch over 2.5 Pro on agentic
|
|
494
|
+
// coding / reasoning per Google's release notes. Preview status:
|
|
495
|
+
// chains should stay on 2.5 Pro until GA. Starter hypothesis.
|
|
496
|
+
archetypePerf: {
|
|
497
|
+
critique: 10,
|
|
498
|
+
// Google claims step-change on reasoning
|
|
499
|
+
plan: 10,
|
|
500
|
+
ask: 9,
|
|
501
|
+
generate: 9,
|
|
502
|
+
extract: 9,
|
|
503
|
+
transform: 8,
|
|
504
|
+
hunt: 9,
|
|
505
|
+
// step-change agentic per Google
|
|
506
|
+
summarize: 8,
|
|
507
|
+
classify: 7
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
// ── DeepSeek ──
|
|
511
|
+
// 2026-05-08 audit (L-073): DeepSeek's `deepseek-chat` was silently aliased
|
|
512
|
+
// to `deepseek-v4-flash` non-thinking mode. Old kgauto profile claimed 64k
|
|
513
|
+
// context + $0.27/$1.10 — actual is 1M context + $0.14/$0.28. Now modeled
|
|
514
|
+
// as: V4-Flash + V4-Pro as canonical profiles; deepseek-chat and
|
|
515
|
+
// deepseek-reasoner registered as aliases (see ALIASES below).
|
|
516
|
+
{
|
|
517
|
+
id: "deepseek-v4-flash",
|
|
518
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
519
|
+
provider: "deepseek",
|
|
520
|
+
status: "current",
|
|
521
|
+
maxContextTokens: 1e6,
|
|
522
|
+
maxOutputTokens: 384e3,
|
|
523
|
+
maxTools: 16,
|
|
524
|
+
parallelToolCalls: false,
|
|
525
|
+
structuredOutput: "native",
|
|
526
|
+
systemPromptMode: "inline",
|
|
527
|
+
streaming: true,
|
|
528
|
+
cliffs: [
|
|
529
|
+
{
|
|
530
|
+
metric: "tool_count",
|
|
531
|
+
threshold: 1,
|
|
532
|
+
action: "drop_to_top_relevant",
|
|
533
|
+
reason: "Sequential tool calls only \u2014 L-040"
|
|
534
|
+
}
|
|
535
|
+
],
|
|
536
|
+
costInputPer1m: 0.14,
|
|
537
|
+
costOutputPer1m: 0.28,
|
|
538
|
+
lowering: {
|
|
539
|
+
system: { mode: "inline" },
|
|
540
|
+
cache: { strategy: "unsupported" },
|
|
541
|
+
tools: { format: "deepseek" }
|
|
542
|
+
},
|
|
543
|
+
recovery: [
|
|
544
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate" }
|
|
545
|
+
],
|
|
546
|
+
strengths: ["cost", "1m_context", "json_output", "code", "reasoning"],
|
|
547
|
+
weaknesses: ["parallel_tools", "large_tool_sets"],
|
|
548
|
+
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.",
|
|
549
|
+
// Master plan §6.2 anchor. Brain-validated tier 1 cross-provider for
|
|
550
|
+
// classify (169 rows, 0% empty). Tier 0 for summarize-with-no-tools.
|
|
551
|
+
// Falls off on hunt (sequential tools — L-040) and reasoning depth.
|
|
552
|
+
archetypePerf: {
|
|
553
|
+
classify: 7,
|
|
554
|
+
// brain-validated, 169 rows
|
|
555
|
+
summarize: 7,
|
|
556
|
+
// archetype-tolerant, no brain evidence yet
|
|
557
|
+
ask: 6,
|
|
558
|
+
transform: 6,
|
|
559
|
+
generate: 5,
|
|
560
|
+
plan: 5,
|
|
561
|
+
extract: 5,
|
|
562
|
+
critique: 4,
|
|
563
|
+
hunt: 4
|
|
564
|
+
// sequential tool calls only — L-040
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
id: "deepseek-v4-pro",
|
|
569
|
+
verifiedAgainstDocs: "2026-05-08",
|
|
570
|
+
provider: "deepseek",
|
|
571
|
+
status: "current",
|
|
572
|
+
maxContextTokens: 1e6,
|
|
573
|
+
maxOutputTokens: 384e3,
|
|
574
|
+
maxTools: 16,
|
|
575
|
+
parallelToolCalls: false,
|
|
576
|
+
structuredOutput: "native",
|
|
577
|
+
systemPromptMode: "inline",
|
|
578
|
+
streaming: true,
|
|
579
|
+
cliffs: [
|
|
580
|
+
{
|
|
581
|
+
metric: "tool_count",
|
|
582
|
+
threshold: 1,
|
|
583
|
+
action: "drop_to_top_relevant",
|
|
584
|
+
reason: "Sequential tool calls only \u2014 L-040"
|
|
585
|
+
}
|
|
586
|
+
],
|
|
587
|
+
// Profile carries REGULAR pricing, not the 75%-off promo (ends 2026-05-31).
|
|
588
|
+
// Under-estimating cost is worse than over-estimating for budget caps.
|
|
589
|
+
costInputPer1m: 1.74,
|
|
590
|
+
costOutputPer1m: 3.48,
|
|
591
|
+
lowering: {
|
|
592
|
+
system: { mode: "inline" },
|
|
593
|
+
cache: { strategy: "unsupported" },
|
|
594
|
+
tools: { format: "deepseek" }
|
|
595
|
+
},
|
|
596
|
+
recovery: [
|
|
597
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate" }
|
|
598
|
+
],
|
|
599
|
+
strengths: ["quality", "reasoning", "1m_context", "json_output", "code", "extended_thinking"],
|
|
600
|
+
weaknesses: ["parallel_tools", "large_tool_sets"],
|
|
601
|
+
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.",
|
|
602
|
+
// Master plan §3.3: tier 3 cross-provider for plan chain. Reasoning
|
|
603
|
+
// bumped one notch over V4-Flash; same parallel-tool ceiling.
|
|
604
|
+
archetypePerf: {
|
|
605
|
+
plan: 7,
|
|
606
|
+
// §3.3 tier 3 for plan
|
|
607
|
+
critique: 6,
|
|
608
|
+
ask: 7,
|
|
609
|
+
generate: 6,
|
|
610
|
+
classify: 7,
|
|
611
|
+
summarize: 7,
|
|
612
|
+
extract: 6,
|
|
613
|
+
transform: 6,
|
|
614
|
+
hunt: 4
|
|
615
|
+
// sequential tools — same as V4-Flash
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
];
|
|
619
|
+
var ALIASES = {
|
|
620
|
+
// DeepSeek's own model routing — both names served by V4-Flash.
|
|
621
|
+
"deepseek-chat": "deepseek-v4-flash",
|
|
622
|
+
"deepseek-reasoner": "deepseek-v4-flash",
|
|
623
|
+
// Legacy kgauto typo — actual API alias is dash-form (alpha.1 had dot).
|
|
624
|
+
"claude-haiku-4.5": "claude-haiku-4-5"
|
|
625
|
+
};
|
|
626
|
+
function canonicalId(id) {
|
|
627
|
+
return ALIASES[id] ?? id;
|
|
628
|
+
}
|
|
629
|
+
var PROFILE_INDEX = new Map(
|
|
630
|
+
PROFILES_RAW.map((p) => [p.id, p])
|
|
631
|
+
);
|
|
632
|
+
function getProfile(id) {
|
|
633
|
+
const canonical = canonicalId(id);
|
|
634
|
+
const p = PROFILE_INDEX.get(canonical);
|
|
635
|
+
if (!p) {
|
|
636
|
+
const known = [...PROFILE_INDEX.keys(), ...Object.keys(ALIASES)].join(", ");
|
|
637
|
+
throw new Error(`Unknown model id: "${id}". Known: ${known}`);
|
|
638
|
+
}
|
|
639
|
+
return p;
|
|
640
|
+
}
|
|
641
|
+
function tryGetProfile(id) {
|
|
642
|
+
return PROFILE_INDEX.get(canonicalId(id));
|
|
643
|
+
}
|
|
644
|
+
function allProfiles() {
|
|
645
|
+
return PROFILES_RAW;
|
|
646
|
+
}
|
|
647
|
+
function profilesByProvider(provider) {
|
|
648
|
+
return PROFILES_RAW.filter((p) => p.provider === provider);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
export {
|
|
652
|
+
ALIASES,
|
|
653
|
+
getProfile,
|
|
654
|
+
tryGetProfile,
|
|
655
|
+
allProfiles,
|
|
656
|
+
profilesByProvider
|
|
657
|
+
};
|