docling-project / docling-project/docling

CrewDoclingSource fails with RT-DETRv2 compatibility error

Open
#2,253 2 comments 0 reactions 0 assignees View on GitHub
bug triage/close-stale
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

## Environment
- **CrewAI**: 0.186.1
- **Docling**: 2.51.0
- **Transformers**: 4.40.0 (constrained by CrewAI dependencies)
- **Python**: 3.13
- **OS**: macOS

## Issue
CrewDoclingSource from official documentation fails with RT-DETRv2 model loading error.

## Minimal reproduction
```python
from crewai.knowledge.source.crew_docling_source import CrewDoclingSource

# This fails
source = CrewDoclingSource(file_paths=["document.pdf"])
```

## Error
```
The checkpoint you are trying to load has model type `rt_detr_v2` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
```

## Root cause
Docling requires RT-DETRv2 models (added to Transformers 4.55+) but CrewAI constrains Transformers to 4.40 via dependency chain:

```
crewai[tools] → chromadb==0.5.23 → tokenizers<=0.20.3
transformers>=4.55 → tokenizers>=0.21
```

## Expected behavior
Documentation example should work without version conflicts.

## Suggested fix
Update ChromaDB dependency in crewai-tools to support tokenizers>=0.21, enabling Transformers 4.55+ compatibility.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.