feat: configure key model access after creation

This commit is contained in:
wlx committed 2026-08-27 17:36:37 +08:00
1 parent 6de29ebd6d
commit 7f35960ba6
8 files changed
+175 -23

No files matched your search

+7
View File
@@ -155,6 +155,13 @@ class HttpCatalogClient {
return this.request<CreatedCatalogKey>('/api/keys', { method: 'POST', body: JSON.stringify(input) })
}
async updateKeyModels(id: string, modelIds: string[]) {
return this.request<{ apiKey: CatalogApiKey }>(`/api/keys/${encodeURIComponent(id)}/models`, {
method: 'POST',
body: JSON.stringify({ modelIds }),
})
}
async revokeKey(id: string) {
await this.request(`/api/keys/${encodeURIComponent(id)}/revoke`, { method: 'POST' })
}