fix: HuggingFace embedder configuration validation error (#3995)

- Update HuggingFaceProvider to use HuggingFaceEmbeddingFunction instead of
  HuggingFaceEmbeddingServer for HuggingFace Inference API support
- Add api_key, model_name, and api_key_env_var fields to match documented config
- Accept api_url for compatibility but exclude from model_dump (not used by
  HuggingFace Inference API)
- Add validation aliases for model (maps to model_name) and environment variables
- Update HuggingFaceProviderConfig TypedDict with new fields
- Add comprehensive tests for HuggingFace provider configuration
- Regenerate uv.lock (was corrupted)

Fixes #3995

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-11-29 13:35:58 +00:00
parent bc4e6a3127
commit b889621e30
5 changed files with 4687 additions and 4123 deletions

8496
uv.lock generated

File diff suppressed because it is too large Load Diff