Scope quantization-config served-id inference to Qwen3.6-27B
Summary
_public_model_id_from_metadatawas treating theconfig.jsonquantization layout (e.g. Q4 weights with a Q8 head) as proof the model was a Qwen3.6-27B MTPLX artifact, so unrelated third-party builds got served under one of themtplx-qwen36-27b-*ids on/v1/models.- Concretely,
mtplx serve --model .../samuelfaj/Qwen3.6-35B-A3B-4bit-MTPLX-Optimized-Speedwas returning{"id":"mtplx-qwen36-27b-optimized-quality", ...}. - Gate the quantization-config fallback on
_public_model_id_from_namealready identifying the folder as a Qwen3.6-27B MTPLX variant. Explicit metadata fields (public_model_id,served_model_id,model_id,precision_variant,artifact_role,verified_on.model) still take precedence, so the existing "runtime metadata before folder name" behavior is preserved. Unknown folders fall through to the basename-sanitized id (qwen3.6-35b-a3b-4bit-mtplx-optimized-speed).
Test plan
- [x]
pytest tests/test_default_models.py(all 42 tests pass, including the new regression covering the third-party 35B-A3B Q4/Q8 case) - [x]
pytest tests/test_public_cli.py::test_quality_model_ref_uses_quality_public_model_id tests/test_public_cli.py::test_legacy_optimized_model_ref_uses_neutral_public_model_id tests/test_public_cli.py::test_explicit_model_id_wins_over_loaded_artifact_identity - [ ] Manual: start
mtplx serve --model .../Qwen3.6-35B-A3B-4bit-MTPLX-Optimized-Speedand confirm/v1/modelsreportsqwen3.6-35b-a3b-4bit-mtplx-optimized-speed.
🤖 Generated with Claude Code
I had trouble serving 35b via --model, this fixed it.
Thanks @wwadge — your report and repro were exactly right, and this PR correctly identified the quantization-layout inference as the culprit. We ended up going one step further than scoping the fallback: as of b34d096, canonical mtplx-* served ids are now contract-match-only. All fuzzy inference lanes (quantization layout, artifact_role substrings, verified_on model strings, precision_variant, loose family-name matches) were removed, so any artifact without an explicit first-party id in mtplx_runtime.json or an exact first-party name serves under its own sanitized name — your samuelfaj 35B case now serves as qwopus3.6-35b-a3b-v1-8bit-mtplx-optimized-speed.
Your test scenario is folded into the regression matrix in tests/test_default_models.py (the third-party 35B case is pinned there with a comment crediting this PR). Closing since the underlying lane this PR patched no longer exists, but the fix you pushed for is live on main. Much appreciated.