[PR #160] [MERGED] Refactor Local AI runtime setup and simplify Local Model onboarding #4488

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/160
Author: @ghost
Created: 4/21/2026
Status: ✅ Merged
Merged: 4/21/2026
Merged by: @SpicyMarinara

Base: main ← Head: fix/more-sidecar-fixes


📝 Commits (5)

  • 38ba4dc android patches
  • 8ded4a7 fix: harden sidecar request routing and launch planning
  • dd8504e Refactor local AI runtime setup flow
  • 284430d Simplify local model entry flow
  • b09f601 Merge origin/main into fix/more-sidecar-fixes

📊 Changes

21 files changed (+1209 additions, -463 deletions)

View changed files

📝 packages/client/src/App.tsx (+2 -6)
📝 packages/client/src/components/modals/ModelDownloadModal.tsx (+400 -151)
📝 packages/client/src/components/onboarding/OnboardingTutorial.tsx (+20 -1)
📝 packages/client/src/components/panels/ConnectionsPanel.tsx (+25 -45)
📝 packages/client/src/stores/sidecar.store.ts (+43 -35)
📝 packages/server/package.json (+1 -0)
📝 packages/server/src/app.ts (+1 -1)
📝 packages/server/src/db/seed-mari.ts (+1 -1)
📝 packages/server/src/routes/sidecar.routes.ts (+20 -4)
📝 packages/server/src/services/llm/providers/local-sidecar.provider.ts (+16 -2)
📝 packages/server/src/services/sidecar/sidecar-inference.service.ts (+11 -3)
➕ packages/server/src/services/sidecar/sidecar-launch-plan.ts (+53 -0)
📝 packages/server/src/services/sidecar/sidecar-model.service.ts (+81 -30)
📝 packages/server/src/services/sidecar/sidecar-process.service.ts (+78 -43)
➕ packages/server/src/services/sidecar/sidecar-request-model.ts (+14 -0)
➕ packages/server/src/services/sidecar/sidecar-runtime-env.ts (+37 -0)
📝 packages/server/src/services/sidecar/sidecar-runtime.service.ts (+222 -141)
➕ packages/server/test/sidecar-launch-plan.test.ts (+105 -0)
➕ packages/server/test/sidecar-request-model.test.ts (+21 -0)
➕ packages/server/test/sidecar-runtime-env.test.ts (+51 -0)

...and 1 more files

📄 Description

Summary

This PR cleans up the Local AI setup flow so runtime setup is separate from model download, easier to configure, and less likely to pick the wrong device on mixed-GPU systems.

What Changed

  • Split runtime installation/setup from model download for the Local AI flow
  • Added explicit runtime targeting so users can choose the backend/device family instead of relying only on auto-detection
  • Moved the advanced Local AI controls into Runtime Settings to keep the main modal cleaner
  • Fixed custom GPU layers so custom values persist and apply correctly
  • Updated the Local Model card to always open settings instead of switching between download/delete actions
  • Removed the automatic Local AI modal prompt on startup
  • Added Local Model setup as part of the replay/onboarding tutorial instead
  • Cleaned up old local model artifacts when switching to a new model
  • Cleaned up old runtime artifacts when installing/reinstalling a new runtime
  • Merged the latest main into this branch and resolved the sidecar-related conflicts

Notes

  • Apple Silicon continues to use the MLX path, with cleanup handled through the MLX cache/runtime flow
  • System llama-server installs from PATH are still treated as external and are not deleted by Marinara

Validation

  • pnpm --filter @marinara-engine/client build
  • pnpm --filter @marinara-engine/server test
  • pnpm --filter @marinara-engine/server lint

🔄 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/160 **Author:** [@ghost](https://github.com/ghost) **Created:** 4/21/2026 **Status:** ✅ Merged **Merged:** 4/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `fix/more-sidecar-fixes` --- ### 📝 Commits (5) - [`38ba4dc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/38ba4dcf8f31b96c1a3a01ce2ca8cea02c082a28) android patches - [`8ded4a7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8ded4a7bad2b4f5afba75061617f1b118b3c58c4) fix: harden sidecar request routing and launch planning - [`dd8504e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dd8504e148a66b0fbe91f1d26395dbd9894ff163) Refactor local AI runtime setup flow - [`284430d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/284430d6cbd775096bfac4ac62a69a5b8a918d19) Simplify local model entry flow - [`b09f601`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b09f601d8b0bf03d66ab5243a8a679234d121861) Merge origin/main into fix/more-sidecar-fixes ### 📊 Changes **21 files changed** (+1209 additions, -463 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/App.tsx` (+2 -6) 📝 `packages/client/src/components/modals/ModelDownloadModal.tsx` (+400 -151) 📝 `packages/client/src/components/onboarding/OnboardingTutorial.tsx` (+20 -1) 📝 `packages/client/src/components/panels/ConnectionsPanel.tsx` (+25 -45) 📝 `packages/client/src/stores/sidecar.store.ts` (+43 -35) 📝 `packages/server/package.json` (+1 -0) 📝 `packages/server/src/app.ts` (+1 -1) 📝 `packages/server/src/db/seed-mari.ts` (+1 -1) 📝 `packages/server/src/routes/sidecar.routes.ts` (+20 -4) 📝 `packages/server/src/services/llm/providers/local-sidecar.provider.ts` (+16 -2) 📝 `packages/server/src/services/sidecar/sidecar-inference.service.ts` (+11 -3) ➕ `packages/server/src/services/sidecar/sidecar-launch-plan.ts` (+53 -0) 📝 `packages/server/src/services/sidecar/sidecar-model.service.ts` (+81 -30) 📝 `packages/server/src/services/sidecar/sidecar-process.service.ts` (+78 -43) ➕ `packages/server/src/services/sidecar/sidecar-request-model.ts` (+14 -0) ➕ `packages/server/src/services/sidecar/sidecar-runtime-env.ts` (+37 -0) 📝 `packages/server/src/services/sidecar/sidecar-runtime.service.ts` (+222 -141) ➕ `packages/server/test/sidecar-launch-plan.test.ts` (+105 -0) ➕ `packages/server/test/sidecar-request-model.test.ts` (+21 -0) ➕ `packages/server/test/sidecar-runtime-env.test.ts` (+51 -0) _...and 1 more files_ </details> ### 📄 Description ## Summary This PR cleans up the Local AI setup flow so runtime setup is separate from model download, easier to configure, and less likely to pick the wrong device on mixed-GPU systems. ## What Changed - Split runtime installation/setup from model download for the Local AI flow - Added explicit runtime targeting so users can choose the backend/device family instead of relying only on auto-detection - Moved the advanced Local AI controls into Runtime Settings to keep the main modal cleaner - Fixed custom GPU layers so custom values persist and apply correctly - Updated the Local Model card to always open settings instead of switching between download/delete actions - Removed the automatic Local AI modal prompt on startup - Added Local Model setup as part of the replay/onboarding tutorial instead - Cleaned up old local model artifacts when switching to a new model - Cleaned up old runtime artifacts when installing/reinstalling a new runtime - Merged the latest `main` into this branch and resolved the sidecar-related conflicts ## Notes - Apple Silicon continues to use the MLX path, with cleanup handled through the MLX cache/runtime flow - System `llama-server` installs from PATH are still treated as external and are not deleted by Marinara ## Validation - `pnpm --filter @marinara-engine/client build` - `pnpm --filter @marinara-engine/server test` - `pnpm --filter @marinara-engine/server lint` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:08:04 +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#4488
No description provided.