Skip to content

Conversation

@kouroshHakha
Copy link
Collaborator

@kouroshHakha kouroshHakha commented Oct 8, 2025

Summary

Add conditional dependency for gpt-oss to maintain Python 3.10 minimum version requirement.
Issue is introduced by #24315

Problem

The gpt-oss package requires Python >= 3.12, but vLLM currently supports Python >= 3.10. Adding gpt-oss as an unconditional dependency would break compatibility for Python 3.10 and 3.11 users.

Solution

Make the gpt-oss dependency conditional on Python version >= 3.12:

gpt-oss >= 0.0.7; python_version >= '3.12'

Impact

  • Python 3.10-3.11 users: Can install and use vLLM with core functionality. gpt-oss features are gracefully disabled with warning logs, as handled by existing validate_gpt_oss_install() logic.

  • Python 3.12+ users: Get full gpt-oss functionality including browser and code interpreter tools.

  • Minimum Python version: Remains unchanged at 3.10.

Signed-off-by: Kourosh Hakhamaneshi <Kourosh@anyscale.com>
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 correctly makes gpt-oss a conditional dependency to maintain Python 3.10 support. However, this change introduces a potential CI failure in tests that depend on gpt-oss when run on Python versions older than 3.12. I've added a high-severity comment detailing the issue and suggesting a fix to prevent breaking the build.

setproctitle # Used to set process names for better debugging and monitoring
openai-harmony >= 0.0.3 # Required for gpt-oss
gpt-oss >= 0.0.7
gpt-oss >= 0.0.7; python_version >= '3.12'
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This change correctly makes gpt-oss a conditional dependency. However, it will cause tests that rely on gpt-oss to fail on Python versions < 3.12 due to ModuleNotFoundError.

For example, tests/evals/gpt_oss/test_gpqa_correctness.py will fail because it attempts to execute the gpt_oss.evals module. This test should be conditionally skipped on Python versions where gpt-oss is not installed.

A common way to do this is with pytest.mark.skipif:

import sys
import pytest

@pytest.mark.skipif(sys.version_info < (3, 12), reason="gpt-oss requires Python >= 3.12")
def test_gpqa_correctness(request):
    # ... test implementation

Applying this or a similar fix is necessary to prevent breaking the CI pipeline for environments running Python < 3.12.

@kouroshHakha kouroshHakha added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 8, 2025
@wangxiyuan
Copy link
Contributor

#26392

@mergify
Copy link

mergify bot commented Oct 9, 2025

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

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

@mergify mergify bot added the needs-rebase label Oct 9, 2025
@heheda12345
Copy link
Collaborator

heheda12345 commented Oct 9, 2025

#26392
Is this PR ok for you? Only install gpt-oss in vLLM CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build gpt-oss Related to GPT-OSS models needs-rebase ready ONLY add when PR is ready to merge/full CI is needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants