| 123456789101112131415161718192021 |
- const llm = require('/data/ai/audio/server/dist/services/llm');
- const registry = llm.llmRegistry || llm._llmRegistry || null;
- let reg = registry;
- if (!reg) {
- for (const k of Object.keys(llm)) {
- if (typeof llm[k] === 'function' && k.startsWith('getLlm')) {
- try { reg = llm[k](); if (reg && reg.getStatus) break; } catch {}
- }
- if (typeof llm[k] === 'object' && llm[k] && llm[k].getStatus) { reg = llm[k]; break; }
- }
- }
- if (!reg) { console.log('NO REGISTRY FOUND, exports:', Object.keys(llm)); process.exit(1); }
- console.log('=== Health Status ===');
- const statuses = reg.getStatus();
- for (const s of statuses) {
- console.log(' -', s.name, 'enabled=', s.enabled, 'healthy=', s.healthy, 'failures=', s.consecutiveFailures, 'circuit=', s.circuitState, 'models=', s.modelCount);
- }
- console.log('=== Available Nodes (textModels head) ===');
- for (const node of reg.listAvailable()) {
- console.log(' -', node.provider.displayName, 'models:', node.provider.textModels.slice(0, 8));
- }
|