Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

268 B
Raw Blame
export function isGatewayModelAllowed(
  allowedModels: Set<string> | readonly string[] | null,
  model: string,
) {
  if (allowedModels === null) return true;
  return allowedModels instanceof Set
    ? allowedModels.has(model)
    : allowedModels.includes(model);
}