@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / d573aeadcc
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 04:30 UTC

[Bugfix] Don't log OpenAI field aliases as ignored (#11378)

Signed-off-by: mgoin <michael@neuralmagic.com>

Michael Goin committed Dec 20, 2024 at 14:03 UTC d573aeadcc891976f09d6d50f1a4f98c8ff809aa
1 file changed +9 -1
vllm/entrypoints/openai/protocol.py
+9 -1
@@ -46,7 +46,15 @@ class OpenAIBaseModel(BaseModel):
46 @classmethod
47 def __log_extra_fields__(cls, data):
48 if isinstance(data, dict):
49 - extra_fields = data.keys() - cls.model_fields.keys()
49 + # Get all class field names and their potential aliases
50 + field_names = set()
51 + for field_name, field in cls.model_fields.items():
52 + field_names.add(field_name)
53 + if hasattr(field, 'alias') and field.alias:
54 + field_names.add(field.alias)
55 +
56 + # Compare against both field names and aliases
57 + extra_fields = data.keys() - field_names
58 if extra_fields:
59 logger.warning(
60 "The following fields were present in the request "