
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@langchain/cerebras
Advanced tools
This package contains the LangChain.js integrations for Cerebras via the @cerebras/cerebras_cloud_sdk package.
npm install @langchain/cerebras @langchain/core
This package adds support for Cerebras chat model inference.
Set the necessary environment variable (or pass it in via the constructor):
export CEREBRAS_API_KEY=
import { ChatCerebras } from "@langchain/cerebras";
import { HumanMessage } from "@langchain/core/messages";
const model = new ChatCerebras({
apiKey: process.env.CEREBRAS_API_KEY, // Default value.
});
const message = new HumanMessage("What color is the sky?");
const res = await model.invoke([message]);
To develop the @langchain/cerebras package, you'll need to follow these instructions:
pnpm install
pnpm build
Or from the repo root:
pnpm build --filter @langchain/cerebras
Test files should live within a tests/ file in the src/ folder. Unit tests should end in .test.ts and integration tests should
end in .int.test.ts:
$ pnpm test
$ pnpm test:int
Run the linter & formatter to ensure your code is up to standard:
pnpm lint && pnpm format
If you add a new file to be exported, either import & re-export from src/index.ts, or add it to the exports field in the package.json file and run pnpm build to generate the new entrypoint.
FAQs
Cerebras integration for LangChain.js
The npm package @langchain/cerebras receives a total of 1,388 weekly downloads. As such, @langchain/cerebras popularity was classified as popular.
We found that @langchain/cerebras demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.