fix: revert the modelInList check in the model icon component

This commit is contained in:
Yi 2025-01-08 14:50:14 +08:00
parent 8c9c336b64
commit b0b373d2fb
2 changed files with 1 additions and 4 deletions

View File

@ -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

View File

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