Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

498 B
Raw Blame
import { clientLimitsSchema } from 'librechat-data-provider';
import type { TClientLimits } from 'librechat-data-provider';

/** Publishes the operator's client request deadlines; invalid input is dropped so defaults apply. */
export function getClientLimits(raw?: unknown): TClientLimits | undefined {
  if (raw == null) return undefined;
  const parsed = clientLimitsSchema.safeParse(raw);
  if (!parsed.success || Object.keys(parsed.data).length === 0) return undefined;
  return parsed.data;
}