Skip to content

Conversation

MoyanZitto
Copy link
Contributor

@MoyanZitto MoyanZitto commented Jul 20, 2025

Essential Elements of an Effective PR Description Checklist

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Purpose

This is to fix tool_id for kimi-k2 when use tool_choice=required. Now it will return tool id with format functions.func_name:idx instead of random string.

Test Plan

Additional tests were added to test_completion_with_function_calling, and corresponding changes to the model_type hack were also required.

Test Result

tests passed.

(Optional) Documentation Update

@MoyanZitto MoyanZitto requested a review from aarnphm as a code owner July 20, 2025 18:49
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 Jul 20, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements deterministic tool IDs for the kimi-k2 model. The changes look good, but there's a critical bug in the non-streaming generation path when multiple choices (n > 1) are requested, which could lead to non-unique tool call IDs. There's also a potential TypeError in the streaming path that should be addressed to improve code robustness.

@simon-mo
Copy link
Collaborator

Thank you for the fix, can you please address some of the comments? Thank you!

@MoyanZitto
Copy link
Contributor Author

Thank you for the fix, can you please address some of the comments? Thank you!

yeah I'll fix them as soon as possible. Orz

Copy link

mergify bot commented Jul 24, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @MoyanZitto.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@MoyanZitto MoyanZitto reopened this Jul 25, 2025
Copy link

mergify bot commented Jul 25, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @MoyanZitto.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot removed the needs-rebase label Jul 25, 2025
@mergify mergify bot added deepseek Related to DeepSeek models llama Related to Llama models tool-calling labels Jul 29, 2025
Copy link
Collaborator

@aarnphm aarnphm left a comment

Choose a reason for hiding this comment

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

I don't think we have to make this change to interface just for kimi. Let's just make a special case for kimi for now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This wouldn't work, given that the default would always be random, so not sure how this would work with kimi here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

kimi-k2 will always set ToolCall.id manually, so the random default value doesn't matter.

@MoyanZitto
Copy link
Contributor Author

@simon-mo 3 hours ago, openai v1.100.0 removed ResponseTextConfig from openai.types.responses, see: https://github.com/openai/openai-python/blob/adb1af8073391a6d58be9c13cfa0664c04d859e2/src/openai/types/responses/response.py

which cause readthedocs build failed

@simon-mo simon-mo enabled auto-merge (squash) August 20, 2025 06:17
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 20, 2025
auto-merge was automatically disabled August 20, 2025 11:38

Head branch was pushed to by a user without write access

@simon-mo simon-mo merged commit 582bbe6 into vllm-project:main Aug 20, 2025
38 checks passed
djmmoss pushed a commit to djmmoss/vllm that referenced this pull request Aug 21, 2025
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
mengxingkongzhouhan pushed a commit to mengxingkongzhouhan/vllm that referenced this pull request Aug 30, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Sep 3, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek Related to DeepSeek models frontend llama Related to Llama 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.

5 participants