crewAIInc / crewAIInc/crewAI

crewai fails to import on Python 3.14 (chromadb~=1.1.0 pydantic v1 incompatibility)

Open
#7,297 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

python 3.14
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,<2 in lib/crewai/pyproject.toml.
  • Raise requires-python from <3.14 to <3.15 across 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.