From cc4fc1b3a154cecedad8220f4135f13bed906fb0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 10 Oct 2026 02:04:48 +0000 Subject: [PATCH] chore: drop comments from fallbackOptions and tighten fallback suppressions Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com> --- .../Fallbacks/fallbackOptions.ts | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/ui/litellm-dashboard/src/components/Settings/RouterSettings/Fallbacks/fallbackOptions.ts b/ui/litellm-dashboard/src/components/Settings/RouterSettings/Fallbacks/fallbackOptions.ts index 88181def618..e28173d0f6c 100644 --- a/ui/litellm-dashboard/src/components/Settings/RouterSettings/Fallbacks/fallbackOptions.ts +++ b/ui/litellm-dashboard/src/components/Settings/RouterSettings/Fallbacks/fallbackOptions.ts @@ -41,12 +41,6 @@ export const providerWildcardOption = (slug: string): FallbackOption => { export const providerWildcardOptions = (modelGroups: ModelGroup[]): FallbackOption[] => providerSlugsFor(modelGroups).map(providerWildcardOption); -/** - * Primary picker options: one "All Models" wildcard option per - * provider first, then every existing model group. A model group literally - * named like a wildcard (e.g. "openai/*") is folded into its friendly option - * so it is not listed twice. - */ export const primaryModelOptions = (modelGroups: ModelGroup[]): FallbackOption[] => { const wildcardValues = new Set(providerWildcardOptions(modelGroups).map((option) => option.value)); const groupOptions = Array.from(new Set(modelGroups.map((modelGroup) => modelGroup.model_group))) @@ -56,23 +50,12 @@ export const primaryModelOptions = (modelGroups: ModelGroup[]): FallbackOption[] return [...providerWildcardOptions(modelGroups), ...groupOptions]; }; -/** - * Fallback-chain options: concrete model groups only. A wildcard entry can - * never be invoked as a fallback target, so anything containing "*" is out. - */ export const fallbackChainOptions = (modelGroups: ModelGroup[]): FallbackOption[] => Array.from(new Set(modelGroups.map((modelGroup) => modelGroup.model_group))) .filter((name) => !name.includes("*")) .sort((a, b) => a.localeCompare(b)) .map((name) => ({ label: name, value: name })); -/** - * Resolves the provider slug used to render a model's logo in the fallbacks - * table: the cost map's litellm_provider first, then the model-group info - * providers, then the prefix before the first "/" when it is a known - * provider slug. The last step is what lets keys like "openai/*" or - * "bedrock/us.anthropic.claude-opus-4-8" still get a logo. - */ export const resolveFallbackProvider = ( model: string, modelCostMap: Record | null | undefined, @@ -89,11 +72,6 @@ export const resolveFallbackProvider = ( return modelGroupProviderPrefix(model) ?? ""; }; -/** - * Display label for a fallback primary key. "openai/*" reads as - * "All OpenAI Models" since the wildcard spelling means nothing to most - * people; everything else keeps its raw name. - */ export const fallbackPrimaryLabel = (model: string): string => { if (model.endsWith("/*")) { const slug = model.slice(0, -2);