[PR #320] [MERGED] fix(providers): clarify misleading docker image LLM error (#312) #315

Closed
opened 2026-06-06 22:10:11 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vxcontrol/pentagi/pull/320
Author: @mrigankad
Created: 5/31/2026
Status: Merged
Merged: 5/31/2026
Merged by: @asdek

Base: mainHead: fix/issue-312-misleading-image-error


📝 Commits (1)

  • 94ec0a0 fix(providers): clarify misleading docker image LLM error (#312)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 backend/pkg/providers/providers.go (+1 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vxcontrol/pentagi/pull/320 **Author:** [@mrigankad](https://github.com/mrigankad) **Created:** 5/31/2026 **Status:** ✅ Merged **Merged:** 5/31/2026 **Merged by:** [@asdek](https://github.com/asdek) **Base:** `main` ← **Head:** `fix/issue-312-misleading-image-error` --- ### 📝 Commits (1) - [`94ec0a0`](https://github.com/vxcontrol/pentagi/commit/94ec0a06899fd626186b990c5391b1b755f07b16) fix(providers): clarify misleading docker image LLM error (#312) ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/pkg/providers/providers.go` (+1 -1) </details> ### 📄 Description ## 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: ```go 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-06 22:10:11 -04:00
yindo closed this issue 2026-06-06 22:10:11 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#315