openzoo 0.18.2 → 0.18.3

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/cursorcfg.js +14 -0
  2. package/package.json +1 -1
package/lib/cursorcfg.js CHANGED
@@ -113,6 +113,19 @@ export function writeEditorProviderConfig(which, { baseUrl, models }) {
113
113
  }
114
114
  doc.availableAPIKeyModels = existing;
115
115
 
116
+ // SELECT it, don't just offer it. Adding a model to the picker leaves the
117
+ // editor on whatever it had — `featureModelConfigs.composer.defaultModel`
118
+ // was "default", i.e. Cursor's Auto router, which chooses ITS OWN models
119
+ // (observed: Grok 4.6 preselected) and never reaches the zoo. Point the
120
+ // agent/composer surfaces at our model and clear the fallbacks, or Auto
121
+ // silently routes around us on the first hiccup.
122
+ const primary = models[0];
123
+ const fmc = (doc.featureModelConfigs && typeof doc.featureModelConfigs === 'object') ? doc.featureModelConfigs : {};
124
+ for (const surface of ['composer', 'cmdK', 'backgroundComposer']) {
125
+ fmc[surface] = { ...(fmc[surface] || {}), defaultModel: primary, fallbackModels: [], bestOfNDefaultModels: [] };
126
+ }
127
+ doc.featureModelConfigs = fmc;
128
+
116
129
  // Single-quote escaping for the SQL literal.
117
130
  const json = JSON.stringify(doc).replace(/'/g, "''");
118
131
  sqlite(db, `UPDATE ItemTable SET value='${json}' WHERE key='${KEY}';`);
@@ -130,6 +143,7 @@ export function writeEditorProviderConfig(which, { baseUrl, models }) {
130
143
  verified = {
131
144
  openAIBaseUrl: doc2.openAIBaseUrl,
132
145
  models: (doc2.availableAPIKeyModels || []).map((m) => (typeof m === 'string' ? m : m?.name)).filter(Boolean),
146
+ selected: doc2.featureModelConfigs?.composer?.defaultModel ?? null,
133
147
  };
134
148
  } catch { /* verification is advisory */ }
135
149
  const modelsStick = models.every((m) => verified.models.includes(m));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.18.2",
3
+ "version": "0.18.3",
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",