feat(groups)!: enforce model allowlists across gateway endpoints

This commit is contained in:
Zero Clover committed 2026-09-05 16:05:17 +08:00
1 parent 07bf8b92fd
commit cff3f89850
73 files changed
+3691 -778

No files matched your search

+4 -4
View File
@@ -103,15 +103,15 @@ export async function getById(id: number): Promise<AdminGroup> {
}
/**
* Get candidate models for custom /v1/models list.
* Get candidate models for the group model allowlist.
* id=0 returns platform default models for create flow.
*/
export async function getModelsListCandidates(
export async function getModelAllowlistCandidates(
id: number,
platform?: GroupPlatform
): Promise<string[]> {
const { data } = await apiClient.get<{ models: string[] }>(
`/admin/groups/${id}/models-list-candidates`,
`/admin/groups/${id}/model-allowlist-candidates`,
{
params: platform ? { platform } : undefined
}
@@ -477,7 +477,7 @@ export const groupsAPI = {
getAllIncludingInactive,
getLiveCapability,
getById,
getModelsListCandidates,
getModelAllowlistCandidates,
create,
duplicate,
update,