fix: generate random tool call IDs and support non-standard ID format…#4
Merged
shivamashtikar merged 1 commit intoMay 18, 2026
Merged
Conversation
|
👋 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. 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 If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
d6baae8 to
2eb9703
Compare
…raction in Kimi K2 parser - Generate random chatcmpl-tool-<uuid> IDs via make_tool_call_id() instead of exposing model-native IDs to clients, preventing ID collisions across multi-turn agent loops. - Fix streaming regex to handle leading whitespace emitted by the tokenizer before tool call IDs (\s* prefix on streaming regexes). - Restore original regex ID pattern requiring :\d+ format since non-standard ID formats are no longer supported. - Simplify _extract_function_name: remove parameter-overlap matching and raw-ID fallback strategies (dead code for Kimi K2's native format), drop unused arguments/request parameters. - Guard against empty tool call extraction when section markers are present but no calls are parsed (return tools_called=False). - Update tests: assert random ID format, add uniqueness tests, add dot-split partial ID test, remove non-standard ID format tests.
2eb9703 to
b45c7d6
Compare
17505a7
into
kimi-2.6-v0.19.1-custom-fixes
3 of 4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…s in Kimi K2 parser
Purpose
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.