fix: defer optional vLLM imports for Tinker clients - #631
Merged
pan-x-c merged 2 commits intoSep 29, 2026
Merged
Conversation
Collaborator
Author
|
/unittest-module-common |
Collaborator
Author
|
/unittest-pattern-OptionalVLLMImportTest or VLLMParserDelegationTest |
unittest: Run #1886
🎉 All tests passed!Github Test Reporter by CTRF 💚 |
Collaborator
|
/unittest-module-common |
unittest: Run #1887
🎉 All tests passed!Github Test Reporter by CTRF 💚 |
pan-x-c
approved these changes
Sep 29, 2026
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.
Description
Importing
TinkerModelreaches the shared multimodal helpers throughBaseInferenceModeland experience extraction. Those helpers currently import vLLM at module load time, so a text-only Tinker installation fails before it can create a client when the optional vLLM package is absent.Load
ModelConfigwhen constructingvLLMMultiModalRender, and load the synchronous/asynchronous vLLM parsers when their methods are called. Postpone vLLM-only type annotations. Text helpers and Tinker imports no longer require vLLM; selecting the vLLM renderer without it reports the required extra. Unrelated import failures retain their original error.Message normalization and the arguments forwarded to the vLLM parsers are unchanged. No sampling, training-loss, or server API behavior is modified.
Validation
TinkerModelimports with vLLM blocked, the missing-renderer-dependency message, preservation of unrelated import failures, and synchronous/asynchronous parser delegation with normalized multimodal messages.git diff --checkpassed.Checklist