feat: Add endpoint type filter to model pricing system

- Create PricingEndpointTypes.jsx component for endpoint type filtering
- Add filterEndpointType state management in useModelPricingData hook
- Integrate endpoint type filtering logic in filteredModels computation
- Update PricingSidebar.jsx to include endpoint type filter component
- Update PricingFilterModal.jsx to support endpoint type filtering on mobile
- Extend resetPricingFilters utility function to include endpoint type reset
- Support filtering models by endpoint types (OpenAI, Anthropic, Gemini, etc.)
- Display model count for each endpoint type with localized labels
- Ensure filter state resets to first page when endpoint type changes

This enhancement allows users to filter models by their supported endpoint types,
providing more granular control over model selection in the pricing interface.
This commit is contained in:
t0ng7u
2025-07-24 03:25:57 +08:00
parent 53be79a00e
commit 59a76b3970
5 changed files with 135 additions and 2 deletions

View File

@@ -682,6 +682,7 @@ export const resetPricingFilters = ({
setViewMode,
setFilterGroup,
setFilterQuotaType,
setFilterEndpointType,
setCurrentPage,
}) => {
// 重置搜索
@@ -728,6 +729,11 @@ export const resetPricingFilters = ({
setFilterQuotaType('all');
}
// 重置端点类型筛选
if (typeof setFilterEndpointType === 'function') {
setFilterEndpointType('all');
}
// 重置当前页面
if (typeof setCurrentPage === 'function') {
setCurrentPage(1);