From 8a77c324eab1cf164f37008d95ad35921c9baf34 Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Mon, 6 Apr 2026 12:29:33 +0100 Subject: [PATCH] skip standalone runner init when --openaiurl is provided Commands wrapped with withStandaloneRunner were unconditionally calling ensureStandaloneRunnerAvailable before RunE executed, causing a Docker socket connection attempt even when --openaiurl was supplied and no local daemon is needed. Check for the openaiurl flag in the wrapper and bypass runner initialization when it is set. Signed-off-by: Eric Curtin --- cmd/cli/commands/install-runner.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/cli/commands/install-runner.go b/cmd/cli/commands/install-runner.go index 0e5eee45f..493f3f750 100644 --- a/cmd/cli/commands/install-runner.go +++ b/cmd/cli/commands/install-runner.go @@ -186,8 +186,13 @@ func withStandaloneRunner(cmd *cobra.Command) *cobra.Command { } originalRunE := cmd.RunE cmd.RunE = func(cmd *cobra.Command, args []string) error { - if _, err := ensureStandaloneRunnerAvailable(cmd.Context(), asPrinter(cmd), false); err != nil { - return fmt.Errorf("unable to initialize standalone model runner: %w", err) + // Skip standalone runner initialization when --openaiurl is provided, + // since those commands talk directly to an external endpoint and don't + // need (or have) a local Docker daemon. + if f := cmd.Flag("openaiurl"); f == nil || f.Value.String() == "" { + if _, err := ensureStandaloneRunnerAvailable(cmd.Context(), asPrinter(cmd), false); err != nil { + return fmt.Errorf("unable to initialize standalone model runner: %w", err) + } } return originalRunE(cmd, args) }