chat client clean up and switch to llama.cpp with models folder network sharing

This commit is contained in:
Storme-bit
2026-04-09 04:13:21 -07:00
parent 541e664da1
commit 5c6e027fc1
15 changed files with 305 additions and 305 deletions

View File

@@ -0,0 +1,21 @@
// routes/models.js
const express = require('express');
const router = express.Router();
const fs = require('fs');
const path = require('path');
const {getEnv} = require('@nexusai/shared');
const MODELS_PATH = getEnv('MODELS_MANIFEST_PATH', path.join(__dirname, '../models.json'));
router.get('/', (req, res) => {
try {
const raw = fs.readFileSync(MODELS_PATH, 'utf8');
const models = JSON.parse(raw);
res.json(models);
} catch (err) {
console.error('[models] Failed to read manifest:', err.message);
res.status(500).json({ error: 'Could not load models manifest' });
}
});
module.exports = router;