opencode-statboard 2.10.27 → 2.10.29

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pricing.js +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-statboard",
3
- "version": "2.10.27",
3
+ "version": "2.10.29",
4
4
  "description": "Real-time dashboard for opencode token usage and cost statistics",
5
5
  "main": "server.js",
6
6
  "bin": {
package/pricing.js CHANGED
@@ -173,6 +173,11 @@ function orRefresh() {
173
173
  };
174
174
  run();
175
175
  }
176
+ // Free models whose paid twin is not on OpenRouter under the same name.
177
+ // Keep empty: only add an entry when the paid twin is the *same model*,
178
+ // otherwise the estimate is misleading (different model = different price).
179
+ const OR_MANUAL = {};
180
+
176
181
  function orEntry(provider, model) {
177
182
  const c = orLoad();
178
183
  if (!c.models) {
@@ -194,6 +199,9 @@ function orEntry(provider, model) {
194
199
  const hits = Object.keys(c.models).filter((id) => id.split('/').pop() === last);
195
200
  if (hits.length === 1) return { ...c.models[hits[0]], id: hits[0] };
196
201
  }
202
+ // Manual paid twin (same provider, different name).
203
+ const manual = OR_MANUAL[`${provider}/${model}`] || OR_MANUAL[model];
204
+ if (manual && c.models[manual]) return { ...c.models[manual], id: manual };
197
205
  return null;
198
206
  }
199
207