What's New
v0.68.0 — Anti-trend Insurance. Five commands that hedge Soup against paradigm shifts. If 1M-token contexts kill fine-tuning, soup compile (DSPy + GEPA + TextGrad prompt-program compilation) replaces it. If teams hit prompt-cost walls, soup distill-prompt bridges to small FT. If only Apple Foundation Models win on-device, soup apple-adapter ships the converter+signing surface. If personal-LLM flywheels become the shape, soup local-rl captures thumbs into SQLite and emits DPO pairs.
soup compile <program.py> --eval <suite> [--optimizer mipro|gepa|textgrad|copro|bootstrap_fewshot]— DSPy / GEPA prompt-program compiler. Closed allowlist of 5 optimisers. FrozenCompilePlanre-validates on construction.CompileResultrejects NaN / ±Inf / bool-score / negative iterations. Live orchestrator deferred → v0.68.1.soup distill-prompt --traces <jsonl> --teacher <m> --student <m> --strategy sft|preference|kl— Distill prompt-heavy GPT-5 / Claude traces into a small FT plan. Bridge between prompt-engineering and FT worlds. Composes with v0.70 cross-tokenizer KD. Live runner → v0.68.1.soup compile-tools <spec.json|yaml> --eval <jsonl>— TextGrad / GEPA tool-schema optimiser over OpenAPI / MCP / GraphQL specs. Composes with v0.46soup agent. JSON / YAML / YML extension allowlist + cwd containment + symlink rejection. Live optimiser → v0.68.1.soup apple-adapter <dir> --direction hf-to-mlx|mlx-to-hf|hf-to-apple|mlx-to-apple [--sign]— Adapter format conversion + optional v0.60 Merkle-root signing. Extends v0.25 MLX backend. Live converter → v0.68.1.soup local-rl init|status|record|harvest|train— Personal-LLM flywheel daemon. LIVE today: SQLite schema (thumbs+interactionstables, 0o600 perms on POSIX) +record_thumb(parameterised SQL, ≤16 KiB caps, allowlist CHECK constraint) +harvest_dpo_pairs(last-writes-win dedup →{prompt, chosen, rejected}JSONL). Smaller-scope cousin of v0.58soup loop. Nightly DPO/KTO/ORPO scheduler → v0.68.1.- +204 tests (11021 → 11225) across 6 new files. Review-fix coverage: 0 CRITICAL + 4 HIGH + 10 MEDIUM + 4 LOW. Lint clean.
Install / Upgrade
pip install --upgrade soup-cli
# or
docker pull ghcr.io/makazhanalpamys/soup:v0.68.0Security
- All 5 utility modules enforce cwd containment +
os.lstat + S_ISLNKrejection on every file path (TOCTOU defence — mirrors v0.33.0 #22 / v0.43.0 Part C / v0.66.0 policy). - Bool-as-int rejection before every numeric
isinstance(int)check (matches v0.30.0Candidatepolicy). - Null-byte rejection on every operator-supplied string.
_validate_db_pathexposed as publicvalidate_db_path+ added to__all__.- POSIX symlink-skip test predicate corrected to
sys.platform != "win32"(Windows hasos.symlinkbut needs elevation — the previoushasattr(os, "symlink")would have silently skipped the rejection coverage on Windows CI). - SQLite uses parameterised queries throughout — no string interpolation in
record_thumb/harvest_dpo_pairs. - Atomic writes via shared
paths.atomic_write_text(mkstemp + os.replace, TOCTOU-safe). - Every CLI command panel passes user-controlled fields through
rich.markup.escape. - No
shell=Trueanywhere in v0.68.0 code paths (source-grep regression-guarded).
Known Limitations
- Live runners deferred to v0.68.1 —
run_compile(DSPy/GEPA orchestrator),prepare_distill_dataset,run_tool_compile,convert_apple_adapter, andrun_nightly_trainall raiseNotImplementedErrorwith explicitv0.68.1markers. Schema accepts every flag; CLI invocations are gated by validators so misconfigured runs fail loudly at config load. Same stub-then-live cadence as v0.50.0 / v0.61.0 / v0.62.0 / v0.67.0. - Part E nightly scheduler is the only Part E gap —
soup local-rl init/status/record/harvestare LIVE today. Operators can harvest their personal-LLM feedback intodpo_pairs.jsonland feed it to existingsoup train --task dpo. The v0.68.1 deliverable is the systemd/launchd cron glue. compile_cmdmodule name vscompileCLI command — source-file iscommands/compile_cmd.py(notcompile.py) because Python's builtincompile()would shadow atfrom soup_cli.commands import compile. CLI surface is unchanged:soup compile.harvest_dpo_pairslast-writes-win dedup — multiple ups + downs for the same prompt collapse to ONE pair using the most recent up + most recent down (deterministic byts ASC). Operators wanting Cartesian-product pairs (every up × every down per prompt) should harvest the rawthumbstable directly.- Apple FoundationModels adapter format is undocumented territory — v0.68.0 ships the schema + plan + validation surface; v0.68.1's live converter will track whatever Apple publishes between now and that release.
compile-toolsaccepts.json/.yaml/.ymlonly — operators using.tomlor other spec formats must convert upstream.- No live
soup serve --record-thumbsintegration — operators must manually wire their inference loop to callrecord_thumb. A v0.68.x patch may addsoup serve --record-thumbs <db>for automatic capture.
Full changelog
v0.67.0...v0.68.0 — v0.67.0...v0.68.0