Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

562 B
Raw Blame
import { getUiConfig, LiteLLMWellKnownUiConfig } from "@/components/networking";
import { useQuery } from "@tanstack/react-query";
import { createQueryKeys } from "../common/queryKeysFactory";

const uiConfigKeys = createQueryKeys("uiConfig");

export const useUIConfig = () => {
  return useQuery<LiteLLMWellKnownUiConfig>({
    queryKey: uiConfigKeys.list({}),
    queryFn: async () => await getUiConfig(),
    staleTime: 24 * 60 * 60 * 1000, // 24 hours - data rarely changes
    gcTime: 24 * 60 * 60 * 1000, // 24 hours - keep in cache for 24 hours
  });
};