crewai fails to import on Python 3.14 (chromadb~=1.1.0 pydantic v1 incompatibility)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 58.8k
- Forks
- 8.5k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 109
Description
Description
crewai pins chromadb~=1.1.0 (in lib/crewai/pyproject.toml), which still
ships the pydantic.v1.BaseSettings compatibility layer. That layer is
broken on Python 3.14, which dropped the __fields__ introspection
mechanism pydantic v1 relies on. As a result, import crewai fails outright
on Python 3.14, before any user code runs.
Steps to reproduce
uv venv --python 3.14
uv pip install crewai
uv run python -c "import crewai"
Actual behavior
pydantic.v1.errors.ConfigError: unable to infer type for attribute "chroma_server_nofile"
raised from chromadb/config.py, imported transitively via
crewai.rag.chromadb.config.
Expected behavior
crewai installs and imports successfully on Python 3.14.
Root cause
This is already fixed upstream in chroma-core/chroma#6356 (dropped the
pydantic v1 compat layer), released in chromadb 1.5.x. crewai's pin
(~=1.1.0) simply predates that fix.
Proposed fix (already validated, PR ready)
- Bump the floor to
chromadb>=1.5.9,<2inlib/crewai/pyproject.toml. - Raise
requires-pythonfrom<3.14to<3.15across the workspace
members.
I ran the full lib/crewai test suite (4745 tests) under both
configurations (reduced sync, no optional media/docling/qdrant extras, to
keep the comparison apples-to-apples):
| Failed | Passed | Skipped | |
|---|---|---|---|
| before (py3.13, chromadb 1.1.1) | 365 | 4311 | 65 |
| after (py3.14, chromadb 1.5.9) | 358 | 4318 | 65 |
Zero new failures introduced by the bump; 7 previously-failing
knowledge-source tests now pass with chromadb 1.5.9. All remaining failures
are identical on both sides and come from optional extras not installed in
this comparison (litellm fallback, docling, qdrant, google-vertex, mcp,
a2a) — unrelated to this change.
PR: #7296 (opened before I saw the first-time-contributor policy — reopening
and referencing this issue as instructed).
🤖 Generated with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/crewai/pyproject.toml and the workspace members' requires-python settings, then reproduce the failure with the documented uv commands. Verify the dependency and Python-version updates by importing crewai on Python 3.14 and running the lib/crewai test suite; done means the import succeeds without introducing new test failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100