[GH-ISSUE #4224] [Issue]: KoboldCPP Router Mode causes instant fetch failures #2286

Closed
opened 2026-10-21 05:47:01 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Jul 28, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4224

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Requests to KoboldCPP fail immediately when Router Mode is enabled for automatic model unloading and reloading. The same KoboldCPP setup reportedly works with SillyTavern and SillyBunny.

Expected behavior

Marinara Engine should send requests through KoboldCPP Router Mode and allow an unloaded model to wake and reload automatically.

Actual behavior

Marinara Engine immediately reports "fetch failed." KoboldCPP shows no terminal activity, including when the model is already loaded.

Steps to reproduce

  1. Run KoboldCPP with admin mode enabled.
  2. Configure an automatic unload timeout, such as 180 seconds.
  3. Enable KoboldCPP Router Mode.
  4. Connect Marinara Engine to the KoboldCPP endpoint.
  5. Send a request while the model is loaded or after it has been automatically unloaded.
  6. Observe the immediate "fetch failed" error and lack of activity in the KoboldCPP terminal.

Environment

  • Marinara Engine version: v2.3.5, build e938ee4, staging branch
  • Install type: Not provided
  • OS + version: Windows; version not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

No logs, screenshots, or video provided. The user reports that nothing appears in the KoboldCPP terminal when the failure occurs.

Additional context

KoboldCPP Router Mode uses a reverse proxy router and requires admin mode. The feature is intended to hotswap models and configurations within a request, allowing automatically unloaded models to wake again. The reporter notes that the setup works in SillyTavern and SillyBunny, and another user reportedly has similar automatic sleep behavior working with llama-server.

Discord thread: FR/BUG - KoboldCPP's Router Mode causes instant 'fetch failed' errors (works in ST)
Discord thread link: https://discord.com/channels/1417099416812392641/1531703603562151977
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (1 message)
[2026-07-28T16:43:16.766Z] ylliselmanii: - Release: v2.3.5
- Build: e938ee4
- Branch: staging
- Install: Windows

So, I wanted to mimic the Ollama autounloading models after inactivity stuff in KoboldCPP, but I sadly found out, that this doesn't work at all in Marinara Engine, while it does work without problem in both Sillytavern and Sillybunny. It results in an instant fetch failed, with nothing at all appearing in Kobold Cpp's terminal, even if the model is loaded and all. 

If anyone doesn't know the specific functionality in kobold cpp, you have to enable admin mode, then set the autounload time (e.g 180s) but also enable Router Mode /---routermoude to actually wake the model up again after it unloads. Now, I know nothing about routermode and stuff, but it does say that it makes use of an reverse proxy router... and I'm pretty sure that the ME faq says that it doesn't support reverse proxies, but this would still be useful. (to save energy)

> Router mode uses a reverse proxy router, allowing you to easily hotswap models and configs within a single request. Requires admin mode.

Not sure if this is feasible, but i'd be glad if it could be added/'fixed'. Another user said that it works for them on llama server, and i know that the sidecar also autosleeps, so.. maybe? And I don't wanna use Ollama, cause it's much more locked down and stuff.
[Discord message: https://discord.com/channels/1417099416812392641/1531703603562151977/1531703603562151977]

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 @SpicyMarinara on GitHub (Jul 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4224 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Requests to KoboldCPP fail immediately when Router Mode is enabled for automatic model unloading and reloading. The same KoboldCPP setup reportedly works with SillyTavern and SillyBunny. ## Expected behavior Marinara Engine should send requests through KoboldCPP Router Mode and allow an unloaded model to wake and reload automatically. ## Actual behavior Marinara Engine immediately reports "fetch failed." KoboldCPP shows no terminal activity, including when the model is already loaded. ## Steps to reproduce 1. Run KoboldCPP with admin mode enabled. 2. Configure an automatic unload timeout, such as 180 seconds. 3. Enable KoboldCPP Router Mode. 4. Connect Marinara Engine to the KoboldCPP endpoint. 5. Send a request while the model is loaded or after it has been automatically unloaded. 6. Observe the immediate "fetch failed" error and lack of activity in the KoboldCPP terminal. ## Environment - Marinara Engine version: v2.3.5, build e938ee4, staging branch - Install type: Not provided - OS + version: Windows; version not provided - Browser or app shell: Not provided ## Logs, screenshots, or video No logs, screenshots, or video provided. The user reports that nothing appears in the KoboldCPP terminal when the failure occurs. ## Additional context KoboldCPP Router Mode uses a reverse proxy router and requires admin mode. The feature is intended to hotswap models and configurations within a request, allowing automatically unloaded models to wake again. The reporter notes that the setup works in SillyTavern and SillyBunny, and another user reportedly has similar automatic sleep behavior working with llama-server. Discord thread: FR/BUG - KoboldCPP's Router Mode causes instant 'fetch failed' errors (works in ST) Discord thread link: https://discord.com/channels/1417099416812392641/1531703603562151977 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (1 message)</summary> ```text [2026-07-28T16:43:16.766Z] ylliselmanii: - Release: v2.3.5 - Build: e938ee4 - Branch: staging - Install: Windows So, I wanted to mimic the Ollama autounloading models after inactivity stuff in KoboldCPP, but I sadly found out, that this doesn't work at all in Marinara Engine, while it does work without problem in both Sillytavern and Sillybunny. It results in an instant fetch failed, with nothing at all appearing in Kobold Cpp's terminal, even if the model is loaded and all. If anyone doesn't know the specific functionality in kobold cpp, you have to enable admin mode, then set the autounload time (e.g 180s) but also enable Router Mode /---routermoude to actually wake the model up again after it unloads. Now, I know nothing about routermode and stuff, but it does say that it makes use of an reverse proxy router... and I'm pretty sure that the ME faq says that it doesn't support reverse proxies, but this would still be useful. (to save energy) > Router mode uses a reverse proxy router, allowing you to easily hotswap models and configs within a single request. Requires admin mode. Not sure if this is feasible, but i'd be glad if it could be added/'fixed'. Another user said that it works for them on llama server, and i know that the sidecar also autosleeps, so.. maybe? And I don't wanna use Ollama, cause it's much more locked down and stuff. [Discord message: https://discord.com/channels/1417099416812392641/1531703603562151977/1531703603562151977] ``` </details> ## 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:47:01 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 28, 2026):

Claimed by @SpicyMarinara and added to existing draft PR #4223 at the maintainer’s request. Root cause: KoboldCPP Router Mode exposes its public proxy on IPv4, while Marinara’s rebinding-safe outbound resolver can pin localhost to the first DNS result (::1 on affected systems), so the connection fails before KoboldCPP receives or logs the request. The planned compatibility fix will prefer IPv4 for ambiguous loopback hostnames while preserving explicit IPv6 loopback URLs.

<!-- gh-comment-id:5107431934 --> @SpicyMarinara commented on GitHub (Jul 28, 2026): Claimed by @SpicyMarinara and added to existing draft PR #4223 at the maintainer’s request. Root cause: KoboldCPP Router Mode exposes its public proxy on IPv4, while Marinara’s rebinding-safe outbound resolver can pin `localhost` to the first DNS result (`::1` on affected systems), so the connection fails before KoboldCPP receives or logs the request. The planned compatibility fix will prefer IPv4 for ambiguous loopback hostnames while preserving explicit IPv6 loopback URLs.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 28, 2026):

The compatibility fix is now pushed as separate commit ba3b28662 in draft PR #4223: https://github.com/Pasta-Devs/Marinara-Engine/pull/4223. The new IPv4-only localhost regression reproduced fetch failed / ECONNREFUSED ::1 before the fix and passes afterward for both streaming and non-streaming requests. Full pnpm check and the request-security regression also pass.

<!-- gh-comment-id:5107468189 --> @SpicyMarinara commented on GitHub (Jul 28, 2026): The compatibility fix is now pushed as separate commit `ba3b28662` in draft PR #4223: https://github.com/Pasta-Devs/Marinara-Engine/pull/4223. The new IPv4-only `localhost` regression reproduced `fetch failed` / `ECONNREFUSED ::1` before the fix and passes afterward for both streaming and non-streaming requests. Full `pnpm check` and the request-security regression also pass.
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#2286
No description provided.