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>