openzoo 0.50.56 → 0.50.57

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.
@@ -45,6 +45,7 @@ import {
45
45
  DEFAULT_WAKEUP_PROMPT, addDeletedIds, filterDeleted,
46
46
  } from './grokbotAccount.js';
47
47
  import { formatSpendFooter, mergeTurnProof } from './spendProof.js';
48
+ import { zooModelIds } from './models.js';
48
49
  import { prefixVisitorRichText } from './grokbotweb.js';
49
50
  import {
50
51
  ingestUpload, lookupUpload, readUploadChunk, readUploadImage, readUploadText,
@@ -1842,14 +1843,24 @@ const MODEL_ALIASES = {
1842
1843
  'glm-5.3': 'zai-org/glm-5.3-flash',
1843
1844
  'glm-5.3-flash': 'zai-org/glm-5.3-flash',
1844
1845
  flash: 'zai-org/glm-5.3-flash',
1846
+ abliterated: 'abliterated-model-large-v2',
1847
+ ablit: 'abliterated-model-large-v2',
1848
+ 'abliterated-large': 'abliterated-model-large-v2',
1849
+ 'abliterated-small': 'abliterated-model',
1845
1850
  };
1846
- function resolveModelId(raw) {
1851
+ async function resolveModelId(raw) {
1847
1852
  const s = String(raw || '').trim();
1848
1853
  if (!s) return null;
1849
1854
  const lower = s.toLowerCase().replace(/^\/+/, '');
1850
1855
  if (MODEL_ALIASES[lower]) return MODEL_ALIASES[lower];
1851
1856
  if (s.includes('/')) return s;
1852
- return null;
1857
+ // No vendor prefix and no alias: the LIVE catalog decides, not this file.
1858
+ // The zoo serves ids with no slash at all (abliterated-model*), and a
1859
+ // hardcoded "must contain /" rule rejected every one of them.
1860
+ try {
1861
+ const ids = await zooModelIds();
1862
+ return ids.find((id) => id === s) || ids.find((id) => id.toLowerCase() === lower) || null;
1863
+ } catch { return null; }
1853
1864
  }
1854
1865
  function currentModel(agentId) {
1855
1866
  return agentModels.get(agentId)
@@ -3205,9 +3216,9 @@ async function handleHijackedPodHttp(req, res, full, body, log) {
3205
3216
  const cur = currentModel(agentId);
3206
3217
  text = `current model: ${cur}\nset with /model fable | opus | sonnet | grok | glm | provider/id`;
3207
3218
  } else {
3208
- const id = resolveModelId(want) || (want.includes('/') ? want : null);
3219
+ const id = (await resolveModelId(want)) || (want.includes('/') ? want : null);
3209
3220
  if (!id) {
3210
- text = `unknown model "${want}". try /model fable | opus | sonnet | grok or a full id like anthropic/claude-fable-5`;
3221
+ text = `unknown model "${want}" — not in the zoo's live catalog. try /model fable | opus | sonnet | grok | glm | abliterated, or any id from GET /v1/models`;
3211
3222
  } else {
3212
3223
  agentModels.set(agentId, id);
3213
3224
  saveAgentModels();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.50.56",
3
+ "version": "0.50.57",
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",