@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4e51fa8cba
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 14, 05:30 UTC

Do not use eval() to convert unknown types (#23266)

Signed-off-by: Russell Bryant <rbryant@redhat.com>

Russell Bryant committed Aug 20, 2025 at 16:28 UTC 4e51fa8cbaba2c6fd516b4615a533b0a94796516
1 file changed +4 -9
vllm/entrypoints/openai/tool_parsers/qwen3coder_tool_parser.py
+4 -9
@@ -208,15 +208,10 @@ class Qwen3CoderToolParser(ToolParser):
208 "valid JSON object in tool '%s', will try other "
209 "methods to parse it.", param_value, param_name,
210 func_name)
211 - try:
212 - converted_value = eval(param_value)
213 - return converted_value
214 - except Exception:
215 - logger.warning(
216 - "Parsed value '%s' of parameter '%s' cannot be "
217 - "converted via Python `eval()` in tool '%s', "
218 - "degenerating to string.", param_value, param_name,
219 - func_name)
211 + logger.warning(
212 + "Parameter '%s' has unknown type '%s'. "
213 + "The value will be treated as a string.", param_name,
214 + param_type)
215 return param_value
216
217 # Extract function name