Files
OpenMAIC/lib/audio/asr-enablement.ts
wyuc b8fbac1a54 feat(providers): uniform capability force-off and consistent missing-key contract (#1181)
* feat(providers): uniform capability force-off and consistent missing-key contract

* fix(providers): close force-off bypasses found in review
2026-08-26 10:59:43 +08:00

11 lines
419 B
TypeScript

export interface ASRServerControl {
serverDisabled?: boolean;
}
export const ASR_SERVER_DISABLED_MESSAGE = 'This ASR provider is disabled by the server';
/** Server force-off takes precedence even for ASR that executes entirely in the browser. */
export function getASRServerDisabledError(config?: ASRServerControl): string | undefined {
return config?.serverDisabled ? ASR_SERVER_DISABLED_MESSAGE : undefined;
}