[GH-ISSUE #5344] [Issue]: NovelAI image connection model dropdown shows too many models and fetch is broken #2952

Closed
opened 2026-10-21 05:58:18 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @ylli-selmani on GitHub (Aug 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5344

Originally assigned to: @SpicyMarinara on GitHub.

Summary

For a NovelAI image connection, the model dropdown shows the entire app-wide image model catalog (every provider, not just NovelAI), and the "Fetch from API" button returns "Failed to fetch models: OK" instead of retrieving NovelAI's available models.

Expected behavior

The model dropdown should show only NovelAI-relevant models (nai-diffusion series). The "Fetch from API" button should either retrieve models from NovelAI's API or, if the API endpoint is not suitable for image model listing, not be shown for NovelAI connections at all.

Actual behavior

The dropdown populates with every model in IMAGE_GEN_MODELS from model-lists.ts, including models from unrelated providers (stability, grok, atlassc, etc.). Pressing "Fetch from API" hits the connection base URL with no path appended (because image_generation provider has an empty modelsEndpoint), which returns HTTP 200 with a plain text body of OK. JSON parse fails on that body, producing the error message "Failed to fetch models: OK".

Steps to reproduce

  1. Create or open an image generation connection with source set to NovelAI.
  2. Observe the model dropdown: it shows the full catalog of all image providers, not just NovelAI models.
  3. Click "Fetch from API".
  4. Observe the error: "Failed to fetch models: OK".

Environment

Marinara Engine diagnostics
Version: 2.4.4
Build: 2.4.4+6e7e85a7ba4a
Commit: 6e7e85a7ba
Server OS: Windows 10.0.26200 (x64)
Client OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0
GPU: ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0), or similar
Active connection: NovelAI Image
Connection provider: image_generation
LLM model: nai-diffusion-5-full

Logs, screenshots, or video

Image

Additional context

Root cause is two-fold:

  1. The image_generation provider's modelsEndpoint is an empty string, so the generic fetch fallback builds the URL as just the base URL with nothing appended. The NovelAI image base URL (https://image.novelai.net) returns a plain OK body, which fails JSON parsing.

  2. IMAGE_GEN_MODELS in model-lists.ts is a single flat array covering all image sources. The connection editor maps image_generation to this entire array via MODEL_LISTS[localProvider], with no filtering by the selected image source (unlike video generation, which filters by provider). So every image model from every source appears in the dropdown regardless of which image service is selected.

Note: NovelAI's OpenAI-compatible endpoint at /oa/v1/models exists but returns text models (xialong-v1, glm-4-6), not image models, so it cannot be used to populate the image model list. The fix is to filter the known-models catalog for NovelAI connections to nai- prefixed models and hide the fetch button for NovelAI, since there is no reliable API to fetch image model names from.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • [] I DID NOT read this template and provide the requested details.
Originally created by @ylli-selmani on GitHub (Aug 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5344 Originally assigned to: @SpicyMarinara on GitHub. ## Summary For a NovelAI image connection, the model dropdown shows the entire app-wide image model catalog (every provider, not just NovelAI), and the "Fetch from API" button returns "Failed to fetch models: OK" instead of retrieving NovelAI's available models. ## Expected behavior The model dropdown should show only NovelAI-relevant models (nai-diffusion series). The "Fetch from API" button should either retrieve models from NovelAI's API or, if the API endpoint is not suitable for image model listing, not be shown for NovelAI connections at all. ## Actual behavior The dropdown populates with every model in IMAGE_GEN_MODELS from model-lists.ts, including models from unrelated providers (stability, grok, atlassc, etc.). Pressing "Fetch from API" hits the connection base URL with no path appended (because image_generation provider has an empty modelsEndpoint), which returns HTTP 200 with a plain text body of OK. JSON parse fails on that body, producing the error message "Failed to fetch models: OK". ## Steps to reproduce 1. Create or open an image generation connection with source set to NovelAI. 2. Observe the model dropdown: it shows the full catalog of all image providers, not just NovelAI models. 3. Click "Fetch from API". 4. Observe the error: "Failed to fetch models: OK". ## Environment Marinara Engine diagnostics Version: 2.4.4 Build: 2.4.4+6e7e85a7ba4a Commit: 6e7e85a7ba4a Server OS: Windows 10.0.26200 (x64) Client OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:154.0) Gecko/20100101 Firefox/154.0 GPU: ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0), or similar Active connection: NovelAI Image Connection provider: image_generation LLM model: nai-diffusion-5-full ## Logs, screenshots, or video <img width="871" height="527" alt="Image" src="https://github.com/user-attachments/assets/a680cb8e-6090-4deb-a6bb-e749b6942bf3" /> ## Additional context Root cause is two-fold: 1. The image_generation provider's modelsEndpoint is an empty string, so the generic fetch fallback builds the URL as just the base URL with nothing appended. The NovelAI image base URL (https://image.novelai.net) returns a plain OK body, which fails JSON parsing. 2. IMAGE_GEN_MODELS in model-lists.ts is a single flat array covering all image sources. The connection editor maps image_generation to this entire array via MODEL_LISTS[localProvider], with no filtering by the selected image source (unlike video generation, which filters by provider). So every image model from every source appears in the dropdown regardless of which image service is selected. Note: NovelAI's OpenAI-compatible endpoint at /oa/v1/models exists but returns text models (xialong-v1, glm-4-6), not image models, so it cannot be used to populate the image model list. The fix is to filter the known-models catalog for NovelAI connections to nai- prefixed models and hide the fetch button for NovelAI, since there is no reliable API to fetch image model names from. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:58:18 +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#2952
No description provided.