diff --git a/web/src/components/table/model-pricing/modal/components/ModelPricingTable.jsx b/web/src/components/table/model-pricing/modal/components/ModelPricingTable.jsx index de52eae6..f856eecb 100644 --- a/web/src/components/table/model-pricing/modal/components/ModelPricingTable.jsx +++ b/web/src/components/table/model-pricing/modal/components/ModelPricingTable.jsx @@ -35,11 +35,11 @@ const ModelPricingTable = ({ autoGroups = [], t, }) => { + const modelEnableGroups = Array.isArray(modelData?.enable_groups) ? modelData.enable_groups : []; + const autoChain = autoGroups.filter(g => modelEnableGroups.includes(g)); const renderGroupPriceTable = () => { // 仅展示模型可用的分组:模型 enable_groups 与用户可用分组的交集 - const modelEnableGroups = Array.isArray(modelData?.enable_groups) - ? modelData.enable_groups - : []; + const availableGroups = Object.keys(usableGroup || {}) .filter(g => g !== '') .filter(g => g !== 'auto') @@ -169,14 +169,14 @@ const ModelPricingTable = ({
{t('不同用户分组的价格信息')}
- {autoGroups && autoGroups.length > 0 && ( + {autoChain.length > 0 && (
{t('auto分组调用链路')} - {autoGroups.map((g, idx) => ( + {autoChain.map((g, idx) => ( {g}{t('分组')} - {idx < autoGroups.length - 1 && } + {idx < autoChain.length - 1 && } ))}