Files
crewAI/lib/crewai/tests
Devin AI 1d575d96e3 Fix embedder validation errors to provide clear, helpful messages
Resolves #3755

Previously, when users provided an invalid embedder configuration,
they would receive 20-26 confusing validation errors from Pydantic
trying to match the input against every possible provider spec.

This commit adds a custom field validator for the embedder field that:
- Validates the provider name and lists all valid providers if invalid
- Checks for the required 'config' field for providers that need it
- Provides clear error messages with expected structure examples
- Shows the received configuration for easy comparison

The fix reduces validation errors from 25+ confusing messages to 1 clear,
actionable error message that helps users understand exactly what's wrong
and how to fix it.

Changes:
- Added validate_embedder_config field validator to Crew class
- Added comprehensive test suite in test_embedder_validation.py
- All existing tests pass without regressions

Co-Authored-By: João <joao@crewai.com>
2025-10-21 12:59:54 +00:00
..
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00