# Record of the last QA'd pip stack. Nothing installs this file any more (see below);
# it is kept as the wheel-set record the Settings → "stable" summary reads.
#
# What this file is for:
#   * It names the wheel set behind the Settings → "stable" summary text.
#   * It is the drift-checked record of the pins the retired Python engine ran on
#     (tests/test_mlx_install_dependencies.py keeps its declarations honest).
#
# RETIRED (Arguments F304, Oct 2026): the opt-in Python engine (``local_engine:
# mlx-vlm``, ``python -m mlx_vlm.server``) was removed, so there is no
# ``~/.mugi/mlx-venv`` to install this set into, no pin migration, and no
# ``mlx-vlm`` pin below. The local model server is the native mlx-serve binary.
#
# NOT a manual step and NOT a recovery route: do not run this file with pip by hand
# (e.g. Homebrew Python 3.14 fails PEP 668 "externally-managed-environment", and on
# newer Pythons the set below may no longer resolve); doing so repairs nothing. The
# in-app setup (first-run wizard or Settings → LLMs) is the only supported install
# path.
#
# Validated Jul 2026 on mlx 0.32.0 + mlx-vlm 0.6.5: text chat + native delta.tool_calls
# on Qwen3.6 and Gemma 4, streaming tool_calls, continuous batching concurrency,
# embeddings; vision/LoRA not re-soaked. Re-soaked Aug 21 2026 on mlx 0.32.1 +
# mlx-vlm 0.6.13 + transformers 5.14.1 (Qwen3.8-27B-8bit): plain chat, native
# search_memory tool_calls (finish_reason=tool_calls), 3-way concurrent streaming
# completions. Vision/LoRA still not re-soaked. The retired engine's last soak was
# Sep 21 2026 on mlx 0.32.2 + mlx-vlm 0.6.13 (6/6 via scripts/mlx_engine_soak.py,
# itself removed with the engine).
#
# Embeddings are deliberately NOT in the soak above, and the reason is narrower than
# "they moved away". `mlx_embeddings` used to live in the engine venv (see the pin lower
# down); the engine venv is gone with the engine, and the path chat actually takes is
# mlx-serve over HTTP (`_forward_batch` -> `mlx_serve_runtime.embed_texts`), so a re-soak
# of a pip venv would be a soak of nothing. Embeddings have their own gate.
#
# Stack history: mlx 0.32.1 + mlx-vlm 0.6.13 + transformers 5.14.1, re-soaked
# 2026-08-21 (Qwen3.8-27B-8bit): plain chat, native search_memory tool_calls
# (finish_reason=tool_calls), 3-way concurrent streaming completions, in-process
# bge-small embeddings (dim=384). Vision/LoRA not re-soaked. Earlier Jul 2026
# soak: mlx 0.32.0 + mlx-vlm 0.6.5 (text chat, native delta.tool_calls, streaming
# tool_calls, continuous batching concurrency, embeddings).
#
# transformers is PINNED (not floating): mlx-embeddings loads in-process and a
# transformers major bump can break knowledge/session embeddings at runtime; the
# retired engine's mlx-vlm also imposed a floor (0.6.5+ required transformers>=5.14.0).
# Pinning below that floor made this set unresolvable (ResolutionImpossible —
# GitHub issue #1, Jul 2026). Move the pins as a SET, only after on-device
# testing (vision + text + tool calls).
#
# Nothing installs this set any more (Arguments F304): the pin-migration entry point
# (`mugi_backend._auto_start_mlx_vlm_engine` -> `app_mlx.migrate_mlx_venv_to_pinned_if_
# behind`) is gone with the engine, so these pins are the QA'd record and the source of
# the Settings → "stable" summary text, not an install plan.
# Deeper rollback to the retired mlx-openai-server stack: requirements-mlx-openai-legacy.txt.
mlx==0.32.2
mlx-metal==0.32.2
mlx-lm[train]==0.31.3
transformers==5.14.1
# Knowledge/session semantic search (separate from chat mlx-lm); required for vector index.
mlx-embeddings>=0.0.5,<0.2
# The anchored-fact judge's head (`scripts/laya_noul_worker.py`, F149). It needs
# `mlx>=0.32.2,<0.33` — exactly this stack — and it costs almost nothing to add:
# `pip install --dry-run laya-mlx` answers "Would install laya-mlx-0.1.0" and nothing
# else (it vendors its own tokenizers/huggingface-hub instead of re-pinning the ones the
# embedding fallback loads). It now lives in the durable `~/.mugi/laya-venv`
# (`utils/decision_worker`), not in the engine venv, since the engine venv was removed.
# Measured Sep 21 2026: that venv grades the 146-row sheet to the same 0.781 (16 unsafe)
# as the throwaway venv F149 used, on byte-identical labels (sha256 4fe9ee30..b45667) in
# ~4s. Its 843 MB model.safetensors arrives from the Hub on the first decision, not from
# this install, so the pin costs 56 KB and not 843 MB.
# COUPLING: `mlx<0.33` makes an mlx bump past 0.32.x unresolvable until laya moves with
# it — the same ResolutionImpossible trap `transformers` set in Aug 2026. Re-run
# the file's dry-run resolution (never a real install) after touching either.
laya-mlx==0.1.0
