@acarmisc/backstage-plugin-litellm-backend 0.30.1 → 0.32.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/config.d.ts CHANGED
@@ -44,16 +44,29 @@ export interface Config {
44
44
  enabled?: boolean;
45
45
 
46
46
  defaults?: {
47
+ /**
48
+ * Leave first-visit user budgets to LiteLLM. When true, maxBudget and
49
+ * budgetDuration have no built-in fallback: each is sent on /user/new
50
+ * only if set here or on the matching roles[] entry. Otherwise LiteLLM's
51
+ * litellm_settings.max_internal_user_budget /
52
+ * internal_user_budget_duration apply (LiteLLM applies those to
53
+ * user_role internal_user only).
54
+ * @default false
55
+ */
56
+ useGatewayBudgetDefaults?: boolean;
57
+
47
58
  /**
48
59
  * Max lifetime spend in USD before the account is blocked.
49
- * Set a conservative value; null means no hard cap.
60
+ * Set a conservative value. When unset, 10 is used unless
61
+ * useGatewayBudgetDefaults is true (a YAML null counts as unset).
50
62
  * @default 10
51
63
  */
52
64
  maxBudget?: number;
53
65
 
54
66
  /**
55
67
  * Spend-reset period for maxBudget (e.g. "30d", "7d", "1h").
56
- * After this period the spend counter resets.
68
+ * After this period the spend counter resets. When unset, "30d" is
69
+ * used unless useGatewayBudgetDefaults is true.
57
70
  * @default "30d"
58
71
  */
59
72
  budgetDuration?: string;
@@ -167,6 +180,9 @@ export interface Config {
167
180
  * Allowed duration presets for keys (e.g. "1d", "7d", "30d", "90d").
168
181
  * Requests with a duration not in this list are rejected with a 400 error.
169
182
  * An empty array allows any duration matching the format /^\d+[smhdwy]$/.
183
+ * List "never" to offer keys that never expire: such a key is sent to
184
+ * LiteLLM with no duration. "never" is never the default and is only
185
+ * accepted when listed here.
170
186
  * @default ["1d", "7d", "30d", "90d"]
171
187
  */
172
188
  allowedDurations?: string[];