feat: 引入统一的端点检查器以重构适配器并改进错误处理和用量统计。

This commit is contained in:
hoping
2025-12-25 00:02:56 +08:00
parent 9dad194130
commit 26b4a37323
23 changed files with 2282 additions and 119 deletions

View File

@@ -58,3 +58,16 @@ export async function deleteProvider(providerId: string): Promise<{ message: str
return response.data
}
/**
* 测试模型连接性
*/
export async function testModel(data: {
provider_id: string
model_name: string
api_key_id?: string
message?: string
}): Promise<any> {
const response = await client.post('/api/admin/provider-query/test-model', data)
return response.data
}