Skip to content

feat: add Cerebras as an AI provider in backend and UI#50

Open
krishsharma-code wants to merge 2 commits into
HexmosTech:masterfrom
krishsharma-code:feat/add-cerebras-provider
Open

feat: add Cerebras as an AI provider in backend and UI#50
krishsharma-code wants to merge 2 commits into
HexmosTech:masterfrom
krishsharma-code:feat/add-cerebras-provider

Conversation

@krishsharma-code
Copy link
Copy Markdown

Overview

This PR implements the backend connector and frontend UI configuration for adding Cerebras AI as a natively supported provider. Cerebras is OpenAI-compatible, so it correctly routes through the existing OpenAI wrapper factories.

Changes Made

  • Backend (internal/aiconnectors & internal/ai/langchain):
    • Added ProviderCerebras constant and mapped it to createOpenAIModel().
    • Added canonical base URL (https://api.cerebras.ai/v1) to defaults.
    • Set default fallback model to llama3.1-8b and token limit cap to 8000.
  • Frontend (ui/):
    • Updated AIProviders.tsx to add Cerebras in the UI selectable list with placeholders for API keys and auto-populated base URLs.

Related Issue

This PR fulfills the backend implementation required for HexmosTech/git-lrc#79 under GSSoC.

@shrsv
Copy link
Copy Markdown
Contributor

shrsv commented May 26, 2026

Can you share a video walkthrough of how the UI looks like @krishsharma-code (so we can give UI flow feedback if any)?

Also if flow overall OK - we also have workflows to run (security, organization, etc) as well - which we will do once flow seems OK. We will also do a manual review once it runs.

@krishsharma-code
Copy link
Copy Markdown
Author

krishsharma-code commented May 27, 2026

Uploading Screen Recording 2026-05-27 213028.mp4…

Hey! I have successfully tested the Cerebras provider locally using Docker. The UI correctly auto-fills the default model (llama3.1-8b), and the backend API validation is correctly triggering and catching invalid test keys. Attached the screen recording for reference! I successfully spun up the entire LiveReview stack locally via Docker and tested my Cerebras AI provider implementation. The default model auto-fills perfectly and backend validation is working exactly as expected.

@LinceMathew
Copy link
Copy Markdown
Contributor

hi @krishsharma-code, Thanks for the video demo, btw. Could you please try with a valid API key? Basically we need to make sure the AI review is also working with this Cerebras. Let us know if you have any issues or doubts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants