feat: Provider 摘要 API 改为服务端分页,支持搜索和筛选

- 后端 /summary 接口新增 page/page_size/search/status/api_format/model_id 参数
- 新增 ProviderSummaryPageResponse 分页响应模型
- 前端 useProviderFilters 从客户端筛选改为构建服务端查询参数
- ProviderManagement 通过 watch queryParams 实现分页/筛选联动,搜索 debounce 300ms
- PriorityManagementDialog 改为对话框打开时自行加载全量 providers
- 其他使用方(StandaloneKeyFormDialog/UserFormDialog/ReplayDialog/ModelManagement)适配新接口
This commit is contained in:
fawney19
2026-03-09 12:45:54 +08:00
parent 40736a8334
commit 0046123e22
10 changed files with 182 additions and 151 deletions

View File

@@ -388,8 +388,8 @@ watch(() => props.isOpen, async (isOpen) => {
showRequestHeaders.value = false
showResponseHeaders.value = false
try {
const summary = await getProvidersSummary()
providers.value = summary
const response = await getProvidersSummary({ page_size: 9999 })
providers.value = response.items
.filter(p => p.is_active && p.active_endpoints > 0)
.map(p => ({ id: p.id, name: p.name }))
} catch (e) {