fix: relax tokenizers version constraint to support transformers 4.51+#4269
Closed
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Closed
fix: relax tokenizers version constraint to support transformers 4.51+#4269devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Conversation
This commit addresses issue #4268 where crewAI's restrictive tokenizers constraint (using ~= operator) prevented using recent versions of transformers (4.51+) which require tokenizers >= 0.21. Changes: - Changed tokenizers constraint from ~=0.20.3 to >=0.20.3 - Added test to verify the constraint remains flexible The ~= operator was too restrictive as it only allows patch version updates (tokenizers~=0.20.3 means >=0.20.3,<0.21.0). This caused dependency resolution failures when installing transformers 4.51+. crewAI does not directly import or use tokenizers - it is a transitive dependency. chromadb only requires tokenizers>=0.13.2 with no upper bound, so relaxing this constraint is safe. Fixes #4268 Co-Authored-By: João <joao@crewai.com>
Co-Authored-By: João <joao@crewai.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
Author
|
Closing due to inactivity for more than 7 days. Configure here. |
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.
Summary
Changes the
tokenizersdependency constraint from~=0.20.3to>=0.20.3to allow installation alongsidetransformers4.51+ which requirestokenizers >= 0.21.The
~=operator was too restrictive (>=0.20.3,<0.21.0), causing dependency resolution failures. Since crewAI does not directly import or use tokenizers (it's a transitive dependency from chromadb), relaxing this constraint is safe.Fixes #4268
Review & Testing Checklist for Human
import tokenizersorfrom tokenizersin the codebase>=0.20.3,<1.0.0) for future safetytransformers>=4.51to confirm the fix resolves the original issue:pip install crewai transformers>=4.51Notes
uv.lockregeneration is expected and contains many unrelated changes due to dependency resolutionLink to Devin run: https://app.devin.ai/sessions/55014c7cacf249719bd26dcbb666bf39
Requested by: João (joao@crewai.com)