From 4615a2d74b2b17f7fa04cc5971a14e5e0198a29c Mon Sep 17 00:00:00 2001 From: Asankhaya Sharma Date: Sun, 5 Jul 2026 13:30:25 +0800 Subject: [PATCH] Fix PyPI wheel deps: add math-verify, cap transformers <5.13 (bump 0.3.21) The published wheel is built from pyproject.toml [project.dependencies], which had drifted from requirements.txt. As a result `pip install optillm` shipped a broken package: - math-verify was missing entirely, so `import optillm` failed with ModuleNotFoundError (optillm.cepo imports math_verify at import time) -- the package would not even start. - transformers was unpinned, so the mlx-lm cap added in 0.3.19 (requirements.txt only) never reached PyPI; installs pulled transformers 5.13.0 and broke mlx-lm on Apple silicon. Sync the runtime deps into pyproject.toml: - add math-verify - transformers>=5.0.0,<5.13.0 - outlines[transformers]>=1.2.3 Verified by building the wheel and installing it into a clean venv (only its declared deps) and importing optillm successfully. Co-Authored-By: Claude Opus 4.8 (1M context) --- optillm/__init__.py | 2 +- pyproject.toml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/optillm/__init__.py b/optillm/__init__.py index aea5fc3..b18101a 100644 --- a/optillm/__init__.py +++ b/optillm/__init__.py @@ -1,5 +1,5 @@ # Version information -__version__ = "0.3.20" +__version__ = "0.3.21" import os as _os diff --git a/pyproject.toml b/pyproject.toml index d534dd4..5a69a54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "optillm" -version = "0.3.20" +version = "0.3.21" description = "An optimizing inference proxy for LLMs." readme = "README.md" license = "Apache-2.0" @@ -24,7 +24,9 @@ dependencies = [ "aiohttp", "flask", "torch", - "transformers", + # Cap below 5.13: transformers 5.13.0 tightened AutoTokenizer.register() to + # require a class, which breaks mlx-lm (registers a tokenizer by string name). + "transformers>=5.0.0,<5.13.0", "azure-identity", "tiktoken", "scikit-learn", @@ -44,11 +46,12 @@ dependencies = [ "gradio<5.16.0", "spacy>=3.7.0", "cerebras_cloud_sdk", - "outlines[transformers]", + "outlines[transformers]>=1.2.3", "sentencepiece", "mcp", "adaptive-classifier", "datasets", + "math-verify", "PyYAML", "selenium", "webdriver-manager",