[PR #719] [MERGED] Fix Horde image generation endpoints #4744

Closed
opened 2026-10-22 04:10:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/719
Author: @cha1latte
Created: 5/11/2026
Status: ✅ Merged
Merged: 5/11/2026
Merged by: @cha1latte

Base: main ← Head: fix/issue-711-horde-image-api


📝 Commits (1)

  • 4184704 Fix Horde image generation endpoints

📊 Changes

4 files changed (+398 additions, -1 deletions)

View changed files

📝 packages/server/src/routes/connections.routes.ts (+62 -1)
📝 packages/server/src/services/image/image-generation.ts (+143 -0)
➕ packages/server/test/connections-horde-routes.test.ts (+119 -0)
📝 packages/server/test/image-generation-local.test.ts (+74 -0)

📄 Description

Linked issue

Closes #711

Why this change

  • Stable Horde image-generation connections were being treated like OpenAI-compatible image APIs, so the default Horde base URL hit /models and /images/generations paths that Horde does not serve and returned HTML 404 responses.

What changed

  • Added native Horde image generation through /api/v2/generate/async, /api/v2/generate/check/{id}, and /api/v2/generate/status/{id}.
  • Routed Horde connection tests through /api/v2/status/heartbeat.
  • Routed Horde model fetching through /api/v2/status/models?type=image.
  • Added focused server tests for Horde test-image generation, model fetching, and connection testing.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Machine proof: scratch/issue-711-horde-repro.mjs reproduced the old failure against a Horde-shaped local API: before the fix, generation posted to /api/v2/images/generations and failed with OpenAI image generation failed (404): 404 Not Found Not Found.
  • Machine proof: the same repro now passes and records requests to /api/v2/generate/async, /api/v2/generate/check/job-711, and /api/v2/generate/status/job-711.
  • Machine proof: pnpm --dir packages/server exec tsx --import ./test/setup-env.ts --test test/image-generation-local.test.ts test/connections-horde-routes.test.ts passed 7 tests.
  • Machine proof: pnpm check passed.
  • Evidence ledger: scratch/bugfix-verification.json records the repro, verification, baseline, and final done gate locally.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No docs or release metadata changes were needed; this changes provider routing behavior only.

UI evidence (if applicable)

N/A — backend/provider-routing fix with command-level proof; no UI layout changed.


🔄 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/Pasta-Devs/Marinara-Engine/pull/719 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/11/2026 **Status:** ✅ Merged **Merged:** 5/11/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `fix/issue-711-horde-image-api` --- ### 📝 Commits (1) - [`4184704`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4184704512d15b00057acef5867caf5dbe435f94) Fix Horde image generation endpoints ### 📊 Changes **4 files changed** (+398 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/connections.routes.ts` (+62 -1) 📝 `packages/server/src/services/image/image-generation.ts` (+143 -0) ➕ `packages/server/test/connections-horde-routes.test.ts` (+119 -0) 📝 `packages/server/test/image-generation-local.test.ts` (+74 -0) </details> ### 📄 Description ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #711 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Stable Horde image-generation connections were being treated like OpenAI-compatible image APIs, so the default Horde base URL hit `/models` and `/images/generations` paths that Horde does not serve and returned HTML 404 responses. ## What changed <!-- List the key changes in this PR --> - Added native Horde image generation through `/api/v2/generate/async`, `/api/v2/generate/check/{id}`, and `/api/v2/generate/status/{id}`. - Routed Horde connection tests through `/api/v2/status/heartbeat`. - Routed Horde model fetching through `/api/v2/status/models?type=image`. - Added focused server tests for Horde test-image generation, model fetching, and connection testing. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Machine proof: `scratch/issue-711-horde-repro.mjs` reproduced the old failure against a Horde-shaped local API: before the fix, generation posted to `/api/v2/images/generations` and failed with `OpenAI image generation failed (404): 404 Not Found Not Found`. - Machine proof: the same repro now passes and records requests to `/api/v2/generate/async`, `/api/v2/generate/check/job-711`, and `/api/v2/generate/status/job-711`. - Machine proof: `pnpm --dir packages/server exec tsx --import ./test/setup-env.ts --test test/image-generation-local.test.ts test/connections-horde-routes.test.ts` passed 7 tests. - Machine proof: `pnpm check` passed. - Evidence ledger: `scratch/bugfix-verification.json` records the repro, verification, baseline, and final done gate locally. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No docs or release metadata changes were needed; this changes provider routing behavior only. ## UI evidence (if applicable) N/A — backend/provider-routing fix with command-level proof; no UI layout changed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10:17 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4744
No description provided.