aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/flow
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2026-01-15 20:53:57 +0100
committerDmitry Vyukov <dvyukov@google.com>2026-01-20 21:12:57 +0000
commit7f5908e77ae0e7fef4b7901341b8c2c4bbb74b28 (patch)
tree2ccbc85132a170d046837de6bdd8be3317f94060 /pkg/aflow/flow
parent2494e18d5ced59fc7f0522749041e499d3082a9e (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')
-rw-r--r--pkg/aflow/flow/assessment/kcsan.go2
-rw-r--r--pkg/aflow/flow/assessment/moderation.go2
-rw-r--r--pkg/aflow/flow/patching/patching.go4
3 files changed, 5 insertions, 3 deletions
diff --git a/pkg/aflow/flow/assessment/kcsan.go b/pkg/aflow/flow/assessment/kcsan.go
index 67d695eb9..6bfc7bb12 100644
--- a/pkg/aflow/flow/assessment/kcsan.go
+++ b/pkg/aflow/flow/assessment/kcsan.go
@@ -23,7 +23,6 @@ func init() {
ai.WorkflowAssessmentKCSAN,
"assess if a KCSAN report is about a benign race that only needs annotations or not",
&aflow.Flow{
- Model: aflow.GoodBalancedModel,
Root: &aflow.Pipeline{
Actions: []aflow.Action{
kernel.Checkout,
@@ -31,6 +30,7 @@ func init() {
codesearcher.PrepareIndex,
&aflow.LLMAgent{
Name: "expert",
+ Model: aflow.GoodBalancedModel,
Reply: "Explanation",
Outputs: aflow.LLMOutputs[struct {
Confident bool `jsonschema:"If you are confident in the verdict of the analysis or not."`
diff --git a/pkg/aflow/flow/assessment/moderation.go b/pkg/aflow/flow/assessment/moderation.go
index 8d9ac4a0b..b13ee1e7d 100644
--- a/pkg/aflow/flow/assessment/moderation.go
+++ b/pkg/aflow/flow/assessment/moderation.go
@@ -33,7 +33,6 @@ func init() {
ai.WorkflowModeration,
"assess if a bug report is consistent and actionable or not",
&aflow.Flow{
- Model: aflow.GoodBalancedModel,
Root: &aflow.Pipeline{
Actions: []aflow.Action{
aflow.NewFuncAction("extract-crash-type", extractCrashType),
@@ -42,6 +41,7 @@ func init() {
codesearcher.PrepareIndex,
&aflow.LLMAgent{
Name: "expert",
+ Model: aflow.GoodBalancedModel,
Reply: "Explanation",
Outputs: aflow.LLMOutputs[struct {
Confident bool `jsonschema:"If you are confident in the verdict of the analysis or not."`
diff --git a/pkg/aflow/flow/patching/patching.go b/pkg/aflow/flow/patching/patching.go
index 766cf089f..856962e6c 100644
--- a/pkg/aflow/flow/patching/patching.go
+++ b/pkg/aflow/flow/patching/patching.go
@@ -43,7 +43,6 @@ func init() {
ai.WorkflowPatching,
"generate a kernel patch fixing a provided bug reproducer",
&aflow.Flow{
- Model: aflow.BestExpensiveModel,
Root: &aflow.Pipeline{
Actions: []aflow.Action{
baseCommitPicker,
@@ -54,6 +53,7 @@ func init() {
codesearcher.PrepareIndex,
&aflow.LLMAgent{
Name: "debugger",
+ Model: aflow.BestExpensiveModel,
Reply: "BugExplanation",
Temperature: 1,
Instruction: debuggingInstruction,
@@ -62,6 +62,7 @@ func init() {
},
&aflow.LLMAgent{
Name: "diff-generator",
+ Model: aflow.BestExpensiveModel,
Reply: "PatchDiff",
Temperature: 1,
Instruction: diffInstruction,
@@ -70,6 +71,7 @@ func init() {
},
&aflow.LLMAgent{
Name: "description-generator",
+ Model: aflow.BestExpensiveModel,
Reply: "PatchDescription",
Temperature: 1,
Instruction: descriptionInstruction,