Fix #2551: Add Huggingface to provider list in CLI

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-04-09 10:55:31 +00:00
parent 409892d65f
commit ffb8bedf1b
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import pytest
from crewai.cli.constants import PROVIDERS, ENV_VARS, MODELS
def test_huggingface_in_providers():
"""Test that Huggingface is in the PROVIDERS list."""
assert "huggingface" in PROVIDERS
def test_huggingface_env_vars():
"""Test that Huggingface environment variables are properly configured."""
assert "huggingface" in ENV_VARS
assert any(
detail.get("key_name") == "HUGGINGFACE_API_KEY"
for detail in ENV_VARS["huggingface"]
)
def test_huggingface_models():
"""Test that Huggingface models are properly configured."""
assert "huggingface" in MODELS
assert len(MODELS["huggingface"]) > 0