@lucasschirm/devinp 0.1.2 → 0.1.3

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 CHANGED
@@ -54,8 +54,9 @@ devinp --json # emit normalized rows as JSON
54
54
 
55
55
  - Prices are USD per 1M tokens; columns are heat-colored green → red.
56
56
  - **Value** = `Bench % ÷ output $/1M` — the score you buy per output dollar.
57
- Free models show `∞`; models without a Bench score show `—` and sort last
58
- under `-o=bench` / `-o=value`.
57
+ Free models always show `∞` and sort first under `-o=bench` / `-o=value`,
58
+ even without a Bench score. Paid models without a score show `—` and sort
59
+ last.
59
60
  - Markers: `β` = beta, `●` = new, magenta name = free. `Sidekick` shows the
60
61
  partner-model pricing for Fusion rows.
61
62
  - Colors disable automatically when piping; `NO_COLOR` / `FORCE_COLOR` are
package/bin/command.js CHANGED
@@ -54666,9 +54666,9 @@ function buildRows(data, scores = {}) {
54666
54666
  return [...rows.values()];
54667
54667
  }
54668
54668
  function computeValue(score, output) {
54669
+ if (output === 0) return Number.POSITIVE_INFINITY;
54669
54670
  if (score == null) return null;
54670
54671
  if (output == null) return null;
54671
- if (output === 0) return Number.POSITIVE_INFINITY;
54672
54672
  return score / output;
54673
54673
  }
54674
54674
  var priceAsc = (field) => (a2, b) => (a2[field] ?? Number.POSITIVE_INFINITY) - (b[field] ?? Number.POSITIVE_INFINITY) || (a2.output ?? Number.POSITIVE_INFINITY) - (b.output ?? Number.POSITIVE_INFINITY) || a2.label.localeCompare(b.label);
@@ -54676,7 +54676,7 @@ var SORTS = {
54676
54676
  input: priceAsc("input"),
54677
54677
  cached: priceAsc("cached"),
54678
54678
  output: priceAsc("output"),
54679
- bench: (a2, b) => (b.bench?.score ?? -1) - (a2.bench?.score ?? -1) || (a2.output ?? Number.POSITIVE_INFINITY) - (b.output ?? Number.POSITIVE_INFINITY) || a2.label.localeCompare(b.label),
54679
+ bench: (a2, b) => (b.free ? 1 : 0) - (a2.free ? 1 : 0) || (b.bench?.score ?? -1) - (a2.bench?.score ?? -1) || (a2.output ?? Number.POSITIVE_INFINITY) - (b.output ?? Number.POSITIVE_INFINITY) || a2.label.localeCompare(b.label),
54680
54680
  value: (a2, b) => (b.value ?? -1) - (a2.value ?? -1) || (b.bench?.score ?? -1) - (a2.bench?.score ?? -1) || a2.label.localeCompare(b.label)
54681
54681
  };
54682
54682
  var SORT_IDS = Object.keys(SORTS);
@@ -54946,7 +54946,7 @@ async function main() {
54946
54946
  input: (a, b) => (a.input ?? 1e9) - (b.input ?? 1e9) || (a.output ?? 1e9) - (b.output ?? 1e9) || a.label.localeCompare(b.label),
54947
54947
  cached: (a, b) => (a.cached ?? 1e9) - (b.cached ?? 1e9) || (a.output ?? 1e9) - (b.output ?? 1e9) || a.label.localeCompare(b.label),
54948
54948
  output: (a, b) => (a.output ?? 1e9) - (b.output ?? 1e9) || a.label.localeCompare(b.label),
54949
- bench: (a, b) => (b.bench?.score ?? -1) - (a.bench?.score ?? -1) || (a.output ?? 1e9) - (b.output ?? 1e9) || a.label.localeCompare(b.label),
54949
+ bench: (a, b) => (b.free ? 1 : 0) - (a.free ? 1 : 0) || (b.bench?.score ?? -1) - (a.bench?.score ?? -1) || (a.output ?? 1e9) - (b.output ?? 1e9) || a.label.localeCompare(b.label),
54950
54950
  value: (a, b) => (b.value ?? -1) - (a.value ?? -1) || (b.bench?.score ?? -1) - (a.bench?.score ?? -1) || a.label.localeCompare(b.label),
54951
54951
  };
54952
54952
  const GROUPS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucasschirm/devinp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Pretty pricing table for Devin models, powered by `devin models list`",
5
5
  "type": "module",
6
6
  "bin": {