feat(gateway): include audio + web_search in system.services
This commit is contained in:
@@ -38,6 +38,8 @@ describe('discoverServices', () => {
|
||||
expect.objectContaining({ name: 'telegram', status: 'not_configured' }),
|
||||
expect.objectContaining({ name: 'cron', status: 'not_configured' }),
|
||||
expect.objectContaining({ name: 'mcp', status: 'not_configured' }),
|
||||
expect.objectContaining({ name: 'web_search', status: 'configured' }),
|
||||
expect.objectContaining({ name: 'audio_transcription', status: 'not_configured' }),
|
||||
]));
|
||||
});
|
||||
|
||||
@@ -83,5 +85,20 @@ describe('discoverServices', () => {
|
||||
expect(services.find(s => s.name === 'cron')?.itemCount).toBe(1);
|
||||
expect(services.find(s => s.name === 'mcp')?.metadata).toEqual({ serverCount: 1 });
|
||||
});
|
||||
});
|
||||
|
||||
it('marks audio transcription as configured and includes endpoint metadata', () => {
|
||||
const cfg = makeBaseConfig();
|
||||
(cfg as any).audio = { enabled: true, provider: { type: 'custom', endpoint: 'http://localhost:18801/v1/audio/transcriptions', model: 'whisper-1' } };
|
||||
|
||||
const reg = new ChannelRegistry();
|
||||
const services = discoverServices(cfg, reg);
|
||||
|
||||
const audio = services.find(s => s.name === 'audio_transcription');
|
||||
expect(audio?.status).toBe('configured');
|
||||
expect(audio?.metadata).toMatchObject({
|
||||
provider: 'custom',
|
||||
endpoint: 'http://localhost:18801/v1/audio/transcriptions',
|
||||
model: 'whisper-1',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user