add crud for adding providers and models to resources

This commit is contained in:
miloschwartz
2026-08-04 15:54:24 -04:00
parent ed8545f8a2
commit e38359c74f
39 changed files with 2343 additions and 438 deletions
+4 -11
View File
@@ -120,15 +120,6 @@ const updateHttpResourceBodySchema = z
.optional()
.describe(
"ID of the resource policy to apply to this resource. Set to null to remove the resource policy and fall back to the inline policy settings."
),
aiProviderId: z
.number()
.int()
.positive()
.nullable()
.optional()
.describe(
"For inference-mode resources: the AI provider this resource proxies chat completions to. Set to null to unlink."
)
})
.refine((data) => Object.keys(data).length > 0, {
@@ -354,8 +345,10 @@ export async function updateResource(
);
}
if (["http", "ssh", "rdp", "vnc"].includes(resource.mode)) {
// HANDLE UPDATING HTTP RESOURCES
if (
["http", "ssh", "rdp", "vnc", "inference"].includes(resource.mode)
) {
// HANDLE UPDATING HTTP / BROWSER / INFERENCE RESOURCES
return await updateHttpResource(
{
req,