🚀 feat(pricing): clarify “auto” group routing chain and exclude it from price table
Detailed changes Backend • `controller/pricing.go` now includes `auto_groups` in `/api/pricing` response, sourced from `setting.AutoGroups`. Frontend • `useModelPricingData.js` – Parses `auto_groups` and exposes `autoGroups` state. • `PricingPage.jsx` → `ModelDetailSideSheet.jsx` → `ModelPricingTable.jsx` – Thread `autoGroups` through component tree. • `ModelPricingTable.jsx` – Removes deprecated `getGroupDescription` / `Tooltip`. – Filters out `auto` when building price table rows. – Renders a descriptive banner: “auto 分组调用链路 → auto → group1 → …”, clarifying fallback order without showing prices. • Minor i18n tweak: adds `auto分组调用链路` key for the banner text. Why Users were confused by the “auto” tag appearing alongside regular groups with no price. This change: 1. Makes the routing chain explicit. 2. Keeps the pricing table focused on billable groups. No breaking API changes; existing clients can ignore the new `auto_groups` field.
This commit is contained in:
@@ -39,7 +39,6 @@ const ModelDetailSideSheet = ({
|
||||
visible,
|
||||
onClose,
|
||||
modelData,
|
||||
selectedGroup,
|
||||
groupRatio,
|
||||
currency,
|
||||
tokenUnit,
|
||||
@@ -48,6 +47,7 @@ const ModelDetailSideSheet = ({
|
||||
usableGroup,
|
||||
vendorsMap,
|
||||
endpointMap,
|
||||
autoGroups,
|
||||
t,
|
||||
}) => {
|
||||
const isMobile = useIsMobile();
|
||||
@@ -86,13 +86,13 @@ const ModelDetailSideSheet = ({
|
||||
<ModelEndpoints modelData={modelData} endpointMap={endpointMap} t={t} />
|
||||
<ModelPricingTable
|
||||
modelData={modelData}
|
||||
selectedGroup={selectedGroup}
|
||||
groupRatio={groupRatio}
|
||||
currency={currency}
|
||||
tokenUnit={tokenUnit}
|
||||
displayPrice={displayPrice}
|
||||
showRatio={showRatio}
|
||||
usableGroup={usableGroup}
|
||||
autoGroups={autoGroups}
|
||||
t={t}
|
||||
/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user