diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2026-01-15 20:53:57 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2026-01-20 21:12:57 +0000 |
| commit | 7f5908e77ae0e7fef4b7901341b8c2c4bbb74b28 (patch) | |
| tree | 2ccbc85132a170d046837de6bdd8be3317f94060 /pkg/aflow/flow.go | |
| parent | 2494e18d5ced59fc7f0522749041e499d3082a9e (diff) | |
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.
Diffstat (limited to 'pkg/aflow/flow.go')
| -rw-r--r-- | pkg/aflow/flow.go | 12 |
1 files changed, 2 insertions, 10 deletions
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") |
