Skip to content

Commit 1c9b438

Browse files
committed
syz-agent: make it possible to serve only specified workflows
May be useful for local experimentation with a single workflow.
1 parent 540489e commit 1c9b438

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

syz-agent/agent.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"maps"
1212
_ "net/http/pprof"
1313
"path/filepath"
14+
"slices"
1415
"sync"
1516
"time"
1617

@@ -51,6 +52,8 @@ type Config struct {
5152
FixedRepository string `json:"repo"`
5253
// Use this LLM model (for testing, if empty use workflow-default model).
5354
Model string `json:"model"`
55+
// Names of workflows to serve (all if not set, mainly for testing/local experimentation).
56+
Workflows []string `json:"workflows"`
5457
}
5558

5659
func main() {
@@ -175,7 +178,8 @@ func (s *Server) poll(ctx context.Context) (bool, error) {
175178
CodeRevision: prog.GitRevision,
176179
}
177180
for _, flow := range aflow.Flows {
178-
if s.modelOverQuota(flow) {
181+
if len(s.cfg.Workflows) != 0 && !slices.Contains(s.cfg.Workflows, flow.Name) ||
182+
s.modelOverQuota(flow) {
179183
continue
180184
}
181185
req.Workflows = append(req.Workflows, dashapi.AIWorkflow{

0 commit comments

Comments
 (0)