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]

fix(ui): stop listing bedrock_mantle models under the Bedrock provider (#31478)

Mateo Wang01efcc1b740c
diff --git a/ui/litellm-dashboard/src/components/provider_info_helpers.test.tsx b/ui/litellm-dashboard/src/components/provider_info_helpers.test.tsx
index d870c278db0..ea563476c3d 100644
--- a/ui/litellm-dashboard/src/components/provider_info_helpers.test.tsx
+++ b/ui/litellm-dashboard/src/components/provider_info_helpers.test.tsx
@@ -308,17 +308,17 @@ describe("provider_info_helpers", () => {
expect(result).not.toContain("anthropic-native");
});
- it("should include bedrock variants (converse, mantle) when called with 'Bedrock' provider key", () => {
+ it("should include bedrock converse but exclude standalone bedrock_mantle when called with 'Bedrock' provider key", () => {
const modelMap = {
"bedrock-base": { litellm_provider: "bedrock" },
"bedrock-converse-model": { litellm_provider: "bedrock_converse" },
- "bedrock-mantle-model": { litellm_provider: "bedrock_mantle" },
+ "bedrock_mantle/openai.gpt-5.4": { litellm_provider: "bedrock_mantle" },
"openai-model": { litellm_provider: "openai" },
};
const result = getProviderModels("Bedrock" as Providers, modelMap);
expect(result).toContain("bedrock-base");
expect(result).toContain("bedrock-converse-model");
- expect(result).toContain("bedrock-mantle-model");
+ expect(result).not.toContain("bedrock_mantle/openai.gpt-5.4");
expect(result).not.toContain("openai-model");
});
diff --git a/ui/litellm-dashboard/src/components/provider_info_helpers.tsx b/ui/litellm-dashboard/src/components/provider_info_helpers.tsx
index b6bdbbc85f0..d158cc6a1f0 100644
--- a/ui/litellm-dashboard/src/components/provider_info_helpers.tsx
+++ b/ui/litellm-dashboard/src/components/provider_info_helpers.tsx
@@ -218,6 +218,8 @@ export const provider_map: Record<string, string> = {
ZAI: "zai",
};
+const standaloneSubproviderSlugs = new Set<string>(["bedrock_mantle"]);
+
const asset_logos_folder = "/ui/assets/logos/";
export const providerLogoMap: Record<string, string> = {
@@ -394,11 +396,13 @@ export const getProviderModels = (provider: Providers, modelMap: any): Array<str
Object.entries(modelMap).forEach(([key, value]) => {
if (value !== null && typeof value === "object" && "litellm_provider" in (value as object)) {
const litellmProvider = (value as any)["litellm_provider"];
+ const isPrefixVariant =
+ typeof litellmProvider === "string" &&
+ (litellmProvider.startsWith(`${custom_llm_provider}_`) ||
+ litellmProvider.startsWith(`${custom_llm_provider}-`));
if (
litellmProvider === custom_llm_provider ||
- (typeof litellmProvider === "string" &&
- (litellmProvider.startsWith(`${custom_llm_provider}_`) ||
- litellmProvider.startsWith(`${custom_llm_provider}-`)))
+ (isPrefixVariant && !standaloneSubproviderSlugs.has(litellmProvider))
) {
providerModels.push(key);
}