Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f635768
Merge pull request #97 from buerokratt/wip
Thirunayan22 Dec 16, 2025
b674b5e
updated docker compose ec2
Thirunayan22 Dec 16, 2025
9fec475
integrate streaming endpoint with test prodction connection page
Jan 7, 2026
9caa51d
formatted response with markdown
Jan 7, 2026
49a78eb
fe logic for the encryption
Jan 9, 2026
e8af3fa
vault secret update after fixing issues
nuwangeek Jan 9, 2026
dd3fa8b
fixed formatting issue
nuwangeek Jan 9, 2026
023d53a
Merge pull request #100 from rootcodelabs/RAG-201-Fix
nuwangeek Jan 9, 2026
6e7e45f
integration with be
Jan 9, 2026
620af8c
update cron manager vault script
nuwangeek Jan 9, 2026
509d0f0
Merge pull request #101 from rootcodelabs/RAG-201-Fix
nuwangeek Jan 9, 2026
c6351eb
tested integration of vault security update
nuwangeek Jan 12, 2026
30f05bb
fix security issues
nuwangeek Jan 13, 2026
8b54764
Merge pull request #102 from rootcodelabs/streaming-response-formatting
nuwangeek Jan 13, 2026
7b1c830
Merge branch 'RAG-206' into encrypt-llm-keys
nuwangeek Jan 13, 2026
4fe08d1
Merge pull request #103 from rootcodelabs/encrypt-llm-keys
nuwangeek Jan 13, 2026
a416995
fixed issue references are not sending with streming tokens
nuwangeek Jan 13, 2026
0352184
complete #192 and #206 bug fixes
nuwangeek Jan 14, 2026
b584e44
change production inference display logic
Jan 14, 2026
6f95769
Merge pull request #105 from buerokratt/wip
nuwangeek Jan 14, 2026
5cc3963
Merge branch 'RAG-192' into wip
nuwangeek Jan 14, 2026
8af40e1
Add budget management features to LLMConnectionCard and translations
Jan 19, 2026
6e1a07e
Remove obsolete Vite configuration files and associated plugins
Jan 19, 2026
f6ea894
Merge pull request #108 from buerokratt/wip
erangi-ar Jan 19, 2026
07a83d8
Merge branch 'wip' of https://github.com/rootcodelabs/RAG-Module into…
Jan 19, 2026
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
43 changes: 43 additions & 0 deletions GUI/src/components/molecules/LLMConnectionCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ type LLMConnectionCardProps = {
isActive?: boolean;
deploymentEnv?: string;
budgetStatus?: string;
usedBudget?: number;
monthlyBudget?: number;
stopBudgetThreshold?: number;
disconnectOnBudgetExceed?: boolean;
onStatusChange?: (id: number | string, newStatus: boolean) => void;
};

Expand All @@ -32,6 +36,10 @@ const LLMConnectionCard: FC<PropsWithChildren<LLMConnectionCardProps>> = ({
isActive,
deploymentEnv,
budgetStatus,
usedBudget,
monthlyBudget,
stopBudgetThreshold,
disconnectOnBudgetExceed,
onStatusChange,
}) => {
const { open, close } = useDialog();
Expand All @@ -40,6 +48,31 @@ const LLMConnectionCard: FC<PropsWithChildren<LLMConnectionCardProps>> = ({
const toast = useToast();
const queryClient = useQueryClient();

// Format currency
const formatCurrency = (amount?: number): string => {
if (amount === undefined || amount === null) {
return '0,00 €';
}

return new Intl.NumberFormat('et-EE', {
style: 'currency',
currency: 'EUR',
minimumFractionDigits: 2,
maximumFractionDigits: 2,
}).format(amount);
};


// Get the relevant budget threshold
const getRelevantBudget = (): number | undefined => {
// here if disconnect on budget exceed is enabled and stop threshold is set, calculate the actual amount from percentage
if (disconnectOnBudgetExceed && stopBudgetThreshold && stopBudgetThreshold > 0 && monthlyBudget) {
return (monthlyBudget * stopBudgetThreshold) / 100;
}
// Otherwise using monthly budget
return monthlyBudget;
};

const updateStatusMutation = useMutation({
mutationFn: ({ id, status }: { id: string | number; status: 'active' | 'inactive' }) =>
updateLLMConnectionStatus(id, status),
Expand Down Expand Up @@ -145,6 +178,16 @@ const LLMConnectionCard: FC<PropsWithChildren<LLMConnectionCardProps>> = ({
</span>
<span className="label-value">{model ?? 'N/A'}</span>
</div>
{(usedBudget !== undefined || monthlyBudget !== undefined) && (
<div className="label-row">
<span className="label-title">
{t('dataModels.budgetUsage')}:
</span>
<span className="label-value">
{formatCurrency(usedBudget)} / {formatCurrency(getRelevantBudget())}
</span>
</div>
)}
<div className='label-row'>
{renderDeploymentEnv(deploymentEnv)}
{renderBudgetStatus(budgetStatus)}
Expand Down
10 changes: 9 additions & 1 deletion GUI/src/pages/LLMConnections/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ const LLMConnections: FC = () => {
deploymentEnv={productionConnection.environment}
budgetStatus={productionConnection.budgetStatus}
platform={productionConnection.llmPlatform}
model={productionConnection.llmModel}
model={productionConnection.llmModel}
usedBudget={productionConnection.usedBudget}
monthlyBudget={productionConnection.monthlyBudget}
stopBudgetThreshold={productionConnection.stopBudgetThreshold}
disconnectOnBudgetExceed={productionConnection.disconnectOnBudgetExceed}
/>
</div>
</div>
Expand All @@ -278,6 +282,10 @@ const LLMConnections: FC = () => {
budgetStatus={llmConnection.budgetStatus}
platform={llmConnection.llmPlatform}
model={llmConnection.llmModel}
usedBudget={llmConnection.usedBudget}
monthlyBudget={llmConnection.monthlyBudget}
stopBudgetThreshold={llmConnection.stopBudgetThreshold}
disconnectOnBudgetExceed={llmConnection.disconnectOnBudgetExceed}
/>
);
})}
Expand Down
1 change: 1 addition & 0 deletions GUI/translations/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"testing": "Testing",
"production": "Production"
},
"budgetUsage": "Budget usage",
"budgetStatus": {
"withinBudget": "Within budget",
"overBudget": "Over budget",
Expand Down
1 change: 1 addition & 0 deletions GUI/translations/et/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"testing": "Testimine",
"production": "Toodang"
},
"budgetUsage": "Eelarve kasutamine",
"budgetStatus": {
"withinBudget": "Eelarve piires",
"overBudget": "Eelarve ületatud",
Expand Down
Loading