feat: add model list viewer for auth file cards

This commit is contained in:
Test
2025-12-14 15:17:00 +08:00
parent aea1ceb6be
commit abf9b5f8c9
4 changed files with 147 additions and 4 deletions

View File

@@ -29,5 +29,11 @@ export const authFilesApi = {
apiClient.patch('/oauth-excluded-models', { provider, models }),
deleteOauthExcludedEntry: (provider: string) =>
apiClient.delete(`/oauth-excluded-models?provider=${encodeURIComponent(provider)}`)
apiClient.delete(`/oauth-excluded-models?provider=${encodeURIComponent(provider)}`),
// 获取认证凭证支持的模型
async getModelsForAuthFile(name: string): Promise<{ id: string; display_name?: string; type?: string; owned_by?: string }[]> {
const data = await apiClient.get(`/auth-files/models?name=${encodeURIComponent(name)}`);
return (data && Array.isArray(data['models'])) ? data['models'] : [];
}
};