diff options
Diffstat (limited to 'internal/cli/run.go')
| -rw-r--r-- | internal/cli/run.go | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/internal/cli/run.go b/internal/cli/run.go index 34c3d42..08bfb68 100644 --- a/internal/cli/run.go +++ b/internal/cli/run.go @@ -6,12 +6,9 @@ import ( "os" "os/signal" "syscall" - "time" "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" @@ -119,39 +116,10 @@ func runTasks(file string, parallel int, dryRun bool) error { } } - if pc, ok := cfg.Providers["anthropic"]; ok && pc.APIKey != "" && cfg.Runners.AnthropicEnabled() { - timeout := time.Duration(0) - if pc.TimeoutSeconds > 0 { - timeout = time.Duration(pc.TimeoutSeconds) * time.Second - } - runners["anthropic"] = &executor.NativeRunner{ - Provider: anthropic.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, - } - } - - 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, - } - } + // Native cloud providers (anthropic/google's own wire formats, plus + // groq/openrouter/openai via the OpenAI-compatible adapter) — see + // internal/cli/cloudrunners.go. + registerCloudRunners(runners, cfg, logger, cfg.LogDir) pool := executor.NewPool(parallel, runners, store, logger) pool.Classifier = &executor.Classifier{ |
