[Bugfix] Resolve the Hub revision once per repo (#56092)

Signed-off-by: Wauplin <lucainp@gmail.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Lucain
2026-09-24 08:48:24 -07:00
committed by GitHub
co-authored by Claude Opus 5 Harry Mellor mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent a7d203efe5
commit 344fcc252a
5 changed files with 32 additions and 22 deletions
+2 -9
View File
@@ -3867,19 +3867,12 @@ def test_load_config_rejects_non_string_load_format(bad_load_format):
LoadConfig(load_format=bad_load_format)
# A real Qwen3-0.6B model revision that is used in the tests below.
# A real Qwen3-0.6B model revision that is used in the test below.
REVISION = "c1899de289a04d12100db370d81485cdf75e47ca"
@patch("vllm.config.model.resolve_revision", return_value=ResolvedRevision(REVISION))
def test_revision_not_resolved_when_weights_differ_from_model(mock_resolve):
model_weights = "unsloth/Qwen3-0.6B-GGUF:Q8_0"
config = ModelConfig("Qwen/Qwen3-0.6B", model_weights=model_weights)
assert config.revision is None
@patch("vllm.config.model.resolve_revision", return_value=ResolvedRevision(REVISION))
def test_revision_resolved_when_weights_match_model(mock_resolve):
def test_revision_resolved_for_model(mock_resolve):
model = "Qwen/Qwen3-0.6B"
config = ModelConfig(model)
assert isinstance(config.revision, ResolvedRevision)
+1
View File
@@ -208,6 +208,7 @@ def test_model_config_generation_fallback_forwards_code_revision():
model="org/model",
trust_remote_code=True,
revision="model-pin",
_hf_config_revision=None,
code_revision="code-pin",
config_format="auto",
hf_token=None,