Fixes#4095
When users pass a chromadb.config.Settings object (Pydantic V1 model) to
ChromaDBConfig (Pydantic V2 dataclass), Pydantic V2 would attempt to
validate it and fail with: TypeError: BaseModel.validate() takes 2
positional arguments but 3 were given
This fix:
- Uses SkipValidation to prevent Pydantic V2 from validating the V1 Settings object
- Uses BeforeValidator to handle dict-to-Settings conversion
- Adds arbitrary_types_allowed=True to the config for extra safety
The settings field now accepts either:
- A chromadb.config.Settings instance (passed through unchanged)
- A dictionary of settings parameters (converted to Settings internally)
Co-Authored-By: João <joao@crewai.com>