fix(ui): stop listing bedrock_mantle models under the Bedrock provider - #31478
Merged
mateo-berri merged 1 commit intoJun 26, 2026
Merged
Conversation
The Add Model form's getProviderModels rolled any litellm_provider that
starts with the selected provider's slug into that provider's list. Because
"bedrock_mantle".startsWith("bedrock_") is true, bedrock_mantle/* models
(OpenAI-compatible, served at bedrock-mantle.{region}.api.aws) showed up
under plain Amazon Bedrock, where that model string routes to bedrock-runtime
and fails.
Exclude standalone sub-providers from the prefix rollup so bedrock_mantle/*
only appears under the Amazon Bedrock Mantle provider, while bedrock_converse
and other genuine sub-variants keep rolling up under Bedrock.
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 tasks
ryan-crabbe-berri
approved these changes
Jun 26, 2026
Contributor
Author
|
bugbot run |
Contributor
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 875b124. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant issues
Linear ticket
Resolves LIT-3992
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewScreenshots / Proof of Fix
This is a dropdown-filtering fix in the Add Model form, so the proof is what you see in the UI. To reproduce on a local proxy (
python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --reload):bedrock_mantle/...entries; after this change they no longer appear (you still seebedrock/bedrock_conversemodels)bedrock_mantle/...models still appear thereI will attach before/after screenshots of both provider selections
Type
🐛 Bug Fix
Changes
getProviderModelsinprovider_info_helpers.tsxbuilt each provider's model list by rolling in everylitellm_providerthat starts with the selected provider's slug. Because"bedrock_mantle".startsWith("bedrock_")is true, the OpenAI-compatiblebedrock_mantle/*models (served atbedrock-mantle.{region}.api.aws) were offered under plain Amazon Bedrock. That combination is dead on arrival: abedrock_mantle/openai....model string under the bedrock provider does not match themantle/route, so it falls through tobedrock-runtimeand the request fails.The prefix rollup is still the right behavior for genuine sub-variants like
bedrock_converse, which are not separately selectable providers. The fix introduces a smallstandaloneSubproviderSlugsset and excludes those slugs from the prefix rollup, sobedrock_mantle/*only shows under the Amazon Bedrock Mantle provider while everything else is unchanged.I considered a general rule that excludes any registered sub-provider from prefix matching, but
vertex_ai_betais structurally identical tobedrock_mantle(both are registered${parent}_suffixproviders) and the existing tests require it to keep rolling up under Vertex. There is no structural signal separating the two, so the exception lives in one explicit, named place.Updated
provider_info_helpers.test.tsx: the test that previously assertedbedrock_mantleshows under Bedrock now asserts it is excluded (whilebedrockandbedrock_converseremain). It fails on the old code and passes on the new code. Full suite: 59/59.Note
Low Risk
Small, targeted UI filtering change with unit test coverage; no auth, routing, or backend behavior changes.
Overview
Fixes Add Model suggestions so
bedrock_mantle/*models no longer appear when Amazon Bedrock is selected, while Amazon Bedrock Mantle still lists only Mantle models.getProviderModelsstill rolls in prefix-matchedlitellm_providervariants (e.g.bedrock_converse), butbedrock_mantleis excluded via a newstandaloneSubproviderSlugsset because it is a separately selectable provider whose slug falsely matched thebedrock_prefix.Tests now assert Mantle models are not included under the
Bedrockkey and still appear underBedrockMantle.Reviewed by Cursor Bugbot for commit 875b124. Bugbot is set up for automated code reviews on this repo. Configure here.