Skip to content

Conversation

@rickychen-infinirc
Copy link

@rickychen-infinirc rickychen-infinirc commented Dec 6, 2025

Summary

This PR adds support for offline FastAPI documentation (/docs) in air-gapped environments by integrating the fastapi-offline package.

When used on an air-gapped system, FastAPI documentation route (/docs) is not accessible because it requires pulling static content from the internet. This route is very useful because it is both documentation and a simple way to send requests to the server, easing integration of vLLM into systems.

This PR adds the --enable-offline-docs CLI flag which uses fastapi-offline to bundle static assets locally.

Fixes #29847

Changes

  • Add --enable-offline-docs CLI flag to FrontendArgs
  • Use fastapi-offline for air-gapped environments when enabled
  • Add fastapi-offline as optional dependency in pyproject.toml
  • Fallback to standard FastAPI if package not installed with warning message

…vironments

- Add --enable-offline-docs CLI flag
- Use fastapi-offline for air-gapped environments when enabled
- Add fastapi-offline as optional dependency
- Fallback to standard FastAPI if package not installed

Fixes vllm-project#29847

Signed-off-by: rickychen-infinirc <ricky.chen@infinirc.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 adds support for offline FastAPI documentation by integrating the fastapi-offline package. The changes are well-implemented, introducing an optional dependency and a CLI flag to enable the feature. My review includes one high-severity suggestion to improve the warning message for when the optional dependency is not installed, ensuring users are guided to install it correctly via the package extra.

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

👋 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 ask your reviewers to trigger select CI tests on top of fastcheck CI.

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.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

Copy link

@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.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- Update install instruction to use vllm[offline]
- Remove optional-dependencies from dynamic fields

Signed-off-by: rickychen-infinirc <ricky.chen@infinirc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: enable FastAPI documention (/docs) for air-gaped host

1 participant