Skip to content

fix: bump chromadb to support Python 3.14 (drops broken pydantic v1 layer) - #7298

Open
FCHEHIDI wants to merge 4 commits into
crewAIInc:mainfrom
FCHEHIDI:fix/chromadb-python-3.14-compat
Open

fix: bump chromadb to support Python 3.14 (drops broken pydantic v1 layer)#7298
FCHEHIDI wants to merge 4 commits into
crewAIInc:mainfrom
FCHEHIDI:fix/chromadb-python-3.14-compat

Conversation

@FCHEHIDI

@FCHEHIDI FCHEHIDI commented Sep 6, 2026

Copy link
Copy Markdown

Fixes #7297

Problem

crewai pins chromadb~=1.1.0, 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:

pydantic.v1.errors.ConfigError: unable to infer type for attribute "chroma_server_nofile"

This breaks import crewai outright on 3.14 — before any user code runs.

Root cause

Already fixed upstream in chroma-core/chroma#6356 (dropped the pydantic v1
compat layer), released in chromadb 1.5.x. crewai's own pin just predates
that fix.

Fix

  • 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 so the bump is actually installable on 3.14.

Verification

Ran the full lib/crewai test suite (4745 tests) under both configurations,
with a reduced sync (uv sync --package crewai --all-groups, no
--all-extras) to keep the comparison apples-to-apples on this machine:

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 (diffed the two failure sets).
  • 7 previously-failing knowledge-source tests now pass with chromadb 1.5.9
    (test_agent_with_knowledge_sources*, test_get_knowledge_search_query,
    test_embedding_configuration_flow, test_crew_with_knowledge_sources_works_with_copy).
  • All remaining failures are identical on both sides and come from optional
    extras not installed in this reduced comparison (litellm fallback, docling,
    qdrant, google-vertex, mcp, a2a) — unrelated to this change. Happy to also
    run this with --all-extras if useful, though av/PyAV currently fails to
    build from source on 3.14 on this machine (missing system ffmpeg dev libs),
    unrelated to chromadb.

Out of scope

This PR only unblocks installability + the existing test suite on 3.14. It
does not add 3.14 to the CI test matrix (tests.yml, type-checker.yml,
etc.) — happy to add that as a follow-up if maintainers want it in the same
PR instead.

🤖 Generated with Claude Code

chromadb~=1.1.0 still shipped the pydantic.v1.BaseSettings compat layer,
which is broken on Python 3.14 (ConfigError: unable to infer type for
chroma_server_nofile) because 3.14 dropped the __fields__ introspection
mechanism that pydantic v1 relied on. This breaks `import crewai` outright
on 3.14, before any user code runs.

Fixed upstream in chroma-core/chroma#6356 (dropped the pydantic v1 layer),
released in chromadb 1.5.x. Bump the floor to >=1.5.9,<2 and raise the
requires-python cap to <3.15 across the workspace so the fix is actually
usable.

Verified locally: full lib/crewai test suite (4745 tests) run under both
configurations (reduced sync, no optional media/docling/qdrant extras):

  before (py3.13, chromadb 1.1.1): 365 failed, 4311 passed, 65 skipped
  after  (py3.14, chromadb 1.5.9): 358 failed, 4318 passed, 65 skipped

Zero new failures introduced by the bump; 7 previously-failing
knowledge-source tests now pass. All remaining failures are identical
on both sides and stem from optional extras not installed in this
comparison (litellm fallback, docling, qdrant, google-vertex, mcp, a2a),
unrelated to this change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 6, 2026 15:48
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: b2503dd7-a219-4715-9ac9-c0831b00979f

📥 Commits

Reviewing files that changed from the base of the PR and between 2a12bc4 and fde9a0f.

📒 Files selected for processing (2)
  • docs/index.mdx
  • lib/crewai/README.md

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The workspace now declares Python 3.14 support. The crewai package requires chromadb>=1.5.9,<2 to avoid the Python 3.14 incompatibility in earlier chromadb releases.

Changes

Python 3.14 support

