Skip to content

Fix mlx_lm.server --adapter-path silently ignored at startup#1249

Open
odysa wants to merge 1 commit into
ml-explore:mainfrom
odysa:fix/adapter-path
Open

Fix mlx_lm.server --adapter-path silently ignored at startup#1249
odysa wants to merge 1 commit into
ml-explore:mainfrom
odysa:fix/adapter-path

Conversation

@odysa
Copy link
Copy Markdown

@odysa odysa commented May 6, 2026

Fixes #1248.

ModelProvider.load("default_model", ...) overwrites model_path with the resolved real path before looking up _adapter_map. Since _adapter_map is keyed by the alias "default_model", the lookup misses and the CLI-provided --adapter-path silently falls back to None.

Fix: resolve adapter_path using the alias key before reassigning model_path.

Repro

Before fix — bogus adapter path is silently dropped:

mlx_lm.server --model mlx-community/Qwen2.5-0.5B-Instruct-4bit --adapter-path /tmp/does-not-exist
# Server starts cleanly.

After fix — same command raises FileNotFoundError: The adapter path does not exist: /tmp/does-not-exist, matching the behavior of the per-request HTTP API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mlx_lm.server --adapter-path silently ignored at startup

1 participant