Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Classify uv's new --output-format as a value flag in the pip shim (#11715)

Daniel Hanff0a2d78833c
diff --git a/docker/unsloth_pip_shim.py b/docker/unsloth_pip_shim.py
index aa56e3ac652..8adcadaf0ba 100644
--- a/docker/unsloth_pip_shim.py
+++ b/docker/unsloth_pip_shim.py
@@ -130,6 +130,7 @@ _VALUE_FLAGS = {
"--only-final",
"--requirements-from-script",
"--uploaded-prior-to",
+ "--output-format",
}
_REQ_FILE_FLAGS = {"-r", "--requirement", "--requirements"}
_CONSTRAINT_FILE_FLAGS = {"-c", "--constraint", "--constraints"}
diff --git a/tests/python/test_unsloth_pip_shim.py b/tests/python/test_unsloth_pip_shim.py
index 9a3a6945b9a..f7118629f0b 100644
--- a/tests/python/test_unsloth_pip_shim.py
+++ b/tests/python/test_unsloth_pip_shim.py
@@ -677,6 +677,8 @@ def test_local_dir_without_metadata_passes_through(shim, tmp_path):
pytest.param("uv", "--exclude-newer", "2026-01-01", id = "uv-exclude-newer"),
pytest.param("uv", "-b", "build-constraints.txt", id = "uv-build-constraints-short"),
pytest.param("uv", "--prerelease-package", "snac", id = "uv-prerelease-package"),
+ # uv 0.12 added `uv pip install --output-format text|json`, which failed the image build
+ pytest.param("uv", "--output-format", "json", id = "uv-output-format"),
pytest.param("pip", "--proxy", "http://proxy:3128", id = "pip-proxy"),
pytest.param("pip", "--retries", "3", id = "pip-retries"),
pytest.param("pip", "--trusted-host", "mirror.internal", id = "pip-trusted-host"),
@@ -692,6 +694,7 @@ def test_value_flag_protected_only_noops(shim, tool, flag, value):
[
pytest.param("uv", "--torch-backend", "cu128", id = "uv-torch-backend"),
pytest.param("uv", "--resolution", "lowest", id = "uv-resolution"),
+ pytest.param("uv", "--output-format", "json", id = "uv-output-format"),
pytest.param("pip", "--proxy", "http://proxy:3128", id = "pip-proxy"),
],
)