From 7f5908e77ae0e7fef4b7901341b8c2c4bbb74b28 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 15 Jan 2026 20:53:57 +0100 Subject: pkg/aflow: make LLM model per-agent rather than per-flow Having LLM model per-agent is even more flexible than per-flow. We can have some more complex tasks during patch generation with the most elaborate model, but also some simpler ones with less elaborate models. --- pkg/aflow/flow.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'pkg/aflow/flow.go') diff --git a/pkg/aflow/flow.go b/pkg/aflow/flow.go index b4cbe2201..6325b2fd2 100644 --- a/pkg/aflow/flow.go +++ b/pkg/aflow/flow.go @@ -22,9 +22,8 @@ import ( // Actions are nodes of the graph, and they consume/produce some named values // (input/output fields, and intermediate values consumed by other actions). type Flow struct { - Name string // Empty for the main workflow for the workflow type. - Model string // The default Gemini model name to execute this workflow. - Root Action + Name string // Empty for the main workflow for the workflow type. + Root Action *FlowType } @@ -36,12 +35,6 @@ type FlowType struct { extractOutputs func(map[string]any) map[string]any } -// See https://ai.google.dev/gemini-api/docs/models -const ( - BestExpensiveModel = "gemini-3-pro-preview" - GoodBalancedModel = "gemini-3-flash-preview" -) - var Flows = make(map[string]*Flow) // Register a workflow type (characterized by Inputs and Outputs), @@ -95,7 +88,6 @@ func registerOne[Inputs, Outputs any](all map[string]*Flow, flow *Flow) error { actions: make(map[string]bool), state: make(map[string]*varState), } - ctx.requireNotEmpty(flow.Name, "Model", flow.Model) provideOutputs[Inputs](ctx, "flow inputs") flow.Root.verify(ctx) requireInputs[Outputs](ctx, "flow outputs") -- cgit mrf-deployment