fix: revert the modelInList check in the model icon component

pull/12560/head
Yi 1 year ago
parent 8c9c336b64
commit b0b373d2fb

@ -13,14 +13,12 @@ type ModelIconProps = {
modelName?: string modelName?: string
className?: string className?: string
isDeprecated?: boolean isDeprecated?: boolean
isInModelList?: boolean
} }
const ModelIcon: FC<ModelIconProps> = ({ const ModelIcon: FC<ModelIconProps> = ({
provider, provider,
className, className,
modelName, modelName,
isDeprecated = false, isDeprecated = false,
isInModelList = true,
}) => { }) => {
const language = useLanguage() const language = useLanguage()
if (provider?.provider.includes('openai') && modelName?.includes('gpt-4o')) if (provider?.provider.includes('openai') && modelName?.includes('gpt-4o'))
@ -28,7 +26,7 @@ const ModelIcon: FC<ModelIconProps> = ({
if (provider?.provider.includes('openai') && modelName?.startsWith('gpt-4')) if (provider?.provider.includes('openai') && modelName?.startsWith('gpt-4'))
return <div className='flex items-center justify-center'><OpenaiViolet className={cn('w-5 h-5', className)}/></div> return <div className='flex items-center justify-center'><OpenaiViolet className={cn('w-5 h-5', className)}/></div>
if (provider?.icon_small && isInModelList) { if (provider?.icon_small) {
return ( return (
<div className={`flex items-center justify-center w-5 h-5 ${isDeprecated ? 'opacity-50' : ''}`}> <div className={`flex items-center justify-center w-5 h-5 ${isDeprecated ? 'opacity-50' : ''}`}>
<img <img

@ -112,7 +112,6 @@ const AgentModelTrigger: FC<AgentModelTriggerProps> = ({
provider={currentProvider || modelProvider} provider={currentProvider || modelProvider}
modelName={currentModel?.model || modelId} modelName={currentModel?.model || modelId}
isDeprecated={hasDeprecated} isDeprecated={hasDeprecated}
isInModelList={inModelList}
/> />
<ModelDisplay <ModelDisplay
currentModel={currentModel} currentModel={currentModel}

Loading…
Cancel
Save