@jeffreyjyz/mpc 0.1.7 → 0.1.9
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 +9 -0
- package/package.json +3 -2
- package/src/cli/engine/score.ts +7 -7
- package/src/constants/data.ts +7 -0
- package/src/constants/view.ts +4 -1
package/README.md
CHANGED
|
@@ -25,6 +25,15 @@ bun link
|
|
|
25
25
|
mpc --help
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
Working on the CLI itself? `bun run dev:link` points `mpcdev` at this checkout, so the
|
|
29
|
+
published `mpc` keeps running the installed release while `mpcdev` runs your edits:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
bun run dev:link
|
|
33
|
+
mpcdev --version # this checkout
|
|
34
|
+
mpc --version # the published install
|
|
35
|
+
```
|
|
36
|
+
|
|
28
37
|
## Usage
|
|
29
38
|
|
|
30
39
|
```sh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jeffreyjyz/mpc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Compare model pricing across opencode Go and Command Code plans",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"start": "bun run src/index.ts",
|
|
23
23
|
"test": "bun test",
|
|
24
24
|
"lint": "biome lint --write .",
|
|
25
|
-
"typecheck": "bun check"
|
|
25
|
+
"typecheck": "bun check",
|
|
26
|
+
"dev:link": "ln -sfn \"$PWD/src/index.ts\" \"$HOME/.bun/bin/mpcdev\""
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@biomejs/biome": "^2.5.13",
|
package/src/cli/engine/score.ts
CHANGED
|
@@ -76,19 +76,19 @@ export function assignValueIndex(metrics: EntryMetrics[], config: ScoreConfig):
|
|
|
76
76
|
const byAbility = of(scored, ability);
|
|
77
77
|
const bySpeed = of(speeded, speed);
|
|
78
78
|
|
|
79
|
-
//
|
|
80
|
-
//
|
|
79
|
+
// Unlimited requests win the volume term outright — you cannot buy more than
|
|
80
|
+
// infinite — but the model still enters the composite, so a free model with a
|
|
81
|
+
// low ability no longer outranks everything by virtue of being free.
|
|
82
|
+
const volumeTerm = (m: EntryMetrics) =>
|
|
83
|
+
Number.isFinite(m.requestsPerMonth) ? (byVolume.get(m) ?? 0.5) : 1;
|
|
84
|
+
|
|
81
85
|
const composites = new Map<EntryMetrics, number>();
|
|
82
86
|
for (const m of scored) {
|
|
83
|
-
if (!Number.isFinite(m.requestsPerMonth)) {
|
|
84
|
-
m.valueIndex = 100;
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
87
|
composites.set(
|
|
88
88
|
m,
|
|
89
89
|
100 * (wAbility ?? 0) * (byAbility.get(m) ?? 0.5) +
|
|
90
90
|
100 * (wTps ?? 0) * (bySpeed.get(m) ?? 0.5) +
|
|
91
|
-
100 * (wVolume ?? 0) * (
|
|
91
|
+
100 * (wVolume ?? 0) * volumeTerm(m) +
|
|
92
92
|
100 * (wCache ?? 0) * (1 - (byCache.get(m) ?? 0.5)) +
|
|
93
93
|
100 * (wOutput ?? 0) * (1 - (byOutput.get(m) ?? 0.5)),
|
|
94
94
|
);
|
package/src/constants/data.ts
CHANGED
|
@@ -13,6 +13,13 @@ export const ALIASES: Record<string, string> = {
|
|
|
13
13
|
// CommandCode prefixes these with "Tencent"; OpenCode Go does not.
|
|
14
14
|
tencenthy3: "hy3",
|
|
15
15
|
tencenthy4preview: "hy4preview",
|
|
16
|
+
// AA's slug keeps the vendor the catalogs drop: "tencent-hy4", "reflection-beam".
|
|
17
|
+
tencenthy4: "hy4",
|
|
18
|
+
reflectionbeam: "beam10",
|
|
19
|
+
// AA suffixes the bake date onto the slug: "mimo-v2-5-0424".
|
|
20
|
+
mimov250424: "mimov25",
|
|
21
|
+
// CommandCode lists the same Jev build twice, once with its version suffix.
|
|
22
|
+
jev1140: "jev",
|
|
16
23
|
// CommandCode writes "(exp)"; OpenCode Go writes "-exp".
|
|
17
24
|
deepseekv4flashvision: "deepseekv4flashvisionexp",
|
|
18
25
|
// Alibaba's "Qwen3.8-Flash-Next" is the release name of the model
|
package/src/constants/view.ts
CHANGED
|
@@ -100,7 +100,10 @@ export const LEGEND: [string, string][] = [
|
|
|
100
100
|
["ability", "benchmark score for the model (source above)"],
|
|
101
101
|
["tps", "output tokens per second (source above)"],
|
|
102
102
|
["COST", "0-100 volume index: requests/mo, lower is better (no ability)"],
|
|
103
|
-
[
|
|
103
|
+
[
|
|
104
|
+
"VAL",
|
|
105
|
+
"0-100 ability-aware value: ability + speed + volume + cache + output · a free row wins volume only, so it can post COST 0 and a mid VAL",
|
|
106
|
+
],
|
|
104
107
|
];
|
|
105
108
|
|
|
106
109
|
export const CSV_HEADER = [
|