Skip to content

Commit 57236a0

Browse files
committed
fix(controller): prioritize engine selection from workflow template
Use workflow template engine if available, fallback to controller engine otherwise
1 parent 946f6e0 commit 57236a0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/workflows/controller/view.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,9 @@ export async function runControllerView(
249249
const { registry } = await import('../../infra/engines/index.js');
250250

251251
// Create a step-like object for selectEngine
252+
// Priority: workflow template options > agent config > first authenticated engine
252253
const stepLike = {
253-
engine: definition.options?.engine,
254+
engine: definition.options?.engine ?? controller.engine,
254255
agentId: controller.id,
255256
agentName: (controller.name as string | undefined) ?? controller.id,
256257
};

0 commit comments

Comments
 (0)