openzoo 0.49.13 → 0.49.15

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/lib/config.js CHANGED
@@ -10,7 +10,12 @@ export const config = {
10
10
  // overrides for anyone who wants their own.
11
11
  rpcUrl: process.env.OPENZOO_RPC || 'https://eu.fluxrpc.com?key=ab9278e1-6430-41ab-aee0-ac6b759a1fe4',
12
12
  // Which accepts[] row to pay with, by extra.symbol (internal rail selector).
13
- token: process.env.OPENZOO_TOKEN || 'yUSDCx',
13
+ // wTOKENx3 (the HSyC twin of TOKEN, fixed wrap program) is the DEFAULT
14
+ // preference: a wallet holding TOKEN wraps-and-pays in TOKEN. The picker
15
+ // walks best-first and takes the first AFFORDABLE row, so wallets without
16
+ // TOKEN fall through to yUSDCx/USDC exactly as before. OPENZOO_TOKEN
17
+ // overrides.
18
+ token: process.env.OPENZOO_TOKEN || 'wTOKENx3',
14
19
  // Force a rail: 'solana' | 'base' | 'robinhood'. Unset -> Solana-first order.
15
20
  // pickAccept errors clearly when the live 402 does not offer the forced rail.
16
21
  rail: (process.env.OPENZOO_RAIL || '').toLowerCase() || null,
package/lib/openclaw.js CHANGED
@@ -90,6 +90,28 @@ export function mergeOpenClawConfig(existing, { port, entries, defaultId, forceD
90
90
  api: 'openai-completions',
91
91
  models: entries,
92
92
  };
93
+ // REPAIR WIZARD-CREATED ZOO PROVIDERS TOO. OpenClaw's own Custom Provider
94
+ // flow points at the zoo but ignores what /v1/models says: cost is
95
+ // hard-coded $0.00 and contextWindow defaults to 128k — measured
96
+ // 2026-08-24 on a `custom-x402-tokens-fly-dev` provider whose status line
97
+ // read "0/128k" while every zoo model is client-usable to 128M via spill.
98
+ // Any OTHER provider whose baseUrl is a zoo endpoint gets its model rows
99
+ // fixed in place (window always; cost only when the id is in our entries).
100
+ const ZOO_BASE_RE = /localhost:8402|127\.0\.0\.1:8402|x402-tokens\.fly\.dev|api\.openzoo\.fun/i;
101
+ const repaired = [];
102
+ const costById = new Map(entries.map((e) => [e.id, e.cost]));
103
+ for (const [name, prov] of Object.entries(cfg.models.providers)) {
104
+ if (name === PROVIDER_KEY || !prov || typeof prov !== 'object') continue;
105
+ if (!ZOO_BASE_RE.test(String(prov.baseUrl || ''))) continue;
106
+ for (const m of Array.isArray(prov.models) ? prov.models : []) {
107
+ let touched = false;
108
+ if (Number(m.contextWindow) < 128_000_000) { m.contextWindow = 128_000_000; touched = true; }
109
+ const bare = String(m.id || '').replace(/^openzoo[-/]/i, '');
110
+ const cost = costById.get(m.id) || costById.get(bare);
111
+ if (cost && (!m.cost || (!m.cost.input && !m.cost.output))) { m.cost = { ...cost }; touched = true; }
112
+ if (touched) repaired.push(`${name}/${m.id}`);
113
+ }
114
+ }
93
115
  let changedDefault = false;
94
116
  const ref = defaultId ? `${PROVIDER_KEY}/${defaultId}` : null;
95
117
  if (ref) {
@@ -104,7 +126,7 @@ export function mergeOpenClawConfig(existing, { port, entries, defaultId, forceD
104
126
  changedDefault = true;
105
127
  }
106
128
  }
107
- return { cfg, changedDefault };
129
+ return { cfg, changedDefault, repaired };
108
130
  }
109
131
 
110
132
  async function fetchCatalogRows() {
@@ -174,7 +196,7 @@ export async function setupOpenClaw(argv = []) {
174
196
  fs.mkdirSync(path.dirname(file), { recursive: true });
175
197
  }
176
198
 
177
- const { cfg, changedDefault } = mergeOpenClawConfig(existing, {
199
+ const { cfg, changedDefault, repaired } = mergeOpenClawConfig(existing, {
178
200
  port: config.port,
179
201
  entries,
180
202
  defaultId,
@@ -183,6 +205,9 @@ export async function setupOpenClaw(argv = []) {
183
205
  fs.writeFileSync(file, `${JSON.stringify(cfg, null, 2)}\n`);
184
206
 
185
207
  console.log(`wrote ${entries.length} zoo model(s) with real ceiling prices into ${file}`);
208
+ for (const r of repaired || []) {
209
+ console.log(` repaired wizard-created zoo provider entry: ${r} (contextWindow -> 128M, cost when known)`);
210
+ }
186
211
  for (const e of entries) {
187
212
  console.log(` ${PROVIDER_KEY}/${e.id} $${e.cost.input}/Mtok in, $${e.cost.output}/Mtok out`);
188
213
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.49.13",
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.",
3
+ "version": "0.49.15",
4
+ "description": "Local x402-paying proxy + MCP server for openzoo.fun \u2014 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",
7
7
  "bin": {
@@ -42,4 +42,4 @@
42
42
  "openzoo",
43
43
  "payments"
44
44
  ]
45
- }
45
+ }