mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
style(ui): drop decorative section banners from the access group budget hooks
This commit is contained in:
parent
7c0e58ed06
commit
243f8317f4
3 changed files with 0 additions and 20 deletions
|
|
@ -3,12 +3,8 @@ import { fetchClient } from "@/lib/http/api";
|
|||
import type { components } from "@/lib/http/schema";
|
||||
import { modelAccessGroupKeys } from "./useModelAccessGroups";
|
||||
|
||||
// ── Types ────────────────────────────────────────────────────────────────────
|
||||
|
||||
type DeleteModelAccessGroupBudgetResponse = components["schemas"]["DeleteAccessGroupBudgetResponse"];
|
||||
|
||||
// ── Fetch function ───────────────────────────────────────────────────────────
|
||||
|
||||
const deleteModelAccessGroupBudget = async (
|
||||
accessGroup: string,
|
||||
): Promise<DeleteModelAccessGroupBudgetResponse | undefined> => {
|
||||
|
|
@ -18,8 +14,6 @@ const deleteModelAccessGroupBudget = async (
|
|||
return data;
|
||||
};
|
||||
|
||||
// ── Hook ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Clear a model access group's shared budget. The group and its deployments are untouched,
|
||||
* and the recorded spend goes with the budget row.
|
||||
|
|
|
|||
|
|
@ -5,24 +5,16 @@ import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
|
|||
import { fetchClient } from "@/lib/http/api";
|
||||
import type { components } from "@/lib/http/schema";
|
||||
|
||||
// ── Types ────────────────────────────────────────────────────────────────────
|
||||
|
||||
export type ModelAccessGroupBudget = components["schemas"]["AccessGroupBudget"];
|
||||
export type ModelAccessGroup = components["schemas"]["AccessGroupInfo"];
|
||||
|
||||
// ── Query keys (shared across model-access-group hooks) ──────────────────────
|
||||
|
||||
export const modelAccessGroupKeys = createQueryKeys("modelAccessGroups");
|
||||
|
||||
// ── Fetch function ───────────────────────────────────────────────────────────
|
||||
|
||||
const fetchModelAccessGroups = async (): Promise<ModelAccessGroup[]> => {
|
||||
const { data } = await fetchClient.GET("/access_group/list");
|
||||
return data?.access_groups ?? [];
|
||||
};
|
||||
|
||||
// ── Hook ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Model access groups: the free-text labels on a deployment's `model_info.access_groups`,
|
||||
* with the shared budget each one carries. Unrelated to the `/v1/access_group` table that
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ import { fetchClient } from "@/lib/http/api";
|
|||
import type { components } from "@/lib/http/schema";
|
||||
import { modelAccessGroupKeys } from "./useModelAccessGroups";
|
||||
|
||||
// ── Types ────────────────────────────────────────────────────────────────────
|
||||
|
||||
export type SetModelAccessGroupBudgetParams = components["schemas"]["AccessGroupBudgetRequest"];
|
||||
type SetModelAccessGroupBudgetResponse = components["schemas"]["AccessGroupBudgetResponse"];
|
||||
|
||||
|
|
@ -13,8 +11,6 @@ export interface SetModelAccessGroupBudgetVariables {
|
|||
params: SetModelAccessGroupBudgetParams;
|
||||
}
|
||||
|
||||
// ── Fetch function ───────────────────────────────────────────────────────────
|
||||
|
||||
const setModelAccessGroupBudget = async ({
|
||||
accessGroup,
|
||||
params,
|
||||
|
|
@ -26,8 +22,6 @@ const setModelAccessGroupBudget = async ({
|
|||
return data;
|
||||
};
|
||||
|
||||
// ── Hook ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
/** Set or replace a model access group's shared budget. The write is idempotent. */
|
||||
export const useSetModelAccessGroupBudget = () => {
|
||||
const queryClient = useQueryClient();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue