Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

Changes the tokenizers dependency constraint from ~=0.20.3 to >=0.20.3 to allow installation alongside transformers 4.51+ which requires tokenizers >= 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

  • Verify crewAI doesn't directly use tokenizers by searching for import tokenizers or from tokenizers in the codebase
  • Consider whether an upper bound should be added (e.g., >=0.20.3,<1.0.0) for future safety
  • Test installing crewAI alongside transformers>=4.51 to confirm the fix resolves the original issue:
    pip install crewai transformers>=4.51

Notes

  • The uv.lock regeneration is expected and contains many unrelated changes due to dependency resolution
  • The added test only validates the constraint format, not actual runtime compatibility

Link to Devin run: https://app.devin.ai/sessions/55014c7cacf249719bd26dcbb666bf39
Requested by: João (joao@crewai.com)

devin-ai-integration bot and others added 2 commits January 23, 2026 07:51
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>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relax tokenizers version constraint to support transformers >=4.51

0 participants