@melaya/runner 1.0.46 → 1.0.48

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.
@@ -206,6 +206,25 @@ async def _ingest(args) -> int:
206
206
  from agentscope.rag import QdrantStore, SimpleKnowledge
207
207
  store_path = _resolve_store_path(args.pipeline_name)
208
208
  store_path.mkdir(parents=True, exist_ok=True)
209
+ # ── Fix qdrant-client's location-vs-path ambiguity ───────────────
210
+ # agentscope's QdrantStore only exposes `location=` and forwards
211
+ # it verbatim to `AsyncQdrantClient(location=...)`. When `location`
212
+ # is a filesystem path (not `:memory:` and not a URL), qdrant-client
213
+ # tries to parse it as a host:port → getaddrinfo → fails with
214
+ # `[Errno 8] nodename nor servname provided` on Mac / `[Errno
215
+ # 11001] getaddrinfo failed` on Windows. Per-file embedding then
216
+ # crashes 240 times in a row. Reroute `location=<path>` into the
217
+ # dedicated `path=` kwarg the embedded-mode wants.
218
+ import qdrant_client as _qc
219
+ _orig_qcinit = _qc.AsyncQdrantClient.__init__
220
+ def _patched_qcinit(self, location=None, **_kw):
221
+ if (location and location != ":memory:"
222
+ and "://" not in str(location)
223
+ and not _kw.get("path")):
224
+ _kw["path"] = location
225
+ location = None
226
+ _orig_qcinit(self, location=location, **_kw)
227
+ _qc.AsyncQdrantClient.__init__ = _patched_qcinit
209
228
  store = QdrantStore(
210
229
  location=str(store_path),
211
230
  collection_name=args.pipeline_name,
@@ -68,7 +68,17 @@ const FAMILY_OVERRIDES = [
68
68
  { pattern: /qwen3.*vl.*\b8b\b/i, family: "qwen3", tier: "agentic-capable", thinking: "on", reason: "qwen3-vl-8b: agentic-capable, full thinking" },
69
69
  // ── Qwen3 — capable (≥8B) BEFORE the smaller non-vl 4b pattern, so
70
70
  // 14b / 32b don't get caught by the 4b regex's stem match. ──
71
- { pattern: /qwen3.*\b(8b|14b|32b)\b/i, family: "qwen3", tier: "agentic-capable", thinking: "on", reason: "qwen3 ≥8b: agentic-capable" },
71
+ // Mainline qwen3 releases ship 8B, 14B, 32B. Custom/finetuned
72
+ // 27B/30B/72B variants exist (e.g. qwen3.6-27b on LM Studio) — we
73
+ // enumerate them so `family="qwen3"` propagates and model.py can
74
+ // apply chat_template_kwargs.enable_thinking=false when needed.
75
+ // Without the explicit 27b entry, qwen3.6-27b falls through to
76
+ // the param-count path with `family=null`, the disable_thinking
77
+ // branch in model.py is skipped, and the model produces
78
+ // thinking-only responses that the OpenAI formatter drops (run
79
+ // 1ecad7cb hit this — Copywriter ended in 11.5KB thinking block,
80
+ // ReportWriter emailed [CONTENT NOT AVAILABLE]).
81
+ { pattern: /qwen3.*\b(8b|14b|27b|30b|32b|72b)\b/i, family: "qwen3", tier: "agentic-capable", thinking: "off", reason: "qwen3 ≥8b: agentic-capable, thinking disabled (model is large enough to reason without explicit <think> blocks; thinking-only responses get stripped by the OpenAI formatter and lose data to next agent)" },
72
82
  // ── Qwen3 — small variants ──
73
83
  { pattern: /qwen3.*\b1\.7b\b/i, family: "qwen3", tier: "text-only", thinking: "off", reason: "qwen3-1.7b: param count below the agentic 7B floor; thinking disabled to prevent <think> loops" },
74
84
  { pattern: /qwen3.*\b0\.5b\b/i, family: "qwen3", tier: "text-only", thinking: "off", reason: "qwen3-0.5b: too small for agentic work" },
@@ -214,7 +224,7 @@ export function classifyModel(id, lmstudioMeta) {
214
224
  // Bump whenever FAMILY_OVERRIDES, tier thresholds, or any classifier
215
225
  // logic changes in a way that could re-tier an existing cached model.
216
226
  // Cached profiles with a mismatched version are ignored and re-classified.
217
- const PROFILE_SCHEMA_VERSION = 2;
227
+ const PROFILE_SCHEMA_VERSION = 3;
218
228
  const LMSTUDIO_BASE = process.env.LMSTUDIO_BASE_URL || "http://127.0.0.1:1234";
219
229
  const OLLAMA_BASE = process.env.OLLAMA_BASE_URL || "http://127.0.0.1:11434";
220
230
  // JIT-load timeout. 8B-class quantised models on M-series Macs typically
package/localRagIngest.py CHANGED
@@ -206,6 +206,25 @@ async def _ingest(args) -> int:
206
206
  from agentscope.rag import QdrantStore, SimpleKnowledge
207
207
  store_path = _resolve_store_path(args.pipeline_name)
208
208
  store_path.mkdir(parents=True, exist_ok=True)
209
+ # ── Fix qdrant-client's location-vs-path ambiguity ───────────────
210
+ # agentscope's QdrantStore only exposes `location=` and forwards
211
+ # it verbatim to `AsyncQdrantClient(location=...)`. When `location`
212
+ # is a filesystem path (not `:memory:` and not a URL), qdrant-client
213
+ # tries to parse it as a host:port → getaddrinfo → fails with
214
+ # `[Errno 8] nodename nor servname provided` on Mac / `[Errno
215
+ # 11001] getaddrinfo failed` on Windows. Per-file embedding then
216
+ # crashes 240 times in a row. Reroute `location=<path>` into the
217
+ # dedicated `path=` kwarg the embedded-mode wants.
218
+ import qdrant_client as _qc
219
+ _orig_qcinit = _qc.AsyncQdrantClient.__init__
220
+ def _patched_qcinit(self, location=None, **_kw):
221
+ if (location and location != ":memory:"
222
+ and "://" not in str(location)
223
+ and not _kw.get("path")):
224
+ _kw["path"] = location
225
+ location = None
226
+ _orig_qcinit(self, location=location, **_kw)
227
+ _qc.AsyncQdrantClient.__init__ = _patched_qcinit
209
228
  store = QdrantStore(
210
229
  location=str(store_path),
211
230
  collection_name=args.pipeline_name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melaya/runner",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
4
4
  "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,