fix: relax tokenizers version constraint to support transformers 4.51+ #4269
+4,527
−4,626
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)