θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

feat: add new model provider BurnCloud #3953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 172 additions & 0 deletions frontend/src/components/LLMSelection/BurnCloudOptions/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
import { useState, useEffect } from "react";
import System from "@/models/system";

export default function BurnCloudOptions({ settings }) {
const [inputValue, setInputValue] = useState(settings?.BurnCloudApiKey);
const [burnCloudApiKey, setBurnCloudApiKey] = useState(
settings?.BurnCloudApiKey
);

return (
<div className="w-full flex flex-col">
<div className="w-full flex items-center gap-[36px] mt-1.5">
<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
BurnCloud API Key
</label>
<input
type="password"
name="BurnCloudApiKey"
className="border-none bg-theme-settings-input-bg text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5"
placeholder="BurnCloud API Key"
defaultValue={settings?.BurnCloudApiKey ? "*".repeat(20) : ""}
required={true}
autoComplete="off"
spellCheck={false}
onChange={(e) => setInputValue(e.target.value)}
onBlur={() => setBurnCloudApiKey(inputValue)}
/>
</div>

<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
BurnCloud Base URL
</label>
<input
type="url"
name="BurnCloudBaseUrl"
className="border-none bg-theme-settings-input-bg text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5"
placeholder="https://ai.burncloud.com/v1"
defaultValue={
settings?.BurnCloudBaseUrl || "https://ai.burncloud.com/v1"
}
autoComplete="off"
spellCheck={false}
/>
</div>

{!settings?.credentialsOnly && (
<BurnCloudModelSelection
apiKey={burnCloudApiKey}
settings={settings}
/>
)}
</div>
</div>
);
}

const DEFAULT_MODELS = [
// Claude Models
{
id: "claude-sonnet-4-20250514",
name: "Claude Sonnet 4",
},
{
id: "claude-3-7-sonnet-20250219",
name: "Claude 3.7 Sonnet",
},
{
id: "claude-3-5-sonnet-20241022",
name: "Claude 3.5 Sonnet",
},
// GPT Models
{
id: "gpt-4o",
name: "GPT-4o",
},
{
id: "gpt-4o-mini",
name: "GPT-4o Mini",
},
{
id: "o1",
name: "GPT-o1",
},
{
id: "gpt-4.5-preview",
name: "GPT-4.5 Preview",
},
{
id: "o1-mini",
name: "GPT-o1 Mini",
},
{
id: "gpt-image-1",
name: "GPT Image 1",
},
// Gemini Models
{
id: "gemini-2.5-pro-preview-05-06",
name: "Gemini 2.5 Pro Preview",
},
// DeepSeek Models
{
id: "deepseek-r1",
name: "DeepSeek R1",
},
{
id: "deepseek-v3",
name: "DeepSeek V3",
},
];

function BurnCloudModelSelection({ apiKey, settings }) {
const [models, setModels] = useState(DEFAULT_MODELS);
const [loading, setLoading] = useState(true);

useEffect(() => {
async function findCustomModels() {
setLoading(true);
const { models } = await System.customModels(
"burncloud",
typeof apiKey === "boolean" ? null : apiKey
);
if (models.length > 0) setModels(models);
setLoading(false);
}
findCustomModels();
}, [apiKey]);

if (loading) {
return (
<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
Chat Model Selection
</label>
<select
name="BurnCloudModelPref"
disabled={true}
className="border-none bg-theme-settings-input-bg border-gray-500 text-white text-sm rounded-lg block w-full p-2.5"
>
<option disabled={true} selected={true}>
-- loading available models --
</option>
</select>
</div>
);
}

return (
<div className="flex flex-col w-60">
<label className="text-white text-sm font-semibold block mb-3">
Chat Model Selection
</label>
<select
name="BurnCloudModelPref"
required={true}
className="border-none bg-theme-settings-input-bg border-gray-500 text-white text-sm rounded-lg block w-full p-2.5"
>
{models.map((model) => (
<option
key={model.id}
value={model.id}
selected={settings?.BurnCloudModelPref === model.id}
>
{model.name}
</option>
))}
</select>
</div>
);
}
Binary file added frontend/src/media/llmprovider/burncloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions frontend/src/pages/GeneralSettings/LLMPreference/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import XAILogo from "@/media/llmprovider/xai.png";
import NvidiaNimLogo from "@/media/llmprovider/nvidia-nim.png";
import PPIOLogo from "@/media/llmprovider/ppio.png";
import DellProAiStudioLogo from "@/media/llmprovider/dpais.png";
import BurnCloudLogo from "@/media/llmprovider/burncloud.png";

import PreLoader from "@/components/Preloader";
import OpenAiOptions from "@/components/LLMSelection/OpenAiOptions";
Expand Down Expand Up @@ -61,6 +62,7 @@ import XAILLMOptions from "@/components/LLMSelection/XAiLLMOptions";
import NvidiaNimOptions from "@/components/LLMSelection/NvidiaNimOptions";
import PPIOLLMOptions from "@/components/LLMSelection/PPIOLLMOptions";
import DellProAiStudioOptions from "@/components/LLMSelection/DPAISOptions";
import BurnCloudOptions from "@/components/LLMSelection/BurnCloudOptions";

