Fully migrate off Gemini: shared Ollama client (gemma4:26b @ shadow-death), health reports llm backend, drop @google/genai
This commit is contained in:
@@ -10,6 +10,7 @@ import { generateMCPToolFromPrompt } from './src/server/aiGenerator.js';
|
||||
import { mcpWorkflowManager } from './src/server/mcpWorkflows.js';
|
||||
import { mcpSecurityManager } from './src/server/mcpSecurity.js';
|
||||
import { SystemLog, ServerStats } from './src/types.js';
|
||||
import { OLLAMA_HOST, OLLAMA_MODEL } from './src/server/llmClient.js';
|
||||
|
||||
// Inject memoryStore reference into tools module
|
||||
setMemoryStoreRef(memoryStore);
|
||||
@@ -65,7 +66,6 @@ addLog({
|
||||
app.get('/api/v1/system/status', (req: Request, res: Response) => {
|
||||
const uptimeSeconds = Math.floor((Date.now() - startTime) / 1000);
|
||||
const avgLatency = totalRequests > 0 ? Math.round(totalLatencySum / totalRequests) : 0;
|
||||
const apiKey = process.env.GEMINI_API_KEY;
|
||||
const servers = mcpRegistry.getServers();
|
||||
const activeTools = mcpRegistry.getAllActiveTools();
|
||||
|
||||
@@ -81,7 +81,9 @@ app.get('/api/v1/system/status', (req: Request, res: Response) => {
|
||||
totalMCPServersCount: servers.length,
|
||||
avgLatencyMs: avgLatency,
|
||||
memoryUsageMb: Math.round(process.memoryUsage().heapUsed / 1024 / 1024),
|
||||
hasGeminiKey: Boolean(apiKey && apiKey !== 'MY_GEMINI_API_KEY'),
|
||||
llmProvider: 'ollama',
|
||||
llmModel: OLLAMA_MODEL,
|
||||
llmHost: OLLAMA_HOST,
|
||||
};
|
||||
|
||||
res.json(stats);
|
||||
|
||||
Reference in New Issue
Block a user