diff options
Diffstat (limited to 'internal/cli/run.go')
| -rw-r--r-- | internal/cli/run.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/cli/run.go b/internal/cli/run.go index 497ba6b..34c3d42 100644 --- a/internal/cli/run.go +++ b/internal/cli/run.go @@ -11,6 +11,7 @@ import ( "github.com/spf13/cobra" "github.com/thepeterstone/claudomator/internal/executor" "github.com/thepeterstone/claudomator/internal/provider/anthropic" + "github.com/thepeterstone/claudomator/internal/provider/google" "github.com/thepeterstone/claudomator/internal/provider/openaicompat" "github.com/thepeterstone/claudomator/internal/storage" "github.com/thepeterstone/claudomator/internal/task" @@ -135,6 +136,23 @@ func runTasks(file string, parallel int, dryRun bool) error { } } + if pc, ok := cfg.Providers["google"]; ok && pc.APIKey != "" && cfg.Runners.GoogleEnabled() { + timeout := time.Duration(0) + if pc.TimeoutSeconds > 0 { + timeout = time.Duration(pc.TimeoutSeconds) * time.Second + } + runners["google"] = &executor.NativeRunner{ + Provider: google.New(pc.APIKey, pc.Endpoint, timeout), + Logger: logger, + LogDir: cfg.LogDir, + DefaultModel: pc.DefaultModel, + // See internal/cli/serve.go: native cloud providers get + // sandbox.DockerSandbox rather than the weaker HostSandbox. + SandboxKind: "docker", + SandboxImage: cfg.SandboxImage, + } + } + pool := executor.NewPool(parallel, runners, store, logger) pool.Classifier = &executor.Classifier{ LLM: localClient, |
