Skip to content

Commit 3e24e83

Browse files
alari76claude
andcommitted
Add optional model field to workflow definitions
Allows specifying which Claude model to use per-workflow via the `model` frontmatter field (e.g. `model: claude-sonnet-4-6`), so cost-sensitive workflows like code reviews don't need to run on Opus. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 181e3ea commit 3e24e83

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

server/workflow-loader.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* outputDir: .codekin/reports/code-review
2121
* filenameSuffix: _code-review-daily.md
2222
* commitMessage: chore: code review
23+
* model: claude-sonnet-4-6 # optional — defaults to system default
2324
* ---
2425
* You are performing a daily automated code review...
2526
*
@@ -54,6 +55,7 @@ export interface WorkflowDef {
5455
outputDir: string
5556
filenameSuffix: string
5657
commitMessage: string
58+
model?: string
5759
prompt: string
5860
}
5961

@@ -88,6 +90,7 @@ function parseMdWorkflow(content: string, sourcePath: string): WorkflowDef {
8890
outputDir: meta.outputDir,
8991
filenameSuffix: meta.filenameSuffix,
9092
commitMessage: meta.commitMessage,
93+
model: meta.model,
9194
prompt,
9295
}
9396
}
@@ -236,6 +239,7 @@ function registerWorkflow(engine: WorkflowEngine, sessions: SessionManager, def:
236239
const session = sessions.create(`${def.sessionPrefix}:${repoName}`, repoPath, {
237240
source: 'workflow',
238241
groupDir: repoPath,
242+
model: def.model,
239243
})
240244

241245
console.log(`[workflow:${def.kind}] Created session ${session.id} for ${repoName} (run ${ctx.runId})`)

0 commit comments

Comments
 (0)