Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: align voice tool discovery with supported engines (#6747)

[._.]/ Adam Eivyf160afa2271d
diff --git a/server/lib/apiOperationContracts.js b/server/lib/apiOperationContracts.js
index 2fda465ea1..3e33dd77f6 100644
--- a/server/lib/apiOperationContracts.js
+++ b/server/lib/apiOperationContracts.js
@@ -5,6 +5,7 @@ import {
voiceSynthesizeBodySchema,
zodToOpenApiSchema,
} from './apiContractSchemas.js';
+import { TTS_ENGINE_IDS } from './voiceEngines.js';
import { cosToolCallSchema } from './cosToolContracts.js';
import { agentContextMcpInboundSchema } from './agentContextValidation.js';
@@ -62,7 +63,7 @@ export const API_OPERATION_CONTRACTS = Object.freeze({
get: {
summary: 'List voices',
description: 'Enumerate available voices for an engine. Defaults to the active engine.',
- parameters: [{ name: 'engine', in: 'query', required: false, schema: { type: 'string', enum: ['kokoro', 'piper'] } }],
+ parameters: [{ name: 'engine', in: 'query', required: false, schema: { type: 'string', enum: [...TTS_ENGINE_IDS] } }],
responses: { 200: { description: 'Voice list', content: { 'application/json': { schema: { type: 'object' } } } } },
'x-portos-tool': { name: 'voice.list-voices', version: 1, policy: { privacy: 'internal', sideEffect: 'read', async: false } },
},
diff --git a/server/lib/apiToolResource.test.js b/server/lib/apiToolResource.test.js
index d3ccabe402..c352624481 100644
--- a/server/lib/apiToolResource.test.js
+++ b/server/lib/apiToolResource.test.js
@@ -52,7 +52,7 @@ describe('buildToolResource', () => {
it('flattens an object request body into the argument schema and keeps property descriptions', () => {
const input = byName('voice.synthesize').input_schema;
expect(input.required).toEqual(['text']);
- expect(input.properties.engine.enum).toEqual(['kokoro', 'piper']);
+ expect(input.properties.engine.enum).toEqual(['kokoro', 'piper', 'qwen3-tts']);
// The description is what lets a model pick a valid rate — minimization must not strip it.
expect(input.properties.rate.description).toMatch(/Speech rate/);
expect(input.additionalProperties).toBe(false);
@@ -60,7 +60,7 @@ describe('buildToolResource', () => {
it('turns query parameters into input properties', () => {
const input = byName('voice.list-voices').input_schema;
- expect(input.properties.engine).toEqual({ type: 'string', enum: ['kokoro', 'piper'] });
+ expect(input.properties.engine).toEqual({ type: 'string', enum: ['kokoro', 'piper', 'qwen3-tts'] });
expect(input.required).toBeUndefined(); // the engine param is optional
});