feat(cerebras): integrate Cerebras cloud SDK for native completion support

- Added support for the Cerebras cloud SDK, enabling native chat completions.
- Introduced  class for handling requests to the Cerebras API.
- Updated  to include  as a dependency.
- Added tests for the new Cerebras provider, including unit tests and VCR tests for API interactions.
- Updated existing files to accommodate the new provider and its configurations.
This commit is contained in:
lorenzejay
2026-05-06 15:40:14 -07:00
parent d165bcb65f
commit b27ab32546
11 changed files with 2195 additions and 2 deletions

25
uv.lock generated
View File

@@ -13,7 +13,7 @@ resolution-markers = [
]
[options]
exclude-newer = "2026-04-27T16:00:00Z"
exclude-newer = "2026-04-28T07:00:00Z"
[manifest]
members = [
@@ -789,6 +789,23 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/06/f3/39cf3367b8107baa44f861dc802cbf16263c945b62d8265d36034fc07bea/cachetools-7.0.5-py3-none-any.whl", hash = "sha256:46bc8ebefbe485407621d0a4264b23c080cedd913921bad7ac3ed2f26c183114", size = 13918, upload-time = "2026-03-09T20:51:27.33Z" },
]
[[package]]
name = "cerebras-cloud-sdk"
version = "1.67.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "anyio" },
{ name = "distro" },
{ name = "httpx", extra = ["http2"] },
{ name = "pydantic" },
{ name = "sniffio" },
{ name = "typing-extensions" },
]
sdist = { url = "https://files.pythonhosted.org/packages/92/12/c201f07582068141e88f9a523ab02fdc97de58f2f7c0df775c6c52b9d8dd/cerebras_cloud_sdk-1.67.0.tar.gz", hash = "sha256:3aed6f86c6c7a83ee9d4cfb08a2acea089cebf2af5b8aed116ef79995a4f4813", size = 131536, upload-time = "2026-01-29T23:31:27.306Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/7a/5e/36a364f3d1bab4073454b75e7c91dc7ec6879b960063d1a9c929f1c7ea71/cerebras_cloud_sdk-1.67.0-py3-none-any.whl", hash = "sha256:658b79ca2e9c16f75cc6b4e5d523ee014c9e54a88bd39f88905c28ecb33daae1", size = 97807, upload-time = "2026-01-29T23:31:25.77Z" },
]
[[package]]
name = "certifi"
version = "2026.2.25"
@@ -1330,6 +1347,9 @@ azure-ai-inference = [
bedrock = [
{ name = "boto3" },
]
cerebras = [
{ name = "cerebras-cloud-sdk" },
]
docling = [
{ name = "docling" },
]
@@ -1383,6 +1403,7 @@ requires-dist = [
{ name = "azure-identity", marker = "extra == 'azure-ai-inference'", specifier = ">=1.17.0,<2" },
{ name = "boto3", marker = "extra == 'aws'", specifier = "~=1.42.79" },
{ name = "boto3", marker = "extra == 'bedrock'", specifier = "~=1.42.79" },
{ name = "cerebras-cloud-sdk", marker = "extra == 'cerebras'", specifier = "~=1.67.0" },
{ name = "chromadb", specifier = "~=1.1.0" },
{ name = "click", specifier = "~=8.1.7" },
{ name = "crewai-cli", editable = "lib/cli" },
@@ -1426,7 +1447,7 @@ requires-dist = [
{ name = "tomli-w", specifier = "~=1.1.0" },
{ name = "voyageai", marker = "extra == 'voyageai'", specifier = "~=0.3.5" },
]
provides-extras = ["a2a", "anthropic", "aws", "azure-ai-inference", "bedrock", "docling", "embeddings", "file-processing", "google-genai", "litellm", "mem0", "openpyxl", "pandas", "qdrant", "qdrant-edge", "tools", "voyageai", "watson"]
provides-extras = ["a2a", "anthropic", "aws", "azure-ai-inference", "bedrock", "cerebras", "docling", "embeddings", "file-processing", "google-genai", "litellm", "mem0", "openpyxl", "pandas", "qdrant", "qdrant-edge", "tools", "voyageai", "watson"]
[[package]]
name = "crewai-cli"