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]

397 B
Raw Blame
export interface GroupedModels {
  wildcard: string[];
  regular: string[];
}

export const splitWildcardModels = (models: string[]): GroupedModels => {
  const wildcard: string[] = [];
  const regular: string[] = [];

  for (const model of models) {
    if (model.endsWith("/*")) {
      wildcard.push(model);
    } else {
      regular.push(model);
    }
  }

  return { wildcard, regular };
};