allow no provider on a resource

This commit is contained in:
miloschwartz
2026-08-05 15:43:42 -04:00
parent bcf6b86b84
commit 790daba796
11 changed files with 25 additions and 86 deletions
@@ -27,7 +27,7 @@ registry.registerPath({
method: "post",
path: "/resource/{resourceId}/ai-providers",
description:
"Replace the AI providers attached to an inference resource. At least one provider is required. Model keys must be unique across attached catalog providers.",
"Replace the AI providers attached to an inference resource. An empty list clears all providers. Model keys must be unique across attached catalog providers.",
tags: [OpenAPITags.PublicResource],
request: {
params: setResourceAiProvidersParamsSchema,
@@ -113,7 +113,7 @@ export async function setResourceAiProviders(
const attachments = await resolveProviderAttachments({
orgId: resource.orgId,
attachments: providers,
requireAtLeastOne: true
requireAtLeastOne: false
});
if (isInferenceFieldsError(attachments)) {
return next(