mirror of https://github.com/langgenius/dify.git
fix: revert the modelInList check in the model icon component
This commit is contained in:
parent
8c9c336b64
commit
b0b373d2fb
|
|
@ -13,14 +13,12 @@ type ModelIconProps = {
|
|||
modelName?: string
|
||||
className?: string
|
||||
isDeprecated?: boolean
|
||||
isInModelList?: boolean
|
||||
}
|
||||
const ModelIcon: FC<ModelIconProps> = ({
|
||||
provider,
|
||||
className,
|
||||
modelName,
|
||||
isDeprecated = false,
|
||||
isInModelList = true,
|
||||
}) => {
|
||||
const language = useLanguage()
|
||||
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'))
|
||||
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 (
|
||||
<div className={`flex items-center justify-center w-5 h-5 ${isDeprecated ? 'opacity-50' : ''}`}>
|
||||
<img
|
||||
|
|
|
|||
|
|
@ -112,7 +112,6 @@ const AgentModelTrigger: FC<AgentModelTriggerProps> = ({
|
|||
provider={currentProvider || modelProvider}
|
||||
modelName={currentModel?.model || modelId}
|
||||
isDeprecated={hasDeprecated}
|
||||
isInModelList={inModelList}
|
||||
/>
|
||||
<ModelDisplay
|
||||
currentModel={currentModel}
|
||||
|
|
|
|||
Loading…
Reference in New Issue