mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Fix unnecessary mapping overwrites for prefixed providers
The staleness check for custom models compared against the raw customModelName instead of the prefixed version, so it always evaluated to true for Azure/OpenAI-Compatible/OpenAI-Text-Compatible, causing an extra re-render on every deps change.
This commit is contained in:
parent
b613925ec8
commit
1b3ebf00f6
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ const ConditionalPublicModelName: React.FC = () => {
|
|||
!selectedModels.every((model) =>
|
||||
currentMappings.some((mapping: { public_name: string; litellm_model: string }) => {
|
||||
if (model === "custom") {
|
||||
return mapping.litellm_model === "custom" || mapping.litellm_model === customModelName;
|
||||
return mapping.litellm_model === "custom" || mapping.litellm_model === prefixWithProvider(selectedProvider, customModelName);
|
||||
}
|
||||
return mapping.litellm_model === prefixWithProvider(selectedProvider, model);
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue