Skip to content

fix(providers): clarify misleading docker image LLM error (#312)#320

Merged
asdek merged 1 commit into
vxcontrol:mainfrom
mrigankad:fix/issue-312-misleading-image-error
May 31, 2026
Merged

fix(providers): clarify misleading docker image LLM error (#312)#320
asdek merged 1 commit into
vxcontrol:mainfrom
mrigankad:fix/issue-312-misleading-image-error

Conversation

@mrigankad
Copy link
Copy Markdown
Contributor

Fixes

Fixes #312

Problem

On a fresh setup, creating any flow fails with:

failed to get flow provider: failed to get primary docker image: API returned unexpected status code: 404

Because the message says "primary docker image", users (and several issues — #312, #309, and #203) spend time debugging Docker, image pulls, and the registry. The actual failure is unrelated to Docker.

Root Cause

In NewFlowProvider (backend/pkg/providers/providers.go), the first LLM call during flow creation asks the configured provider to select a primary Docker image:

image, err := prv.Call(ctx, pconfig.OptionsTypeSimple, imageTmpl)
if err != nil {
    return nil, fmt.Errorf("failed to get primary docker image: %w", err)
}

When the configured LLM backend is unsupported or misconfigured, prv.Call returns the provider's HTTP 404. The error is wrapped with wording that points at Docker rather than the LLM provider, so the underlying 404 looks like a Docker registry error. As maintainers have noted on #312/#309, the 404 originates from the LLM backend.

Solution

Reword the wrapped error so the failing component (the LLM call) is identified, while still naming the image-selection step:

failed to select primary docker image via llm call: API returned unexpected status code: 404

One-line message change; no behavioral change.

Testing

cd backend && go build ./pkg/providers/
# -> builds OK

Risk Assessment

Minimal. Only the text of a wrapped error string changes; no control flow, signatures, or behavior are affected. The substring primary docker image is retained, so any log scraping keyed on that phrase keeps matching.

)

Fixes vxcontrol#312

Root cause:
During flow creation the first LLM call selects the primary Docker
image. When the configured LLM backend is unsupported or returns 404,
prv.Call fails, but the wrapped error read "failed to get primary
docker image". Users repeatedly interpreted this as a Docker problem
(see vxcontrol#312, vxcontrol#309, vxcontrol#203) and debugged Docker instead of their LLM
provider configuration.

Solution:
Reword the wrapped error to "failed to select primary docker image
via llm call" so the LLM provider is identified as the failing
component while still mentioning the image selection step.

Testing:
go build ./pkg/providers/ -> OK
@mrigankad mrigankad force-pushed the fix/issue-312-misleading-image-error branch from 1f7b5e0 to 94ec0a0 Compare May 31, 2026 04:40
@asdek asdek merged commit 4a9d706 into vxcontrol:main May 31, 2026
@asdek
Copy link
Copy Markdown
Contributor

asdek commented May 31, 2026

hey @mrigankad

thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: failed to get primary docker image: API returned unexpected status code: 404

2 participants