Repository navigation
feat(vendors): add Cerebras as a model vendor - #12
Merged
Merged
Conversation
Cerebras Inference speaks Chat Completions at https://api.cerebras.ai/v1, its key in CEREBRAS_API_KEY. Its file follows deepseek.rs, but Cerebras returns reasoning as `reasoning`, not `reasoning_content`, and takes it back in an assistant message as `reasoning`. Its dialect renames the field before `chat::read` and after `chat::reasoning_written`, so a client of another format gets the reasoning instead of an untranslatable response. The vendor kit and the other vendors are unchanged. Fixes respanai#4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
The deny failure is RUSTSEC-2026-0383 (webpki-root-certs), published after main's last green run, so it also fails on main. It doesn't come from this change. cargo update -p webpki-root-certs -p rustls-webpki fixes it. |
Member
sounds good. im merging this one first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Cerebras Inference as a yellow model vendor:
vendor = "cerebras", Chat Completions athttps://api.cerebras.ai/v1, key inCEREBRAS_API_KEY.Fixes #4
What
crates/vendors/yellow/src/cerebras.rs, followingdeepseek.rsas the issue suggests, in bothALLlists.reasoning, not DeepSeek'sreasoning_content(reasoning guide, API reference), and takes it back in an assistant message asreasoning. With a straight copy,chat::readleavesdelta.reasoningunread, so an Anthropic, Responses or Gemini client fails withuntranslatablewhenever the model reasons, and reasoning sent back in history goes asreasoning_content.delta.reasoningtoreasoning_contentbefore the existingchat::read, and thereasoning_contentthatchat::reasoning_writtenwrites toreasoning. This is incerebras.rsalone, asgroq.rsandgemini.rshandle their quirks; the kit and the other vendors are unchanged.time_infoneeds nothing:openai-chatalready treats it as inert.docs/vendors.mdunder Yellow and its base URL there, the vendor lists indocs/configuration.mdand the README, and its LobeHub logo indocs/assets/vendors/and the UI'svendor-icons.ts.Checks
cargo fmt --all --check,cargo clippy --workspace --all-targets --all-features -- -D warnings: clean.cargo test --workspace --all-targets --all-features: 631 passed;cargo test --workspace --doc --all-features: passed.a_bad_provider_is_an_errornow listscerebras.apps/ui:pnpm lint,pnpm typecheck,pnpm test(196): pass.reasoning. With a straight copy ofdeepseek.rs, every client but OpenAI Chat fails withuntranslatable. I can share the fake if useful./v1/chat/completionsand/v1/messagesboth return Cerebras's ownwrong_api_key, so the base URL, key header and routing are right. No live run with a real key.