From 1db013147bd0f420b5c90260801f39dfd45a93a3 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 19 Dec 2024 11:44:33 +1030 Subject: [PATCH] chore: Remove `run.template` and `run.config` fields --- control-plane/src/modules/contract.ts | 14 -------------- control-plane/src/modules/workflows/router.ts | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/control-plane/src/modules/contract.ts b/control-plane/src/modules/contract.ts index e7023d1..4ef2e8b 100644 --- a/control-plane/src/modules/contract.ts +++ b/control-plane/src/modules/contract.ts @@ -543,23 +543,9 @@ export const definition = { "Structured input arguments to merge with the initial prompt. The schema must match the run configuration input schema if defined", ) .optional(), - config: z - .object({ - id: z.string().describe("DEPRECATED"), - input: z.object({}).passthrough().describe("DEPRECATED").optional(), - }) - .describe("DEPRECATED") - .optional(), context: anyObject .optional() .describe("Additional context to propogate to all calls in the run"), - template: z - .object({ - id: z.string().describe("DEPRECATED"), - input: z.object({}).passthrough().optional().describe("DEPRECATED"), - }) - .optional() - .describe("DEPRECATED"), reasoningTraces: z .boolean() .default(true) diff --git a/control-plane/src/modules/workflows/router.ts b/control-plane/src/modules/workflows/router.ts index b1c9897..b4ed032 100644 --- a/control-plane/src/modules/workflows/router.ts +++ b/control-plane/src/modules/workflows/router.ts @@ -70,20 +70,6 @@ export const runsRouter = initServer().router( await auth.canAccess({ cluster: { clusterId } }); auth.canCreate({ run: true }); - // TODO: Remove once use of deprecated fields is removed - if (body.config) { - logger.info("Depreacted `run.config` provided in call to createRun"); - body.configId = body.configId ?? body.config.id; - body.input = body.input ?? body.config.input; - } - - // TODO: Remove once use of deprecated fields is removed - if (body.template) { - logger.info("Depreacted `run.template` provided in call to createRun"); - body.configId = body.configId ?? body.template.id; - body.input = body.input ?? body.template.input; - } - if (!body.initialPrompt && !body.configId) { return { status: 400,