TTS: remove persona rewrite placeholder

This commit is contained in:
Barron Roth
2026-04-25 11:50:48 -07:00
committed by Ayaan Zaidi
parent 0594fa3c4d
commit f7c837b374
5 changed files with 14 additions and 54 deletions

View File

@@ -19189,32 +19189,6 @@ export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = {
description:
"Provider-neutral persona prompt intent. Providers decide whether and how to map this into request instructions.",
},
rewrite: {
type: "object",
properties: {
enabled: {
type: "boolean",
},
model: {
type: "string",
},
preserveMeaning: {
type: "boolean",
},
compressForSpeech: {
type: "boolean",
},
inCharacter: {
type: "boolean",
},
maxChars: {
type: "integer",
minimum: 1,
maximum: 9007199254740991,
},
},
additionalProperties: false,
},
providers: {
type: "object",
propertyNames: {

View File

@@ -37,15 +37,6 @@ export type TtsPersonaPromptConfig = {
constraints?: string[];
};
export type TtsPersonaRewriteConfig = {
enabled?: boolean;
model?: string;
preserveMeaning?: boolean;
compressForSpeech?: boolean;
inCharacter?: boolean;
maxChars?: number;
};
export type TtsPersonaConfig = {
label?: string;
description?: string;
@@ -53,7 +44,6 @@ export type TtsPersonaConfig = {
provider?: TtsProvider;
fallbackPolicy?: TtsPersonaFallbackPolicy;
prompt?: TtsPersonaPromptConfig;
rewrite?: TtsPersonaRewriteConfig;
/** Provider-specific persona bindings keyed by speech provider id. */
providers?: TtsProviderConfigMap;
};

View File

@@ -508,16 +508,6 @@ const TtsPersonaPromptSchema = z
constraints: z.array(z.string()).optional(),
})
.strict();
const TtsPersonaRewriteSchema = z
.object({
enabled: z.boolean().optional(),
model: z.string().optional(),
preserveMeaning: z.boolean().optional(),
compressForSpeech: z.boolean().optional(),
inCharacter: z.boolean().optional(),
maxChars: z.number().int().min(1).optional(),
})
.strict();
const TtsPersonaSchema = z
.object({
label: z.string().optional(),
@@ -527,7 +517,6 @@ const TtsPersonaSchema = z
.union([z.literal("preserve-persona"), z.literal("provider-defaults"), z.literal("fail")])
.optional(),
prompt: TtsPersonaPromptSchema.optional(),
rewrite: TtsPersonaRewriteSchema.optional(),
providers: z.record(z.string(), TtsProviderConfigSchema).optional(),
})
.strict();

View File

@@ -59,12 +59,6 @@ describe("TtsConfigSchema openai speed and instructions", () => {
pacing: "Measured.",
constraints: ["Do not read configuration values aloud."],
},
rewrite: {
enabled: false,
preserveMeaning: true,
compressForSpeech: true,
maxChars: 1500,
},
providers: {
google: {
model: "gemini-3.1-flash-tts-preview",
@@ -82,4 +76,18 @@ describe("TtsConfigSchema openai speed and instructions", () => {
}),
).not.toThrow();
});
it("rejects persona rewrite config until runtime behavior exists", () => {
expect(() =>
TtsConfigSchema.parse({
personas: {
alfred: {
["rewrite"]: {
enabled: true,
},
},
},
}),
).toThrow();
});
});

View File

@@ -141,7 +141,6 @@ export type {
TtsPersonaConfig,
TtsPersonaFallbackPolicy,
TtsPersonaPromptConfig,
TtsPersonaRewriteConfig,
TtsProvider,
} from "../config/types.js";
export {