@meridiona/meridian-darwin-arm64 1.24.3 → 1.24.4

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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.24.3
1
+ 1.24.4
package/bin/meridian CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridiona/meridian-darwin-arm64",
3
- "version": "1.24.3",
3
+ "version": "1.24.4",
4
4
  "description": "Prebuilt Meridian app for macOS arm64 (daemon binary + dashboard + Python services). Installed via @meridiona/meridian.",
5
5
  "homepage": "https://github.com/Meridiona/meridian",
6
6
  "repository": {
@@ -190,6 +190,7 @@ async def classify(req: ClassifyRequest) -> ClassifyResponse:
190
190
 
191
191
  import json as _json
192
192
  import time as _time
193
+ from fastapi.concurrency import run_in_threadpool
193
194
  from outlines.inputs import Chat
194
195
  from mlx_lm.sample_utils import make_sampler
195
196
 
@@ -201,19 +202,24 @@ async def classify(req: ClassifyRequest) -> ClassifyResponse:
201
202
  {"role": "user", "content": req.input},
202
203
  ]
203
204
  t0 = _time.time()
204
- try:
205
+
206
+ def _run_classify() -> "m.SessionClassification":
205
207
  if m._resolve_model_id() == APPLE_INTELLIGENCE_ID:
206
- result = m._classify_apple_fm(messages)
207
- else:
208
- model = m._get_model()
209
- raw = model(
210
- Chat(messages),
211
- output_type=m.SessionClassification,
212
- max_tokens=m._MAX_TOKENS,
213
- sampler=make_sampler(temp=m._TEMPERATURE),
214
- verbose=False,
215
- )
216
- result = m.SessionClassification.model_validate_json(raw)
208
+ # _classify_apple_fm uses asyncio.new_event_loop() internally;
209
+ # must run in a thread (no existing loop) not in the async handler.
210
+ return m._classify_apple_fm(messages)
211
+ model = m._get_model()
212
+ raw = model(
213
+ Chat(messages),
214
+ output_type=m.SessionClassification,
215
+ max_tokens=m._MAX_TOKENS,
216
+ sampler=make_sampler(temp=m._TEMPERATURE),
217
+ verbose=False,
218
+ )
219
+ return m.SessionClassification.model_validate_json(raw)
220
+
221
+ try:
222
+ result = await run_in_threadpool(_run_classify)
217
223
  except Exception as exc:
218
224
  log.warning("classify: inference error: %s", exc)
219
225
  raise HTTPException(status_code=500, detail=str(exc)) from exc
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "meridian-agents"
7
- version = "1.24.3"
7
+ version = "1.24.4"
8
8
  description = "Meridian agents — hermes task linking and Jira progress updates for meridian.db"
9
9
  requires-python = ">=3.11"
10
10
  authors = [{ name = "Meridiona" }]