Registry / llm-agents / langchain-cerebras

langchain-cerebras

JSON →
library0.8.2pypypi✓ verified 83d ago

An integration package that connects Cerebras AI models with the LangChain framework, currently at version 0.8.2. Releases are frequent, with minor and patch updates roughly every few weeks.

pip install langchain-cerebras
INSTALL
IMPORT
SIG · LANGCHAIN-CEREBRAS
L
langchain-cerebras
llm-agentspythonv0.8.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChatCerebras
from langchain_cerebras import ChatCerebras
from langchain_cerebras import Cerebras

Initialize ChatCerebras with an API key and model name, then invoke a simple prompt.

import os from langchain_cerebras import ChatCerebras llm = ChatCerebras( model="llama3.1-8b", api_key=os.environ.get("CEREBRAS_API_KEY", ""), temperature=0.7 ) response = llm.invoke("Hello, how are you?") print(response.content)
Debug
Known issues
breakingVersion 0.8.0 introduced reasoning parameters support, which may require updates to existing code if using the previous simple generation interface.
fix
Review the changelog and adjust calls to include additional parameters like 'reasoning_effort' if needed.
affects: >=0.8.0,<0.9.0
deprecatedThe old import path 'from langchain_community.llms import Cerebras' is deprecated in favor of 'from langchain_cerebras import Cerebras'.
fix
Use the new import from langchain_cerebras instead.
affects: >=0.1.0
gotchaThe library requires Python 3.11 or 3.12; Python 3.13 is not supported as of version 0.8.2.
fix
Use Python 3.11 or 3.12.
affects: >=0.7.0
Upgrade
Version history
0.8.2latest on PyPI · released Nov 24, 2025
Audit
Dependencies
langchain-corerequiredCore LangChain dependency, minimal version >=1.1.0 as of 0.8.2
langchain-openairequiredRequired for OpenAI-compatible API calls, version >=1.0.0
Agent activity
17 hits · last 30 days
node
16
OpenAI (training)
1
Resources
langchain-cerebras — pip install langchain-cerebras · libregistry