Skip to content

[Refactor] Suppress SyntaxWarning from ast.literal_eval in tool parsers#44346

Merged
sfeng33 merged 2 commits into
vllm-project:mainfrom
sfeng33:safe-eval
Jun 3, 2026
Merged

[Refactor] Suppress SyntaxWarning from ast.literal_eval in tool parsers#44346
sfeng33 merged 2 commits into
vllm-project:mainfrom
sfeng33:safe-eval

Conversation

@sfeng33

@sfeng33 sfeng33 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Python 3.12+ emits SyntaxWarning for invalid escape sequences (e.g. \p in C:\path). LLM-generated tool call arguments can contain these, producing noisy warnings in server logs. This PR suppress the warning by using safe_literal_eval().

Test Plan

pytest tests/tool_parsers/

Signed-off-by: sfeng33 <4florafeng@gmail.com>
@sfeng33 sfeng33 marked this pull request as ready for review June 2, 2026 18:16
@sfeng33 sfeng33 added the ready ONLY add when PR is ready to merge/full CI is needed label Jun 2, 2026
@sfeng33

sfeng33 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

@claude review

@sfeng33

sfeng33 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@mergify mergify Bot added qwen Related to Qwen models tool-calling labels Jun 2, 2026

@yewentao256 yewentao256 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the work!

@sfeng33 sfeng33 merged commit e3e132d into vllm-project:main Jun 3, 2026
44 checks passed
@sfeng33 sfeng33 deleted the safe-eval branch June 3, 2026 14:42
mvanhorn pushed a commit to mvanhorn/vllm that referenced this pull request Jun 4, 2026
…rs (vllm-project#44346)

Signed-off-by: sfeng33 <4florafeng@gmail.com>
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
JisoLya pushed a commit to JisoLya/vllm that referenced this pull request Jun 5, 2026
…rs (vllm-project#44346)

Signed-off-by: sfeng33 <4florafeng@gmail.com>
Signed-off-by: JisoLya <523420504@qq.com>
knight0528 pushed a commit to knight0528/vllm that referenced this pull request Jun 8, 2026
waqahmed-amd-fi pushed a commit to waqahmed-amd-fi/vllm that referenced this pull request Jun 10, 2026
…rs (vllm-project#44346)

Signed-off-by: sfeng33 <4florafeng@gmail.com>
Signed-off-by: Waqar Ahmed <waqar.ahmed@amd.com>
Saddss pushed a commit to Saddss/vllm that referenced this pull request Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed tool-calling

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants