@chibitek/chibi 0.1.207 → 0.1.209
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/assets/{TerminalPanel-Cqjxle8G.js → TerminalPanel-CHGq3udb.js} +1 -1
- package/dist/assets/{abnfDiagram-O67JEVCF-XB80WX43.js → abnfDiagram-O67JEVCF-BMaKhJ-b.js} +1 -1
- package/dist/assets/{arc-BERcgYDi.js → arc-CYAiNWN8.js} +1 -1
- package/dist/assets/{architectureDiagram-NJMV4G6O-Dnc9s6SQ.js → architectureDiagram-NJMV4G6O-CxJFFlbO.js} +1 -1
- package/dist/assets/{blockDiagram-BEXU5L5S-Cxc21eYL.js → blockDiagram-BEXU5L5S-C7AbPjRB.js} +1 -1
- package/dist/assets/{c4Diagram-YGBWAQC7-CW-3gUcf.js → c4Diagram-YGBWAQC7-DfVnCJmT.js} +1 -1
- package/dist/assets/channel-DxL_mLhm.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-Bs484eiW.js → chunk-2Q5K7J3B-CzAUFkgv.js} +1 -1
- package/dist/assets/{chunk-3FUC2YCW-qhnBgRDy.js → chunk-3FUC2YCW-BgeBXphm.js} +2 -2
- package/dist/assets/{chunk-5VM5RSS4-CsCqAEkH.js → chunk-5VM5RSS4-DPRdTAXc.js} +1 -1
- package/dist/assets/{chunk-GTNCS2PH-ChBgFjPw.js → chunk-GTNCS2PH-BS-_dIVl.js} +1 -1
- package/dist/assets/{chunk-GWA4HPMP-Df5-WClq.js → chunk-GWA4HPMP-D6I7xMmd.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BdMXRJhO.js → chunk-JWPE2WC7-BKSKe7C9.js} +1 -1
- package/dist/assets/{chunk-NETBCI7D-rmAqJ9nY.js → chunk-NETBCI7D-R48UYTRN.js} +1 -1
- package/dist/assets/{chunk-WEXAMYUT-DYmTw4lw.js → chunk-WEXAMYUT-C8z4mL-2.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-C4o5SHm0.js → chunk-XXDRQBXY-Bml3ZRJ5.js} +1 -1
- package/dist/assets/{classDiagram-v2-NBCMYWYE-Bm-ZzDk5.js → classDiagram-v2-NBCMYWYE-w5wo22FO.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-CFMRSfMu.js → cose-bilkent-JH36ORCC-Cum9v--4.js} +1 -1
- package/dist/assets/{cynefin-OW5HDTMX-BDedZ5yW.js → cynefin-OW5HDTMX-BzN0-KsP.js} +1 -1
- package/dist/assets/{cynefinDiagram-VND7K2PF-i7KARSqF.js → cynefinDiagram-VND7K2PF-CkOpm32D.js} +1 -1
- package/dist/assets/{dagre-6A5THRUB-CwWpV0i_.js → dagre-6A5THRUB-BItQkKZD.js} +1 -1
- package/dist/assets/{diagram-22UHCM2B-CWIMT3-K.js → diagram-22UHCM2B-BI0zDn7c.js} +1 -1
- package/dist/assets/{diagram-3UASUU5V-C7HGc_ap.js → diagram-3UASUU5V-jwcDxsu6.js} +1 -1
- package/dist/assets/{diagram-ATOU4E4O-BeLM7ihN.js → diagram-ATOU4E4O-2RnY9egJ.js} +1 -1
- package/dist/assets/{diagram-CDSNMT55-CN1rVM-W.js → diagram-CDSNMT55-eVdEZmEF.js} +1 -1
- package/dist/assets/{diagram-MLGK6HIB-CuLcsx4e.js → diagram-MLGK6HIB-BCDGCJJ0.js} +1 -1
- package/dist/assets/{diagram-MPIPVDR6-Bie61r-h.js → diagram-MPIPVDR6-DtN5uO5w.js} +1 -1
- package/dist/assets/{ebnfDiagram-ZINNZB2B-ChMg86y3.js → ebnfDiagram-ZINNZB2B-B9GpXSEs.js} +1 -1
- package/dist/assets/{elk-276RUBZZ-DG9xXwoW.js → elk-276RUBZZ-Bk_eaK4T.js} +1 -1
- package/dist/assets/{erDiagram-OPXOYQCR-C9bl-nWK.js → erDiagram-OPXOYQCR-BiGoW6C6.js} +1 -1
- package/dist/assets/{flowDiagram-KWPJA3E3-DvdWxFI8.js → flowDiagram-KWPJA3E3-ZW5w0BaJ.js} +1 -1
- package/dist/assets/{ganttDiagram-FUAMR5RP-DDCNSEYc.js → ganttDiagram-FUAMR5RP-yyrKgsx1.js} +1 -1
- package/dist/assets/{gitGraphDiagram-X574FWY7-PFvmOSMd.js → gitGraphDiagram-X574FWY7-CeiDikzD.js} +1 -1
- package/dist/assets/{index-Ci2mINhA.js → index-CZGnshrJ.js} +83 -83
- package/dist/assets/{index-DnniNB7N.js → index-DUFlRZuA.js} +1 -1
- package/dist/assets/{infoDiagram-VRGFBTTK-HEZh-PnK.js → infoDiagram-VRGFBTTK-q2B-KJFm.js} +1 -1
- package/dist/assets/{ishikawaDiagram-OU5B5YK6-P3mmCGAU.js → ishikawaDiagram-OU5B5YK6-D8gXFuc0.js} +1 -1
- package/dist/assets/{journeyDiagram-ZHPQQLJL-dKG4AQu2.js → journeyDiagram-ZHPQQLJL-BmHL2mbq.js} +1 -1
- package/dist/assets/{kanban-definition-PNTS6WVX-BeIHeQTt.js → kanban-definition-PNTS6WVX-B9Ll2WkA.js} +1 -1
- package/dist/assets/{linear-DnEqDr6r.js → linear-CMVGYrKx.js} +1 -1
- package/dist/assets/{mermaid.core-D7hz6n4u.js → mermaid.core-qO11n1kV.js} +5 -5
- package/dist/assets/{mindmap-definition-NLK3R4M7-BxJ8p-DN.js → mindmap-definition-NLK3R4M7-CxLGFX45.js} +1 -1
- package/dist/assets/{pegDiagram-GJSIUBJH-CkQT2dHJ.js → pegDiagram-GJSIUBJH-CxK1MJG4.js} +1 -1
- package/dist/assets/{pieDiagram-5QR66LMP-DmVVhYaY.js → pieDiagram-5QR66LMP-H5jiF5Eu.js} +1 -1
- package/dist/assets/{quadrantDiagram-O4NWA36T-DsOz-qCY.js → quadrantDiagram-O4NWA36T-CKaqCruv.js} +1 -1
- package/dist/assets/{railroadDiagram-XR7U4H2S-CeYfvaki.js → railroadDiagram-XR7U4H2S-BCzKiQOd.js} +1 -1
- package/dist/assets/{requirementDiagram-PLB6GJNP-BCtM-2uN.js → requirementDiagram-PLB6GJNP-Cqtr43DT.js} +1 -1
- package/dist/assets/{sankeyDiagram-IPEJSGJF-Cu8ki35x.js → sankeyDiagram-IPEJSGJF-B2tQewX8.js} +1 -1
- package/dist/assets/{sequenceDiagram-PO4LG4MO-DKbS5Gcs.js → sequenceDiagram-PO4LG4MO-nggwQyrw.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-Ceut6PrE.js → sizeCapture-INFHLROL-qSPXJBv2.js} +1 -1
- package/dist/assets/{stateDiagram-v2-GCMORJYK-Bl5uMY2f.js → stateDiagram-v2-GCMORJYK-DraPbL2T.js} +1 -1
- package/dist/assets/{swimlanes-2SLR337P-CoMPbJ2k.js → swimlanes-2SLR337P-C6HVkIDA.js} +1 -1
- package/dist/assets/swimlanesDiagram-TC7HE7FX-gQUGsELo.js +8 -0
- package/dist/assets/{timeline-definition-EJHVYXUP-D0xkKp46.js → timeline-definition-EJHVYXUP-DZmPRTsx.js} +1 -1
- package/dist/assets/{usecaseDiagram-POWQR4AR-BCCL6QIf.js → usecaseDiagram-POWQR4AR-CsVuROW_.js} +1 -1
- package/dist/assets/{vennDiagram-UO4OBE2U-B7g3jK72.js → vennDiagram-UO4OBE2U-B9IRbuhp.js} +1 -1
- package/dist/assets/{wardleyDiagram-VNRHLVJA-DFhnqQKP.js → wardleyDiagram-VNRHLVJA-CGmVK53n.js} +1 -1
- package/dist/assets/{xychartDiagram-PMCCYNJV-mIXMscRS.js → xychartDiagram-PMCCYNJV-BAw-x9Y1.js} +1 -1
- package/dist/index.html +1 -1
- package/dist-server/index.js +3160 -2743
- package/dist-server/openmausbot.js +831 -654
- package/dist-server/pair-cli.js +831 -654
- package/dist-server/server/connection-cap-failover.js +8 -6
- package/dist-server/server/drivers/acp/core.js +20 -47
- package/dist-server/server/drivers/acp/custom.js +5 -0
- package/dist-server/server/drivers/acp/hermes-hosts.js +9 -0
- package/dist-server/server/drivers/acp/hermes.js +7 -9
- package/dist-server/server/drivers/acp/kimi-turn-failure.js +68 -0
- package/dist-server/server/drivers/acp/kimi.js +7 -0
- package/dist-server/server/drivers/acp/mcp-limit.js +47 -0
- package/dist-server/server/drivers/acp/rpc-error.js +35 -0
- package/dist-server/server/drivers/acp/setup-failure.js +9 -0
- package/dist-server/server/drivers/acp/vibe.js +11 -5
- package/dist-server/server/drivers/chat-text-only.js +47 -0
- package/dist-server/server/drivers/openai-chat-protocol.js +15 -0
- package/dist-server/server/drivers/openai-chat.js +8 -18
- package/dist-server/server/drivers/turn-mcp.js +3 -0
- package/dist-server/server/drivers/vibe-login.js +17 -8
- package/dist-server/server/engine-failover.js +16 -29
- package/dist-server/server/engine-rest.js +4 -3
- package/dist-server/server/engine-tiers.js +12 -9
- package/dist-server/server/index.js +16 -15
- package/dist-server/server/injected-model-rest.js +17 -0
- package/dist-server/server/model-levels/aliases.js +243 -38
- package/dist-server/server/model-levels/chibitek-rankings.js +8 -8
- package/dist-server/server/model-levels/classes.js +106 -38
- package/dist-server/server/model-levels/index.js +26 -14
- package/dist-server/server/model-levels/model-ids.js +91 -0
- package/dist-server/server/model-levels/overrides.js +7 -4
- package/dist-server/server/model-levels/sources.js +4 -1
- package/dist-server/server/pay-per-use.js +13 -1
- package/dist-server/shared/engine-tiers.js +0 -12
- package/package.json +1 -1
- package/dist/assets/channel-DaeKCO76.js +0 -1
- package/dist/assets/swimlanesDiagram-TC7HE7FX-DLJq0mAR.js +0 -8
|
@@ -6,20 +6,33 @@
|
|
|
6
6
|
// Intelligence Index scores when both exist, else whichever exists, else its
|
|
7
7
|
// default (or non-reasoning) variant. A model listed only at other efforts
|
|
8
8
|
// gets a documented estimate, flagged as such: its xhigh score, else its max
|
|
9
|
-
// score minus 3
|
|
9
|
+
// score minus 3. A model listed only at low or minimal effort has no score
|
|
10
|
+
// (a low row says little about the model at the efforts it is run at), and
|
|
11
|
+
// the next source decides. The score is banded (Mezcal >= 50,
|
|
10
12
|
// Plata >= 44, Reposado >= 38, else Añejo; editable).
|
|
11
13
|
//
|
|
12
14
|
// Sources, per model, first one with a score wins:
|
|
13
15
|
// 1. a person's override
|
|
14
|
-
// 2. Artificial Analysis, fetched with a key (live or its cache)
|
|
16
|
+
// 2. Artificial Analysis, fetched with a key (live or its cache); rows
|
|
17
|
+
// fetched more than AA_STALE_AFTER_DAYS ago give way to a newer
|
|
18
|
+
// LMArena grade, and still supply cost and speed
|
|
15
19
|
// 3. LMArena, fetched without a key (live or its cache): the model's
|
|
16
20
|
// overall percentile among runnable models, by quartile
|
|
17
21
|
// 4. the bundled baseline: Artificial Analysis rows, then LMArena rows
|
|
18
|
-
// 5.
|
|
22
|
+
// 5. the newest graded version of the same family, for a version newer
|
|
23
|
+
// than every graded one (claude-fable-5-3 while 5-2 is the newest
|
|
24
|
+
// graded): a new release is not worse than the one it replaces, and
|
|
25
|
+
// the default would hide it from every ladder until a board lists it
|
|
26
|
+
// 6. Añejo, as a default
|
|
19
27
|
import { MODEL_CLASSES, classForScore, DEFAULT_CLASS_BANDS } from "../../shared/engine-tiers.js";
|
|
20
|
-
import { normalizeName, suggestionFor } from "./aliases.js";
|
|
28
|
+
import { bareModelId, nameResolver, normalizeName, suggestionFor } from "./aliases.js";
|
|
21
29
|
import { parseAaName } from "./artificial-analysis.js";
|
|
22
30
|
import { classForPercentile, overallPercentile } from "./grade.js";
|
|
31
|
+
import { compareVersions, familyOf, modelKey, newerVersion } from "./model-ids.js";
|
|
32
|
+
/** Fetched Artificial Analysis rows older than this no longer outrank a
|
|
33
|
+
* newer LMArena grade: a cache left behind by a key that is gone, or a fetch
|
|
34
|
+
* that keeps failing, would otherwise decide classes for good. */
|
|
35
|
+
export const AA_STALE_AFTER_DAYS = 14;
|
|
23
36
|
/** How far below its max score a model listed only at max is placed. */
|
|
24
37
|
export const MAX_ESTIMATE_PENALTY = 3;
|
|
25
38
|
const EFFORT_ORDER = ["max", "xhigh", "high", "medium", "low", "minimal", "default", "non-reasoning"];
|
|
@@ -40,34 +53,24 @@ export function scoreVariants(variants) {
|
|
|
40
53
|
const max = at("max");
|
|
41
54
|
if (max)
|
|
42
55
|
return { score: round1(max.intelligence - MAX_ESTIMATE_PENALTY), used: ["max"], estimated: "max-minus-3" };
|
|
43
|
-
const low = [at("low"), at("minimal")].filter((variant) => variant !== undefined)
|
|
44
|
-
.sort((a, b) => b.intelligence - a.intelligence)[0];
|
|
45
|
-
if (low)
|
|
46
|
-
return { score: low.intelligence, used: [low.effort], estimated: "low" };
|
|
47
56
|
return undefined;
|
|
48
57
|
}
|
|
49
58
|
/** Credits each Artificial Analysis row to a catalog model by its name
|
|
50
|
-
* without the effort part
|
|
51
|
-
*
|
|
59
|
+
* without the effort part: a name the catalog's `aa` names or a person's
|
|
60
|
+
* alias override list, or one that is a model's id ("Claude Sonnet 5.5" is
|
|
61
|
+
* claude-sonnet-5-5); anything else is reported, never guessed. */
|
|
52
62
|
export function matchAaRows(rows, catalog, aliasOverrides = {}) {
|
|
53
|
-
const
|
|
54
|
-
for (const model of catalog)
|
|
55
|
-
for (const name of model.aa ?? [])
|
|
56
|
-
index.set(normalizeName(name), model.id);
|
|
63
|
+
const resolve = nameResolver(catalog, (model) => model.aa ?? [], aliasOverrides);
|
|
57
64
|
const ids = new Set(catalog.map((model) => model.id));
|
|
58
|
-
const overrides = new Map();
|
|
59
|
-
for (const [name, target] of Object.entries(aliasOverrides))
|
|
60
|
-
overrides.set(normalizeName(name), target);
|
|
61
65
|
const byModel = new Map();
|
|
62
66
|
const unmatched = new Map();
|
|
63
67
|
for (const row of rows) {
|
|
64
68
|
const { base, effort } = parseAaName(row.name);
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
if (override === null)
|
|
69
|
+
const id = resolve(base);
|
|
70
|
+
if (id === null)
|
|
68
71
|
continue;
|
|
69
|
-
const id = override ?? index.get(key);
|
|
70
72
|
if (id === undefined) {
|
|
73
|
+
const key = normalizeName(base);
|
|
71
74
|
if (!unmatched.has(key)) {
|
|
72
75
|
const suggestion = suggestionFor(key, ids);
|
|
73
76
|
unmatched.set(key, { name: base, organization: row.creator, sources: ["artificial-analysis"], ...(suggestion ? { suggestion } : {}) });
|
|
@@ -119,7 +122,36 @@ const lmarenaClass = (input, id) => {
|
|
|
119
122
|
const percentile = capabilities ? overallPercentile(capabilities) : undefined;
|
|
120
123
|
return percentile === undefined ? undefined : { modelClass: classForPercentile(percentile), percentile };
|
|
121
124
|
};
|
|
122
|
-
/**
|
|
125
|
+
/** The models a source or a person grades, by family (model-ids.ts). */
|
|
126
|
+
export function gradedFamilies(models) {
|
|
127
|
+
const families = new Map();
|
|
128
|
+
for (const model of models) {
|
|
129
|
+
const { source, modelClass } = model.modelClass;
|
|
130
|
+
const family = model.overrideOnly || source === "default" || source === "inherited" ? undefined : familyOf(modelKey(model.id));
|
|
131
|
+
if (family && !family.latest)
|
|
132
|
+
families.set(family.family, [...families.get(family.family) ?? [], { id: model.id, family, modelClass }]);
|
|
133
|
+
}
|
|
134
|
+
return families;
|
|
135
|
+
}
|
|
136
|
+
/** The class an ungraded id takes from its family: that of the newest
|
|
137
|
+
* graded version, and only when the id is newer than every graded one. An
|
|
138
|
+
* older or in-between version stays ungraded, another family never counts,
|
|
139
|
+
* and an id still carrying a provider or a tag (a local or routed copy) is
|
|
140
|
+
* not a plain model name. */
|
|
141
|
+
export function inheritedClass(id, families) {
|
|
142
|
+
if (/[:/]/.test(id))
|
|
143
|
+
return undefined;
|
|
144
|
+
const family = familyOf(modelKey(id));
|
|
145
|
+
const siblings = family && families.get(family.family);
|
|
146
|
+
if (!family || !siblings?.every((sibling) => newerVersion(family, sibling.family)))
|
|
147
|
+
return undefined;
|
|
148
|
+
const newest = siblings.reduce((best, sibling) => (compareVersions(sibling.family.version, best.family.version) > 0 ? sibling : best));
|
|
149
|
+
return { modelClass: newest.modelClass, inheritedFrom: newest.id };
|
|
150
|
+
}
|
|
151
|
+
/** Every catalog model's class, and every id a class override names apart
|
|
152
|
+
* from its model. A person's override for a model's id, in any spelling,
|
|
153
|
+
* is the model's class at every effort; an override for one variant's id
|
|
154
|
+
* ("gpt-5.5-high") is that id's class alone. */
|
|
123
155
|
export function classifyModels(input) {
|
|
124
156
|
const bands = input.bands ?? DEFAULT_CLASS_BANDS;
|
|
125
157
|
const emptyCapabilities = () => ({
|
|
@@ -147,14 +179,16 @@ export function classifyModels(input) {
|
|
|
147
179
|
...(metrics?.tokensPerSecond !== undefined ? { tokensPerSecond: metrics.tokensPerSecond } : {}),
|
|
148
180
|
};
|
|
149
181
|
}
|
|
150
|
-
|
|
182
|
+
const live = lmarenaClass(input.lmarena, id);
|
|
183
|
+
const outdated = Boolean(input.aa?.stale && live && (input.lmarena.date ?? "") > input.aa.date);
|
|
184
|
+
if (fromAa && !outdated)
|
|
151
185
|
return { ...fromAa, source: "artificial-analysis", sourceDate: input.aa.date };
|
|
152
186
|
const metrics = variants.length ? aaGrade(variants, bands) : undefined;
|
|
153
|
-
|
|
187
|
+
// Rows that give no score (low effort only) are still listed, unused.
|
|
188
|
+
const withVariants = { variants: metrics?.variants ?? variants,
|
|
154
189
|
...(metrics?.costPerTask !== undefined ? { costPerTask: metrics.costPerTask } : {}),
|
|
155
190
|
...(metrics?.pricePer1M !== undefined ? { pricePer1M: metrics.pricePer1M } : {}),
|
|
156
191
|
...(metrics?.tokensPerSecond !== undefined ? { tokensPerSecond: metrics.tokensPerSecond } : {}) };
|
|
157
|
-
const live = lmarenaClass(input.lmarena, id);
|
|
158
192
|
if (live)
|
|
159
193
|
return { ...withVariants, ...live, source: "lmarena", ...(input.lmarena.date ? { sourceDate: input.lmarena.date } : {}) };
|
|
160
194
|
const baseline = input.aaBaseline?.match.byModel.get(id);
|
|
@@ -168,31 +202,65 @@ export function classifyModels(input) {
|
|
|
168
202
|
}
|
|
169
203
|
return { ...withVariants, modelClass: "Añejo", source: "default" };
|
|
170
204
|
};
|
|
171
|
-
const withOverride = (
|
|
172
|
-
const modelClass = input.overrides.classes[id];
|
|
205
|
+
const withOverride = (modelClass, grade) => {
|
|
173
206
|
if (!modelClass)
|
|
174
207
|
return grade;
|
|
175
208
|
const { modelClass: scoredClass, source, score, percentile, ...rest } = grade;
|
|
176
209
|
return {
|
|
177
210
|
...rest, modelClass, source: "override",
|
|
178
|
-
...(source !== "override" && source !== "default"
|
|
211
|
+
...(source !== "override" && source !== "default" && source !== "inherited"
|
|
179
212
|
? { scored: { modelClass: scoredClass, source, ...(score !== undefined ? { score } : {}), ...(percentile !== undefined ? { percentile } : {}) } }
|
|
180
213
|
: {}),
|
|
181
214
|
...(score !== undefined ? { score } : {}),
|
|
182
215
|
};
|
|
183
216
|
};
|
|
217
|
+
const overrides = input.overrides.classes;
|
|
218
|
+
const overrideIds = Object.keys(overrides).sort();
|
|
219
|
+
const spelled = new Map();
|
|
220
|
+
for (const id of overrideIds)
|
|
221
|
+
if (!spelled.has(modelKey(id)))
|
|
222
|
+
spelled.set(modelKey(id), id);
|
|
223
|
+
const applied = new Set();
|
|
224
|
+
const scored = new Map();
|
|
184
225
|
const capabilitiesOf = (id) => input.lmarena?.capabilities.get(id) ?? input.lmarenaBaseline?.capabilities.get(id) ?? emptyCapabilities();
|
|
185
|
-
const graded = input.catalog.map((model) =>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
226
|
+
const graded = input.catalog.map((model) => {
|
|
227
|
+
const overrideId = overrides[model.id] ? model.id : spelled.get(modelKey(model.id));
|
|
228
|
+
if (overrideId !== undefined)
|
|
229
|
+
applied.add(overrideId);
|
|
230
|
+
const grade = scoredGrade(model.id);
|
|
231
|
+
scored.set(model.id, grade);
|
|
232
|
+
return {
|
|
233
|
+
id: model.id, label: model.label, runs: model.runs, ...(model.variantRuns ? { variantRuns: model.variantRuns } : {}),
|
|
234
|
+
modelClass: withOverride(overrideId === undefined ? undefined : overrides[overrideId], grade),
|
|
235
|
+
capabilities: capabilitiesOf(model.id),
|
|
236
|
+
};
|
|
237
|
+
});
|
|
238
|
+
const families = gradedFamilies(graded);
|
|
239
|
+
for (const model of graded) {
|
|
240
|
+
if (model.modelClass.source !== "default")
|
|
193
241
|
continue;
|
|
194
|
-
|
|
195
|
-
|
|
242
|
+
const inherited = inheritedClass(model.id, families);
|
|
243
|
+
if (inherited)
|
|
244
|
+
model.modelClass = { ...model.modelClass, ...inherited, source: "inherited" };
|
|
245
|
+
}
|
|
246
|
+
for (const id of overrideIds) {
|
|
247
|
+
if (applied.has(id))
|
|
248
|
+
continue;
|
|
249
|
+
// The engine ids that are exactly this id leave their model: its class
|
|
250
|
+
// is the model's everywhere but here.
|
|
251
|
+
const mine = (run) => run.model === id || bareModelId(run.model) === id;
|
|
252
|
+
const owner = graded.find((model) => !model.overrideOnly && [...model.runs, ...model.variantRuns ?? []].some(mine));
|
|
253
|
+
const runs = owner ? [...owner.runs, ...owner.variantRuns ?? []].filter(mine) : [];
|
|
254
|
+
if (owner) {
|
|
255
|
+
owner.runs = owner.runs.filter((run) => !mine(run));
|
|
256
|
+
if (owner.variantRuns)
|
|
257
|
+
owner.variantRuns = owner.variantRuns.filter((run) => !mine(run));
|
|
258
|
+
}
|
|
259
|
+
graded.push({
|
|
260
|
+
id, label: id, runs, overrideOnly: true,
|
|
261
|
+
modelClass: withOverride(overrides[id], (owner && scored.get(owner.id)) ?? { modelClass: "Añejo", source: "default", variants: [] }),
|
|
262
|
+
capabilities: owner?.capabilities ?? emptyCapabilities(),
|
|
263
|
+
});
|
|
196
264
|
}
|
|
197
265
|
return graded;
|
|
198
266
|
}
|
|
@@ -13,13 +13,13 @@ import { statSync } from "node:fs";
|
|
|
13
13
|
import { join } from "node:path";
|
|
14
14
|
import { DEFAULT_CLASS_BANDS } from "../../shared/engine-tiers.js";
|
|
15
15
|
import { AA_BASELINE } from "./aa-baseline.js";
|
|
16
|
-
import { MODEL_CATALOG, catalogIdFor, localTag, matchSnapshots, onDeviceModel, withOfferedModels } from "./aliases.js";
|
|
16
|
+
import { MODEL_CATALOG, bareModelId, catalogIdFor, localTag, matchSnapshots, onDeviceModel, withOfferedModels } from "./aliases.js";
|
|
17
17
|
import { AA_ATTRIBUTION, AA_MODELS_URL, artificialAnalysisKey, fetchArtificialAnalysis } from "./artificial-analysis.js";
|
|
18
18
|
import { BASELINE } from "./baseline.js";
|
|
19
19
|
import { AA_CACHE_FILE, CACHE_FILE, readAaCache, readCache, validSnapshots, writeAaCache, writeCache } from "./cache.js";
|
|
20
20
|
import { setPublishedHarnessWeights } from "../ladder-order.js";
|
|
21
21
|
import { CHIBITEK_RANKINGS_CACHE, fetchRankings, parseRankings, readRankingsCache, writeRankingsCache } from "./chibitek-rankings.js";
|
|
22
|
-
import { byClass, classifyModels, matchAaRows } from "./classes.js";
|
|
22
|
+
import { AA_STALE_AFTER_DAYS, byClass, classifyModels, gradedFamilies, inheritedClass, matchAaRows } from "./classes.js";
|
|
23
23
|
import { fetchSource } from "./fetch.js";
|
|
24
24
|
import { PERCENTILE_CUTOFFS, gradeCapabilities } from "./grade.js";
|
|
25
25
|
import { OVERRIDES_FILE, readOverrides, withClassOverride, writeOverrides } from "./overrides.js";
|
|
@@ -94,7 +94,7 @@ export function createModelLevels(options) {
|
|
|
94
94
|
const models = classifyModels({
|
|
95
95
|
catalog,
|
|
96
96
|
...(rankings ? { rankings } : {}),
|
|
97
|
-
...(aa ? { aa: { match: aa, date: dateOf(aaFetched.fetchedAt) } } : {}),
|
|
97
|
+
...(aa ? { aa: { match: aa, date: dateOf(aaFetched.fetchedAt), stale: now().getTime() - Date.parse(aaFetched.fetchedAt) > AA_STALE_AFTER_DAYS * DAY_MS } } : {}),
|
|
98
98
|
...(aaBase ? { aaBaseline: { match: aaBase, date: dateOf(aaBaseline.fetchedAt) } } : {}),
|
|
99
99
|
// Fetched LMArena rows rank above the baselines; while only bundled
|
|
100
100
|
// rows are known, LMArena is the last baseline.
|
|
@@ -162,22 +162,34 @@ export function createModelLevels(options) {
|
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
164
|
const graded = () => classified().models;
|
|
165
|
+
// Built once per grading: classOf runs on every turn start and failover.
|
|
166
|
+
const lookups = new WeakMap();
|
|
167
|
+
const lookupOf = (models) => {
|
|
168
|
+
let lookup = lookups.get(models);
|
|
169
|
+
if (!lookup)
|
|
170
|
+
lookups.set(models, (lookup = { byId: new Map(models.map((entry) => [entry.id, entry])), families: gradedFamilies(models) }));
|
|
171
|
+
return lookup;
|
|
172
|
+
};
|
|
165
173
|
const classOf = (driverKind, model) => {
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
// An override written for
|
|
169
|
-
// names
|
|
170
|
-
//
|
|
171
|
-
|
|
172
|
-
const exact = byId(model);
|
|
174
|
+
const { byId, families } = lookupOf(graded());
|
|
175
|
+
const of = ({ modelClass }) => ({ modelClass: modelClass.modelClass, source: modelClass.source, ...(modelClass.inheritedFrom ? { inheritedFrom: modelClass.inheritedFrom } : {}) });
|
|
176
|
+
// An override written for exactly this id ("opencode-go/kimi-k3", or one
|
|
177
|
+
// effort's "gpt-5.5-high") names this id alone; the model it belongs to
|
|
178
|
+
// keeps its own class under every other id.
|
|
179
|
+
const exact = byId.get(model) ?? byId.get(bareModelId(model));
|
|
173
180
|
if (exact?.overrideOnly)
|
|
174
|
-
return
|
|
175
|
-
const found = byId(catalogIdFor(driverKind, model, catalog) ?? model);
|
|
181
|
+
return of(exact);
|
|
182
|
+
const found = byId.get(catalogIdFor(driverKind, model, catalog) ?? model);
|
|
176
183
|
if (found && found.modelClass.source !== "default")
|
|
177
|
-
return
|
|
184
|
+
return of(found);
|
|
178
185
|
if (localTag(model) !== undefined || onDeviceModel(driverKind, model))
|
|
179
186
|
return { modelClass: "Añejo", source: "default", local: true };
|
|
180
|
-
|
|
187
|
+
if (found)
|
|
188
|
+
return { modelClass: found.modelClass.modelClass, source: "default" };
|
|
189
|
+
// An id no engine has listed yet: a version newer than every graded one
|
|
190
|
+
// of its family takes that family's newest class (classes.ts).
|
|
191
|
+
const inherited = inheritedClass(bareModelId(model), families);
|
|
192
|
+
return inherited ? { ...inherited, source: "inherited" } : undefined;
|
|
181
193
|
};
|
|
182
194
|
const runRefresh = async () => {
|
|
183
195
|
const fetch = options.fetch ?? globalThis.fetch;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// One spelling for the ids engines use and the names leaderboards print.
|
|
2
|
+
//
|
|
3
|
+
// Engines spell one model many ways: "claude-fable-5-1" and
|
|
4
|
+
// "claude-fable-5.1", "Kimi-K3" and "kimi-k3", and one id per effort or speed
|
|
5
|
+
// ("claude-fable-5-1-thinking-high", "gpt-5.5-low-fast"). Graded apart, each
|
|
6
|
+
// spelling took whatever a leaderboard name happened to match and the rest
|
|
7
|
+
// fell to the Añejo default. modelKey gives every spelling of a name one key;
|
|
8
|
+
// variantKeys takes the effort and speed parts off, one at a time, so an id
|
|
9
|
+
// can be looked up as the model it runs.
|
|
10
|
+
//
|
|
11
|
+
// Still exact: a key either equals a known model's key or it does not.
|
|
12
|
+
// Nothing here compares families or guesses a sibling; familyOf exists only
|
|
13
|
+
// so a version newer than every graded one can inherit (classes.ts).
|
|
14
|
+
/** Lower case, every run of other characters one hyphen: "Claude Fable 5.1
|
|
15
|
+
* (Max)", "claude-fable-5.1-max" and "claude-fable-5-1-max" are one key. */
|
|
16
|
+
export function modelKey(name) {
|
|
17
|
+
return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
18
|
+
}
|
|
19
|
+
const EFFORT_WORDS = ["minimal", "low", "medium", "high", "xhigh", "max"];
|
|
20
|
+
const VARIANT_PART = /-(thinking|minimal|low|medium|high|xhigh|max|fast)$/;
|
|
21
|
+
const LATEST = "-latest";
|
|
22
|
+
/** Names whose last word reads as an effort or a speed but is the model:
|
|
23
|
+
* Alibaba's Max line ("qwen3.8-max" is not "qwen3.8" at max effort) and
|
|
24
|
+
* xAI's Fast line ("grok-4-fast" is a smaller model than "grok-4"). */
|
|
25
|
+
const NAMED_BY_SUFFIX = [/^(?:qwen|qvq)[a-z0-9-]*-max$/, /^grok(?:-\d+)+-fast$/];
|
|
26
|
+
/** `key`, then `key` with each trailing effort or speed part taken off in
|
|
27
|
+
* turn: "gpt-5-5-high-fast", "gpt-5-5-high", "gpt-5-5". */
|
|
28
|
+
export function variantKeys(key) {
|
|
29
|
+
const out = [key];
|
|
30
|
+
let base = key;
|
|
31
|
+
while (!NAMED_BY_SUFFIX.some((named) => named.test(base))) {
|
|
32
|
+
const next = base.replace(VARIANT_PART, "");
|
|
33
|
+
if (next === base || !next)
|
|
34
|
+
break;
|
|
35
|
+
out.push(next);
|
|
36
|
+
base = next;
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
/** Every key an id may be known by: variantKeys, then the same for the id
|
|
41
|
+
* without a trailing "-latest". The alias is only ever taken off to reach a
|
|
42
|
+
* model that is known ("deepseek-v4-flash-latest"); "claude-fable-latest"
|
|
43
|
+
* names no one version, and stays itself. */
|
|
44
|
+
export function lookupKeys(key) {
|
|
45
|
+
const keys = variantKeys(key);
|
|
46
|
+
const last = keys.at(-1);
|
|
47
|
+
return last.endsWith(LATEST) && last.length > LATEST.length ? [...keys, ...variantKeys(last.slice(0, -LATEST.length))] : keys;
|
|
48
|
+
}
|
|
49
|
+
/** What was taken off `key` to reach `base`, e.g. ["high", "fast"]. */
|
|
50
|
+
export const variantParts = (key, base) => (key === base ? [] : key.slice(base.length + 1).split("-"));
|
|
51
|
+
/** The effort an id's variant parts name, if any. */
|
|
52
|
+
export const partsEffort = (parts) => parts.find((part) => EFFORT_WORDS.includes(part));
|
|
53
|
+
/** How well a variant stands for its model on a ladder, lower is better: the
|
|
54
|
+
* efforts a class is graded on first (high, then medium), thinking before
|
|
55
|
+
* not, a speed or "latest" alias last. */
|
|
56
|
+
export function variantRank(parts) {
|
|
57
|
+
const effort = partsEffort(parts);
|
|
58
|
+
const order = ["high", "medium", "xhigh", "max", undefined, "low", "minimal"];
|
|
59
|
+
return (parts.includes("fast") || parts.includes("latest") ? 100 : 0) + order.indexOf(effort) * 2 + (parts.includes("thinking") ? 0 : 1);
|
|
60
|
+
}
|
|
61
|
+
/** The family and version a key names, or undefined when it has no version.
|
|
62
|
+
* A date or a size is not a version: "claude-opus-4-20250514" is version 4
|
|
63
|
+
* of its own family, "qwen3-8-27b" version 3.8 of "qwen#27b", and
|
|
64
|
+
* "mistral-large-2407" has none. */
|
|
65
|
+
export function familyOf(key) {
|
|
66
|
+
const base = variantKeys(key).at(-1);
|
|
67
|
+
if (base.endsWith(LATEST))
|
|
68
|
+
return { family: `${base.slice(0, -LATEST.length)}-#`, version: [], latest: true };
|
|
69
|
+
const match = /^(.*?)(?<!\d)(\d{1,3}(?:-\d{1,2})*)(?=-|$)(?:-(.*))?$/.exec(base);
|
|
70
|
+
return match ? { family: `${match[1]}#${match[3] ?? ""}`, version: match[2].split("-") } : undefined;
|
|
71
|
+
}
|
|
72
|
+
const compareParts = (a, b, value) => {
|
|
73
|
+
for (let index = 0; index < Math.max(a.length, b.length); index += 1) {
|
|
74
|
+
const difference = value(a[index] ?? "0", index) - value(b[index] ?? "0", index);
|
|
75
|
+
if (difference)
|
|
76
|
+
return difference;
|
|
77
|
+
}
|
|
78
|
+
return 0;
|
|
79
|
+
};
|
|
80
|
+
/** Versions as vendors mostly mean them, minor parts read as decimals: 4.20
|
|
81
|
+
* is before 4.3. */
|
|
82
|
+
export const compareVersions = (a, b) => compareParts(a, b, (part, index) => (index === 0 ? Number(part) : Number(`0.${part}`)));
|
|
83
|
+
/** Is `a` newer than `b` however the minor part is read? 5.3 is newer than
|
|
84
|
+
* 5.2 either way; 4.20 against 4.7 depends on the reading, so it is not. */
|
|
85
|
+
export function newerVersion(a, b) {
|
|
86
|
+
if (b.latest)
|
|
87
|
+
return false;
|
|
88
|
+
if (a.latest)
|
|
89
|
+
return true;
|
|
90
|
+
return compareVersions(a.version, b.version) > 0 && compareParts(a.version, b.version, (part) => Number(part)) > 0;
|
|
91
|
+
}
|
|
@@ -19,6 +19,7 @@ import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
|
19
19
|
import { dirname } from "node:path";
|
|
20
20
|
import { MODEL_CLASSES, toModelClass } from "../../shared/engine-tiers.js";
|
|
21
21
|
import { writeFileAtomic } from "../atomic.js";
|
|
22
|
+
import { modelKey } from "./model-ids.js";
|
|
22
23
|
export const OVERRIDES_FILE = "model-levels-overrides.json";
|
|
23
24
|
/** Legacy `levels` entries: the all-capabilities value, else the first of
|
|
24
25
|
* these that is set. */
|
|
@@ -113,12 +114,14 @@ export function writeOverrides(path, overrides) {
|
|
|
113
114
|
mkdirSync(dirname(path), { recursive: true });
|
|
114
115
|
writeFileAtomic(path, `${JSON.stringify(file, null, 2)}\n`);
|
|
115
116
|
}
|
|
116
|
-
/** One model's class override set (a class) or removed (null).
|
|
117
|
+
/** One model's class override set (a class) or removed (null). An override
|
|
118
|
+
* under another spelling of the id ("claude-opus-4-6" for "claude-opus-4.6")
|
|
119
|
+
* is the same override (classifyModels), so it goes too: otherwise Settings
|
|
120
|
+
* could neither change nor clear it. */
|
|
117
121
|
export function withClassOverride(overrides, id, modelClass) {
|
|
118
|
-
const
|
|
122
|
+
const key = modelKey(id);
|
|
123
|
+
const classes = Object.fromEntries(Object.entries(overrides.classes).filter(([other]) => modelKey(other) !== key));
|
|
119
124
|
if (modelClass)
|
|
120
125
|
classes[id] = modelClass;
|
|
121
|
-
else
|
|
122
|
-
delete classes[id];
|
|
123
126
|
return { ...overrides, classes };
|
|
124
127
|
}
|
|
@@ -30,7 +30,10 @@ export const CAPABILITIES = ["agent", "tools", "coding", "search", "writing"];
|
|
|
30
30
|
export const CAPABILITY_WEIGHTS = {
|
|
31
31
|
// The overall agent arena leads; finished tasks and following instructions refine it.
|
|
32
32
|
agent: { "lmarena:agent": 0.5, "lmarena:agent_task_outcome_explicit": 0.3, "lmarena:agent_steerability": 0.2 },
|
|
33
|
-
|
|
33
|
+
// The tool-hallucination board is saturated (its top 20 scores agreed to
|
|
34
|
+
// twelve digits on 2026-11-18), so its order is noise: it is still fetched
|
|
35
|
+
// and listed, and weighs nothing until it separates models again.
|
|
36
|
+
tools: {},
|
|
34
37
|
coding: { "lmarena:webdev": 1 },
|
|
35
38
|
search: { "lmarena:search": 0.6, "lmarena:search_factuality": 0.4 },
|
|
36
39
|
// Style control removes the length and formatting bias, so it weighs most.
|
|
@@ -72,8 +72,20 @@ export class PayPerUseEpisodes {
|
|
|
72
72
|
open.turns = (open.turns ?? 0) + 1;
|
|
73
73
|
this.save();
|
|
74
74
|
}
|
|
75
|
-
/** A turn
|
|
75
|
+
/** A turn was placed on a subscription. Without the person's "Keep going"
|
|
76
|
+
* the episode is over. With it the approval stands until a subscription
|
|
77
|
+
* actually answers (subscriptionAnswered): a subscription that is picked
|
|
78
|
+
* and fails again a minute later is not back, and ending the episode on
|
|
79
|
+
* the pick threw the approval away within seconds of it being given. */
|
|
76
80
|
subscriptionUsed() {
|
|
81
|
+
if (this.episodes[0]?.keptGoingAt === undefined)
|
|
82
|
+
this.end();
|
|
83
|
+
}
|
|
84
|
+
/** A subscription finished a turn: they are back, the episode is over. */
|
|
85
|
+
subscriptionAnswered() {
|
|
86
|
+
this.end();
|
|
87
|
+
}
|
|
88
|
+
end() {
|
|
77
89
|
const open = this.episodes[0];
|
|
78
90
|
if (!open || open.endedAt !== undefined)
|
|
79
91
|
return;
|
|
@@ -78,15 +78,9 @@ export const DEFAULT_LADDERS = {
|
|
|
78
78
|
{ engine: "hermes", model: "nous:x-ai/grok-4.6" },
|
|
79
79
|
{ engine: "ollamaCloud", model: "glm-5.3" },
|
|
80
80
|
{ engine: "museCode", model: "muse-spark-1.2" },
|
|
81
|
-
{ engine: "hermesAgent", model: "openai-codex:gpt-6-sol", modelClass: "Plata" },
|
|
82
81
|
{ engine: "antigravity", model: "gemini-3.8-flash-medium" },
|
|
83
82
|
{ engine: "cursorAgent", model: "auto" },
|
|
84
|
-
{ engine: "hermesAgent", model: "huggingface:deepseek-ai/DeepSeek-R1-0528", modelClass: "Plata" },
|
|
85
|
-
{ engine: "hermesAgent", model: "opencode-go:deepseek-v4-flash", modelClass: "Plata" },
|
|
86
|
-
{ engine: "hermesAgent", model: "deepinfra:anthropic/claude-opus-5", modelClass: "Plata" },
|
|
87
83
|
{ engine: "hermesAgent", model: "nous:meta/muse-spark-1.3", modelClass: "Plata" },
|
|
88
|
-
{ engine: "hermesAgent", model: "openrouter:openai/gpt-6-sol", modelClass: "Plata" },
|
|
89
|
-
{ engine: "hermesAgent", model: "openai-codex:gpt-6.1-sol", modelClass: "Plata" },
|
|
90
84
|
],
|
|
91
85
|
engineering: [
|
|
92
86
|
{ ...ATOMIC_AUTO_RUNG },
|
|
@@ -95,13 +89,11 @@ export const DEFAULT_LADDERS = {
|
|
|
95
89
|
{ engine: "claudeAgent", model: "claude-opus-5-5" },
|
|
96
90
|
{ engine: "opencodeGo", model: "opencode-go/gemini-4-argon" },
|
|
97
91
|
{ engine: "ollamaCloud", model: "kimi-k3" },
|
|
98
|
-
{ engine: "hermesAgent", model: "openai-codex:gpt-6-astra", modelClass: "Mezcal" },
|
|
99
92
|
{ engine: "grok", model: "grok-4.7" },
|
|
100
93
|
{ engine: "grokAgent", model: "grok-4.7" },
|
|
101
94
|
{ engine: "kimi", model: "kimi-code/k3" },
|
|
102
95
|
{ engine: "openai-compat", model: "qwen3.7-plus" },
|
|
103
96
|
{ engine: "hermesAgent", model: "nous:anthropic/claude-opus-5.5" },
|
|
104
|
-
{ engine: "hermesAgent", model: "opencode-zen:claude-fable-5-1", modelClass: "Mezcal" },
|
|
105
97
|
{ engine: "cursorAgent", model: "auto" },
|
|
106
98
|
],
|
|
107
99
|
research: [
|
|
@@ -110,10 +102,6 @@ export const DEFAULT_LADDERS = {
|
|
|
110
102
|
{ engine: "vibe", model: "mistral-medium-3.5" },
|
|
111
103
|
{ engine: "antigravityAgent", model: "gemini-3.8-flash-low" },
|
|
112
104
|
{ engine: "cursorAgent", model: "auto" },
|
|
113
|
-
{ engine: "hermesAgent", model: "openrouter:x-ai/grok-4.7", modelClass: "Plata" },
|
|
114
|
-
{ engine: "hermesAgent", model: "custom:local-(localhost:11434):deepseek-v4-pro:cloud" },
|
|
115
|
-
{ engine: "hermesAgent", model: "openrouter:meta/muse-spark-1.3", modelClass: "Plata" },
|
|
116
|
-
{ engine: "hermesAgent", model: "opencode-zen:muse-spark-1.3", modelClass: "Plata" },
|
|
117
105
|
{ engine: "claudeAgent", model: "claude-opus-5", modelClass: "Plata" },
|
|
118
106
|
{ engine: "cursorAgent", model: "claude-opus-5-high", modelClass: "Plata" },
|
|
119
107
|
{ engine: "opencodeGo", model: "opencode/claude-opus-5", modelClass: "Plata" },
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./mermaid.core-D7hz6n4u.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{c as r,s as e}from"./flowDiagram-KWPJA3E3-DvdWxFI8.js";import{_ as a}from"./mermaid.core-D7hz6n4u.js";import"./chunk-5VM5RSS4-CsCqAEkH.js";import"./chunk-XXDRQBXY-C4o5SHm0.js";import"./chunk-WEXAMYUT-DYmTw4lw.js";import"./chunk-GWA4HPMP-Df5-WClq.js";import"./channel-DaeKCO76.js";import"./index-Ci2mINhA.js";var o=a(t=>`${e(t)}
|
|
2
|
-
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
-
stroke: ${t.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,"getStyles"),s=o,u=r({styles:s});export{u as diagram};
|