import LLMItem from "@/components/LLMSelection/LLMItem";
import { CaretUpDown, MagnifyingGlass, X } from "@phosphor-icons/react";
Expand Down Expand Up @@ -91,6 +93,15 @@ export const AVAILABLE_LLM_PROVIDERS = [
description: "A friendly AI Assistant hosted by Anthropic.",
requiredConfig: ["AnthropicApiKey"],
},
{
name: "BurnCloud",
value: "burncloud",
logo: BurnCloudLogo,
options: (settings) => <BurnCloudOptions settings={settings} />,
description:
"Multi-model AI platform supporting Claude, GPT, Gemini, and DeepSeek models.",
requiredConfig: ["BurnCloudApiKey"],
},
{
name: "Gemini",
value: "gemini",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import OpenAiLogo from "@/media/llmprovider/openai.png";
import GenericOpenAiLogo from "@/media/llmprovider/generic-openai.png";
import AzureOpenAiLogo from "@/media/llmprovider/azure.png";
import AnthropicLogo from "@/media/llmprovider/anthropic.png";
import BurnCloudLogo from "@/media/llmprovider/burncloud.png";
import GeminiLogo from "@/media/llmprovider/gemini.png";
import OllamaLogo from "@/media/llmprovider/ollama.png";
import TogetherAILogo from "@/media/llmprovider/togetherai.png";
Expand Down Expand Up @@ -68,6 +69,14 @@ export const LLM_SELECTION_PRIVACY = {
],
logo: AnthropicLogo,
},
burncloud: {
name: "BurnCloud",
description: [
"Your chats will not be used for training",
"Your prompts and document text used in response creation are visible to BurnCloud",
],
logo: BurnCloudLogo,
},
gemini: {
name: "Google Gemini",
description: [
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/pages/OnboardingFlow/Steps/LLMPreference/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import OpenAiLogo from "@/media/llmprovider/openai.png";
import GenericOpenAiLogo from "@/media/llmprovider/generic-openai.png";
import AzureOpenAiLogo from "@/media/llmprovider/azure.png";
import AnthropicLogo from "@/media/llmprovider/anthropic.png";
import BurnCloudLogo from "@/media/llmprovider/burncloud.png";
import GeminiLogo from "@/media/llmprovider/gemini.png";
import OllamaLogo from "@/media/llmprovider/ollama.png";
import LMStudioLogo from "@/media/llmprovider/lmstudio.png";
Expand Down Expand Up @@ -32,6 +33,7 @@ import OpenAiOptions from "@/components/LLMSelection/OpenAiOptions";
import GenericOpenAiOptions from "@/components/LLMSelection/GenericOpenAiOptions";
import AzureAiOptions from "@/components/LLMSelection/AzureAiOptions";
import AnthropicAiOptions from "@/components/LLMSelection/AnthropicAiOptions";
import BurnCloudOptions from "@/components/LLMSelection/BurnCloudOptions";
import LMStudioOptions from "@/components/LLMSelection/LMStudioOptions";
import LocalAiOptions from "@/components/LLMSelection/LocalAiOptions";
import GeminiLLMOptions from "@/components/LLMSelection/GeminiLLMOptions";
Expand Down Expand Up @@ -85,6 +87,14 @@ const LLMS = [
options: (settings) => <AnthropicAiOptions settings={settings} />,
description: "A friendly AI Assistant hosted by Anthropic.",
},
{
name: "BurnCloud",
value: "burncloud",
logo: BurnCloudLogo,
options: (settings) => <BurnCloudOptions settings={settings} />,
description:
"Multi-model AI platform supporting Claude, GPT, Gemini, and DeepSeek models.",
},
{
name: "Gemini",
value: "gemini",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useTranslation } from "react-i18next";
const ENABLED_PROVIDERS = [
"openai",
"anthropic",
"burncloud",
"lmstudio",
"ollama",
"localai",
Expand Down
3 changes: 3 additions & 0 deletions server/endpoints/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ function getModelTag() {
case "anthropic":
model = process.env.ANTHROPIC_MODEL_PREF;
break;
case "burncloud":
model = process.env.BURNCLOUD_MODEL_PREF;
break;
case "lmstudio":
model = process.env.LMSTUDIO_MODEL_PREF;
break;
Expand Down
7 changes: 7 additions & 0 deletions server/models/systemSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,13 @@ const SystemSettings = {
AnthropicApiKey: !!process.env.ANTHROPIC_API_KEY,
AnthropicModelPref: process.env.ANTHROPIC_MODEL_PREF || "claude-2",

// BurnCloud Keys
BurnCloudApiKey: !!process.env.BURNCLOUD_API_KEY,
BurnCloudModelPref:
process.env.BURNCLOUD_MODEL_PREF || "claude-3-5-sonnet-20241022",
BurnCloudBaseUrl:
process.env.BURNCLOUD_BASE_URL || "https://ai.burncloud.com/v1",

// Gemini Keys
GeminiLLMApiKey: !!process.env.GEMINI_API_KEY,
GeminiLLMModelPref:
Expand Down
Loading