mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-03 03:00:58 +02:00
first pass of traefik -> basic gateway
This commit is contained in:
@@ -90,11 +90,22 @@ const createHttpResourceSchema = z
|
||||
domainId: z.string(),
|
||||
stickySession: z.boolean().optional(),
|
||||
postAuthPath: z.string().nullable().optional(),
|
||||
mode: z.enum(["http", "ssh", "rdp", "vnc", "tcp", "udp"]).optional(),
|
||||
mode: z
|
||||
.enum(["http", "ssh", "rdp", "vnc", "tcp", "udp", "inference"])
|
||||
.optional(),
|
||||
// SSH Settings
|
||||
pamMode: z.enum(["passthrough", "push"]).optional(),
|
||||
authDaemonPort: z.int().positive().optional(),
|
||||
authDaemonMode: z.enum(["site", "remote", "native"]).optional()
|
||||
authDaemonMode: z.enum(["site", "remote", "native"]).optional(),
|
||||
// Inference settings
|
||||
aiProviderId: z
|
||||
.number()
|
||||
.int()
|
||||
.positive()
|
||||
.optional()
|
||||
.describe(
|
||||
"For inference-mode resources: the AI provider this resource proxies chat completions to."
|
||||
)
|
||||
})
|
||||
.refine(
|
||||
(data) => {
|
||||
@@ -365,7 +376,8 @@ async function createHttpResource(
|
||||
mode,
|
||||
authDaemonPort,
|
||||
authDaemonMode,
|
||||
pamMode
|
||||
pamMode,
|
||||
aiProviderId
|
||||
} = parsedBody.data;
|
||||
const subdomain = parsedBody.data.subdomain;
|
||||
const stickySession = parsedBody.data.stickySession;
|
||||
@@ -552,7 +564,8 @@ async function createHttpResource(
|
||||
postAuthPath: postAuthPath,
|
||||
wildcard,
|
||||
health: "unknown",
|
||||
defaultResourcePolicyId: defaultPolicy.resourcePolicyId
|
||||
defaultResourcePolicyId: defaultPolicy.resourcePolicyId,
|
||||
aiProviderId: aiProviderId ?? null
|
||||
})
|
||||
.returning();
|
||||
|
||||
|
||||
@@ -120,6 +120,15 @@ 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, {
|
||||
|
||||
Reference in New Issue
Block a user