Skip to content

Conversation

@PedroF43
Copy link

This PR fixes an issue where streaming tool arguments containing non-ASCII characters (e.g., ã, à) were being escaped into their Unicode sequences (e.g., \u00e1). This behavior not only altered the intended format but also caused the arguments to be duplicated at the end of the stream—first as escaped sequences and then as their proper non-escaped versions. The fix ensures that all JSON serialization for tool arguments consistently uses ensure_ascii=False, preserving the original non-ASCII characters and preventing any duplication.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@mergify mergify bot added the frontend label Feb 25, 2025
@PedroF43 PedroF43 force-pushed the fix/llama_tool_parser branch 2 times, most recently from 774abb4 to 3539899 Compare February 25, 2025 13:59
Signed-off-by: pedrofariadtx <[email protected]>
@PedroF43 PedroF43 force-pushed the fix/llama_tool_parser branch from 3539899 to c5a0785 Compare February 25, 2025 14:15
@DarkLight1337 DarkLight1337 requested a review from mgoin February 27, 2025 09:19
@DarkLight1337
Copy link
Member

cc @K-Mistele

Copy link
Contributor

@maxdebayser maxdebayser left a comment

Choose a reason for hiding this comment

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

Nice! Can you add a unit test for this?

@mgoin
Copy link
Member

mgoin commented May 21, 2025

Superseded by #17704

@mgoin mgoin closed this May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants