Skip to content

Add reinstall command to broken vLLM warning#4070

Merged
danielhanchen merged 2 commits into
mainfrom
daniel/add-vllm-reinstall-hint
Feb 16, 2026
Merged

Add reinstall command to broken vLLM warning#4070
danielhanchen merged 2 commits into
mainfrom
daniel/add-vllm-reinstall-hint

Conversation

@danielhanchen
Copy link
Copy Markdown
Member

Summary

  • improve the broken-vLLM warning by adding an explicit reinstall command
  • new warning now instructs users to run:
    • uv pip install unsloth vllm torchvision torchaudio --torch-backend=auto

Why

When Unsloth disables vLLM after detecting a broken native extension, users should get an immediate actionable recovery command.

Validation

  • Runtime check in the same broken-vLLM environment confirms:
    • import unsloth succeeds
    • warning includes the exact reinstall command

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @danielhanchen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience by providing a direct solution within the warning message when Unsloth detects a broken vLLM installation. Instead of just informing the user that vLLM is disabled, the updated warning now includes a specific uv pip install command, enabling users to quickly resolve the issue and continue their work without further investigation.

Highlights

  • Improved vLLM Warning: The warning message for a broken vLLM binary extension now includes an explicit reinstall command, guiding users on how to fix the issue.
  • Actionable Recovery: Users encountering a disabled vLLM due to a broken native extension will now receive an immediate, actionable command to reinstall necessary packages.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • unsloth/import_fixes.py
    • Modified the disable_broken_vllm function to append a reinstall command to the warning message when a broken vLLM binary extension is detected.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d188021100

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread unsloth/import_fixes.py
Comment on lines +1530 to +1531
"Please reinstall via `uv pip install unsloth vllm torchvision torchaudio "
"--torch-backend=auto`."
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add --reinstall to vLLM recovery command

The new warning tells users to “reinstall” with uv pip install ..., but that command does not force a reinstall when the same versions are already present, so a broken vLLM wheel can remain unchanged and the recovery step can be ineffective. I checked uv pip install --help, which documents --reinstall as the flag that reinstalls already-installed packages; without it, this guidance can leave users stuck in the same broken state.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
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 adds a helpful reinstall command to the warning for a broken vLLM installation, which is a great improvement for user experience by providing an immediate, actionable recovery step. I've suggested a minor formatting change to the warning message to enhance its readability in the logs. Overall, this is a valuable and well-executed change.

Comment thread unsloth/import_fixes.py
Comment on lines 1528 to +1531
"Unsloth: Detected broken vLLM binary extension; "
"disabling vLLM imports and continuing import."
"disabling vLLM imports and continuing import. "
"Please reinstall via `uv pip install unsloth vllm torchvision torchaudio "
"--torch-backend=auto`."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The new warning message is helpful, but it results in a very long, single-line log entry that can be difficult to read. For better readability and to make the command easier for users to copy, I recommend formatting it as a multi-line string using triple quotes.

Suggested change
"Unsloth: Detected broken vLLM binary extension; "
"disabling vLLM imports and continuing import."
"disabling vLLM imports and continuing import. "
"Please reinstall via `uv pip install unsloth vllm torchvision torchaudio "
"--torch-backend=auto`."
"""Unsloth: Detected broken vLLM binary extension; disabling vLLM imports and continuing import.
To fix this, please reinstall vLLM and its dependencies:
`uv pip install unsloth vllm torchvision torchaudio --torch-backend=auto`
"""

Comment thread unsloth/import_fixes.py Outdated
@danielhanchen danielhanchen merged commit f1a11f0 into main Feb 16, 2026
3 checks passed
@danielhanchen danielhanchen deleted the daniel/add-vllm-reinstall-hint branch February 16, 2026 07:02
abiswas-realadvice pushed a commit to abiswas-realadvice/unsloth that referenced this pull request May 14, 2026
* Add vLLM reinstall command to broken-extension warning

* Apply suggestion from @danielhanchen

---------

Co-authored-by: Daniel Hanchen <danielhanchen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant