Skip to content

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

Description

@FCHEHIDI

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    python 3.14Python 3.14 support tracking

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions