openzoo 0.22.0 → 0.22.2

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/setup.js +21 -1
  2. package/package.json +1 -1
package/lib/setup.js CHANGED
@@ -70,7 +70,25 @@ async function catalogModels(base) {
70
70
  //
71
71
  // OPENZOO_EDITOR_MODELS overrides the list; the zoo model each one lands on is
72
72
  // still steerable per-request, and OPENZOO_DEFAULT_MODEL pins them all.
73
- const fallback = ['gpt-4o', 'gpt-4.1', 'gpt-4-turbo', 'o3', 'o3-mini', 'o4-mini', 'gpt-4o-mini'];
73
+ // EVERY id we publish that a mainstream editor also knows — all vendors, not
74
+ // just OpenAI. These are lib/models.js's ALIAS_IDS: each is served by the proxy
75
+ // (GET /v1/models lists them) and each maps to a DIFFERENT zoo model by the
76
+ // similarity scorer, so picking claude-opus-4-1 vs gemini-2.5-flash vs grok-4
77
+ // really does change which model answers.
78
+ // UNGATED NAMES ONLY, BY DEFAULT.
79
+ //
80
+ // The editor gates its own catalog per plan, on the NAME, before any request
81
+ // leaves the process — MEASURED: claude-opus-4-1 answers "Max Mode Required",
82
+ // and other names answer "Model name is not valid". Neither ever reaches us, so
83
+ // neither is something the proxy can fix. The ids below are the ones no plan
84
+ // gates. The NAME is only the editor's label: OPENZOO_DEFAULT_MODEL decides
85
+ // which zoo model actually answers, so `gpt-4o` can be served by Opus 5.
86
+ //
87
+ // OPENZOO_EDITOR_MODELS=all offers every alias (claude-*, gemini-*, grok-*,
88
+ // o3…) for accounts whose plan allows them.
89
+ const { ALIAS_IDS } = await import('./models.js');
90
+ const UNGATED = ['gpt-4o', 'gpt-4o-mini', 'gpt-4-turbo', 'gpt-4.1', 'gpt-4.1-mini', 'gpt-3.5-turbo'];
91
+ const fallback = process.env.OPENZOO_EDITOR_MODELS === 'all' ? [...ALIAS_IDS] : UNGATED;
74
92
  if (process.env.OPENZOO_EDITOR_MODELS) {
75
93
  return process.env.OPENZOO_EDITOR_MODELS.split(',').map((m) => m.trim()).filter(Boolean);
76
94
  }
@@ -79,6 +97,8 @@ async function catalogModels(base) {
79
97
  const d = await r.json();
80
98
  const have = new Set((d.data || []).map((m) => m.id));
81
99
  // Only offer ids the proxy actually serves, so a pick can never 404.
100
+ // Anything the proxy serves, in the order we prefer to show it. An id the
101
+ // proxy does NOT serve is dropped rather than offered and 404'd.
82
102
  const usable = fallback.filter((id) => have.has(id));
83
103
  return usable.length ? usable : fallback;
84
104
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.22.0",
3
+ "version": "0.22.2",
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",