[Bugfix] Retry config read to survive concurrent HF cache refresh (#49001)

Signed-off-by: pei.zhang <pei.zhang@amd.com> Co-authored-by: Claude <noreply@anthropic.com>

peizhang56 committed Jul 22, 2026 at 15:35 UTC 7d10a4cfce45527e03e9d6ef0f1a8c286256b008
1 file changed +11 -7
vllm/transformers_utils/config.py
+11 -7
@@ -731,13 +731,17 @@ def get_config(
731 raise ValueError(error_message) from e
732
733 config_parser = get_config_parser(config_format)
734 - config_dict, config = config_parser.parse(
735 - model,
736 - trust_remote_code=trust_remote_code,
737 - revision=revision,
738 - code_revision=code_revision,
739 - hf_overrides=hf_overrides_kw or hf_overrides_fn,
740 - **kwargs,
734 + # Retry to tolerate a concurrent HF cache refresh briefly hiding config.json.
735 + config_dict, config = with_retry(
736 + lambda: config_parser.parse(
737 + model,
738 + trust_remote_code=trust_remote_code,
739 + revision=revision,
740 + code_revision=code_revision,
741 + hf_overrides=hf_overrides_kw or hf_overrides_fn,
742 + **kwargs,
743 + ),
744 + f"Error parsing config for {model}",
745 )
746
747 # Architecture mapping for models without explicit architectures field