Layer / File(s) Summary
Runtime version metadata
pyproject.toml, lib/*/pyproject.toml
Workspace and package requires-python constraints now use <3.15.
Chromadb compatibility
lib/crewai/pyproject.toml
The chromadb constraint now requires version 1.5.9 or newer within the 1.x release range.
CLI templates and documentation
lib/cli/src/crewai_cli/templates/..., README.md, lib/crewai/README.md, docs/...
Generated projects and documentation now state Python support through version 3.14.

Suggested reviewers: joaomdmoura

Merge Risk: ⚪ Minimal · up to fde9a

This change declares Python 3.14 support, updates ChromaDB compatibility requirements, and aligns current documentation and templates. No concrete merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary changes: updating chromadb to remove the broken Pydantic v1 layer and enable Python 3.14 support.
Description check ✅ Passed The description identifies issue #7297, explains the problem and root cause, describes the fix, reports verification results, and documents out-of-scope work. It does not reproduce the template checkl…
Linked Issues check ✅ Passed The changes satisfy issue #7297 by updating chromadb to >=1.5.9,<2, raising workspace Python constraints to <3.15, and documenting Python 3.14 support. The reported test comparison shows no new failur…
Out of Scope Changes check ✅ Passed The dependency, Python-version constraints, templates, README files, and current documentation updates all support the linked issue objectives. No unrelated code or documentation changes are identifie…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The CLI scaffolding templates still generate pyproject.toml files pinned to <3.14, which conflicts with the PR’s goal of enabling Python 3.14 usage end-to-end.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the CrewAI workspace’s Python compatibility metadata and the crewai package’s ChromaDB dependency to restore install/import compatibility on Python 3.14 by moving off ChromaDB versions that still ship the broken pydantic.v1 compatibility layer.

Changes:

  • Raised requires-python upper bound from <3.14 to <3.15 across workspace member packages.
  • Bumped crewai’s chromadb dependency from ~=1.1.0 to >=1.5.9,<2, with inline rationale.
File summaries
File Description
pyproject.toml Expands workspace-level Python support to include 3.14 by raising the upper bound to <3.15.
lib/devtools/pyproject.toml Aligns devtools package Python requirement with workspace 3.14 support.
lib/crewai/pyproject.toml Bumps chromadb to >=1.5.9,<2 and updates Python requirement to <3.15.
lib/crewai-tools/pyproject.toml Aligns crewai-tools Python requirement with workspace 3.14 support.
lib/crewai-files/pyproject.toml Aligns crewai-files Python requirement with workspace 3.14 support.
lib/crewai-core/pyproject.toml Aligns crewai-core Python requirement with workspace 3.14 support.
lib/cli/pyproject.toml Aligns crewai-cli Python requirement with workspace 3.14 support.
Review details
  • Files reviewed: 7/8 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/cli/pyproject.toml
{ name = "Joao Moura", email = "joao@crewai.com" }
]
requires-python = ">=3.10, <3.14"
requires-python = ">=3.10, <3.15"
Copilot review on crewAIInc#7298 pointed out that `crewai create crew` (and
tool/flow/declarative_flow/json_crew) still scaffold new projects with
`requires-python = ">=3.10,<3.14"`, contradicting this PR's goal of
supporting Python 3.14 end-to-end. Bump the cap in all 5 template
pyproject.toml files, plus the matching prose in their README.md/AGENTS.md.

Verified: lib/cli/tests suite (745 tests) still passes at the same rate
before/after this change (35 failing tests in test_run_declarative_flow.py
and test_kickoff_flow.py are pre-existing flakiness unrelated to this diff
- neither file references "3.14" or "requires-python", and the same tests
fail with this change stashed out).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The code/package constraints now allow Python 3.14, but the primary README and docs/edge pages still state <3.14, creating user-facing documentation inconsistency.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 16/17 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread pyproject.toml
Comment on lines 3 to +4
readme = "README.md"
requires-python = ">=3.10,<3.14"
requires-python = ">=3.10,<3.15"
Copilot review on crewAIInc#7298 pointed out the primary README and current
(docs/edge) installation/migration pages still said "<3.14", now
inconsistent with the actual package constraints this PR raises to
<3.15. Versioned doc snapshots under docs/v1.15.x/ are intentionally
left untouched — they describe past releases that genuinely didn't
support 3.14.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The crewai package README referenced by lib/crewai/pyproject.toml still states <3.14, leaving published package documentation inconsistent with the updated Python support metadata.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 26/27 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread lib/crewai/pyproject.toml
{ name = "Joao Moura", email = "joao@crewai.com" }
]
requires-python = ">=3.10, <3.14"
requires-python = ">=3.10, <3.15"
Copilot review on crewAIInc#7298 pointed out lib/crewai/README.md (the README
published to PyPI via lib/crewai/pyproject.toml's readme field) still
said "<3.14". Also caught docs/index.mdx, which had the same stale
bound and isn't a versioned snapshot either. Re-swept the whole repo
(excluding docs/v1.15.x/ historical snapshots) to confirm no other
occurrences remain.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The dependency bump and corresponding requires-python/documentation updates are consistent, scoped, and align with the stated goal of unblocking Python 3.14 installs/imports.

Review details
  • Files reviewed: 28/29 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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.

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

2 participants