openzoo 0.50.68 → 0.50.70

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.
@@ -1836,14 +1836,20 @@ const MODEL_ALIASES = {
1836
1836
  opus: 'anthropic/claude-opus-5',
1837
1837
  'opus-5': 'anthropic/claude-opus-5',
1838
1838
  sonnet: 'anthropic/claude-sonnet-5',
1839
- grok: 'x-ai/grok-4.6',
1840
- 'grok-4': 'x-ai/grok-4.6',
1841
- 'grok-4.6': 'x-ai/grok-4.6',
1839
+ // BARE grok-4.6 is the bazaar (x402 door) row; x-ai/grok-4.6 is OpenRouter's
1840
+ // and drains OpenRouter credits. Every spelling lands on the bare id.
1841
+ grok: 'grok-4.6',
1842
+ 'grok-4': 'grok-4.6',
1843
+ 'grok-4.6': 'grok-4.6',
1844
+ 'x-ai/grok-4.6': 'grok-4.6',
1842
1845
  glm: 'zai-org/glm-5.3-flash',
1843
1846
  'glm-5': 'zai-org/glm-5.3-flash',
1844
1847
  'glm-5.3': 'zai-org/glm-5.3-flash',
1845
1848
  'glm-5.3-flash': 'zai-org/glm-5.3-flash',
1846
1849
  flash: 'zai-org/glm-5.3-flash',
1850
+ auto: 'auto',
1851
+ 'openrouter/auto': 'auto',
1852
+ 'openzoo/auto': 'auto',
1847
1853
  deepseek: 'deepseek/deepseek-v4-pro',
1848
1854
  'deepseek-pro': 'deepseek/deepseek-v4-pro',
1849
1855
  'deepseek-flash': 'deepseek/deepseek-v4-flash',
@@ -1857,7 +1863,7 @@ const MODEL_ALIASES = {
1857
1863
  * — the bazaar (x402 upstream) row, not OpenRouter's `x-ai/grok-4.6`. The
1858
1864
  * gateway serves the bare id off an x402 door with an on-chain cogs receipt,
1859
1865
  * so an OpenRouter credit outage cannot take it down. */
1860
- export const DEFAULT_ZOO_MODEL = 'grok-4.6';
1866
+ export const DEFAULT_ZOO_MODEL = 'auto';
1861
1867
  async function resolveModelId(raw) {
1862
1868
  const s = String(raw || '').trim();
1863
1869
  if (!s) return null;
@@ -1872,10 +1878,14 @@ async function resolveModelId(raw) {
1872
1878
  return ids.find((id) => id === s) || ids.find((id) => id.toLowerCase() === lower) || null;
1873
1879
  } catch { return null; }
1874
1880
  }
1881
+ export function canonicalZooModel(id) {
1882
+ const s = String(id || '').trim();
1883
+ return MODEL_ALIASES[s.toLowerCase()] || s;
1884
+ }
1875
1885
  function currentModel(agentId) {
1876
- return agentModels.get(agentId)
1886
+ return canonicalZooModel(agentModels.get(agentId)
1877
1887
  || process.env.OPENZOO_DEFAULT_MODEL
1878
- || DEFAULT_ZOO_MODEL;
1888
+ || DEFAULT_ZOO_MODEL);
1879
1889
  }
1880
1890
 
1881
1891
  const execFileAsync = promisify(execFile);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.50.68",
3
+ "version": "0.50.70",
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",