openzoo 0.48.38 → 0.48.39

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/lib/proxy.js +6 -0
  2. package/package.json +1 -1
package/lib/proxy.js CHANGED
@@ -1106,6 +1106,12 @@ export async function startProxy({ silent = false, requireToken = null, sessionM
1106
1106
  sessionCogs += typeof x.cogsUsd === 'number' ? x.cogsUsd : x.billedUsd / MARKUP;
1107
1107
  sessionDirect += typeof x.directUsd === 'number' ? x.directUsd : x.billedUsd;
1108
1108
  if (didSpill) {
1109
+ // THE number that settles why a spilled call did or did not save:
1110
+ // the gateway only prices a counterfactual when corpusTokens >
1111
+ // promptTokens, so a tail that rivals the corpus silently falls
1112
+ // back to markup and direct collapses onto billed.
1113
+ const lc = x.lecore || {};
1114
+ log(`spill priced: ${x.pricing} · corpus ${lc.corpusTokens ?? '?'} tok vs sent ${lc.tokensBefore ?? '?'} -> ${lc.tokensAfter ?? '?'} · billed ${(x.billedUsd ?? 0).toFixed(5)} direct ${(x.directUsd ?? 0).toFixed(5)}`);
1109
1115
  spillSpend += x.billedUsd;
1110
1116
  spillDirect += typeof x.directUsd === 'number' ? x.directUsd : x.billedUsd;
1111
1117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.48.38",
3
+ "version": "0.48.39",
4
4
  "description": "Local x402-paying proxy + MCP server for openzoo.fun — point any OpenAI-compatible harness (Cursor, Claude Code, aider, SDKs) at localhost and it pays per call from a local burner wallet. Solana and Base rails live; Robinhood experimental.",
5
5
  "license": "MIT",
6
6
  "type": "module",