@acarmisc/backstage-plugin-litellm 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/budget.d.ts +9 -0
- package/dist/components/LiteLLMBudgetWidget.d.ts +22 -0
- package/dist/index.cjs.js +590 -481
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.esm.js +569 -460
- package/dist/index.esm.js.map +4 -4
- package/package.json +1 -1
package/dist/budget.d.ts
CHANGED
|
@@ -39,6 +39,15 @@ export interface BudgetSummary {
|
|
|
39
39
|
* team falls back to the owner's personal budget.
|
|
40
40
|
*/
|
|
41
41
|
export declare function buildBudgetSummary(user: UserInfo | null, teams: TeamInfo[], keys: VirtualKey[], maxKeys?: number): BudgetSummary;
|
|
42
|
+
/**
|
|
43
|
+
* One-line summary of a `BudgetSummary`, for a collapsed/compact header:
|
|
44
|
+
* how many concrete limits the user is subject to, and how close the
|
|
45
|
+
* closest one is to its cap. `closestPct` is null when there are no limits.
|
|
46
|
+
*/
|
|
47
|
+
export declare function budgetHeadline(summary: BudgetSummary): {
|
|
48
|
+
count: number;
|
|
49
|
+
closestPct: number | null;
|
|
50
|
+
};
|
|
42
51
|
/** "30d" → "every 30 days"; "1d" → "daily". Returns null when duration is unset. */
|
|
43
52
|
export declare function fmtBudgetDuration(duration?: string): string | null;
|
|
44
53
|
/** status pill tone + meter tone for a budget at `pct`. */
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
* personal budget;
|
|
12
12
|
* - a limit with a `budget_duration` resets its spend when the window
|
|
13
13
|
* closes; without one it never resets.
|
|
14
|
+
*
|
|
15
|
+
* Two knobs shrink it for use as a secondary column:
|
|
16
|
+
* - `compact` drops the numbered rail and the policy footnote, showing
|
|
17
|
+
* only the limits the user actually has as a tight tagged meter list;
|
|
18
|
+
* - `collapsible` folds the body under a one-line summary header.
|
|
19
|
+
* `action` renders a host-supplied node (e.g. a button) pinned to the card
|
|
20
|
+
* bottom, always visible.
|
|
14
21
|
*/
|
|
15
22
|
import React from 'react';
|
|
16
23
|
export interface LiteLLMBudgetWidgetProps {
|
|
@@ -18,5 +25,20 @@ export interface LiteLLMBudgetWidgetProps {
|
|
|
18
25
|
title?: string;
|
|
19
26
|
/** Max key budgets to show, closest to the cap first. Defaults to 3. */
|
|
20
27
|
maxKeys?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Drop the numbered key→personal→team→global rail and the policy
|
|
30
|
+
* footnote; show only the limits the user actually has. Defaults to false.
|
|
31
|
+
*/
|
|
32
|
+
compact?: boolean;
|
|
33
|
+
/** Fold the body under a clickable one-line summary header. Defaults to false. */
|
|
34
|
+
collapsible?: boolean;
|
|
35
|
+
/** Initial expanded state when `collapsible`. Defaults to true. */
|
|
36
|
+
defaultExpanded?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Node rendered at the card bottom, below a divider and outside the
|
|
39
|
+
* collapsible region so it stays visible when collapsed — e.g. a
|
|
40
|
+
* "create key" button.
|
|
41
|
+
*/
|
|
42
|
+
action?: React.ReactNode;
|
|
21
43
|
}
|
|
22
44
|
export declare const LiteLLMBudgetWidget: React.FC<LiteLLMBudgetWidgetProps>;
|