opencode-statboard 2.10.27 → 2.10.28

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 +10 -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.28",
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,13 @@ function orRefresh() {
173
173
  };
174
174
  run();
175
175
  }
176
+ // Free models whose paid twin is not on OpenRouter under the same name.
177
+ // The basis is the provider's own paid listing, so the estimate is honest and
178
+ // still disclosed as a proxy (kind 'openrouter').
179
+ const OR_MANUAL = {
180
+ 'baidu/ernie-5.5-flash-preview:free': 'baidu/ernie-light-dt-1.0-intl',
181
+ };
182
+
176
183
  function orEntry(provider, model) {
177
184
  const c = orLoad();
178
185
  if (!c.models) {
@@ -194,6 +201,9 @@ function orEntry(provider, model) {
194
201
  const hits = Object.keys(c.models).filter((id) => id.split('/').pop() === last);
195
202
  if (hits.length === 1) return { ...c.models[hits[0]], id: hits[0] };
196
203
  }
204
+ // Manual paid twin (same provider, different name).
205
+ const manual = OR_MANUAL[`${provider}/${model}`] || OR_MANUAL[model];
206
+ if (manual && c.models[manual]) return { ...c.models[manual], id: manual };
197
207
  return null;
198
208
  }
199
209