Disable the active Zen summarization flow because the unauthenticated/free Zen provider is no longer available and now returns usage-limit errors for this feature.
Keep /api/text/summarize as an API-compatible stub that returns local sanitized or distilled fallback text with summarized=false, rather than attempting external model calls.
Remove notification and voice playback summary behavior from runtime paths. Notification {last_message} now always uses normalized truncated text, and TTS playback ignores historical summarize request fields.
Hide the notification summary settings and voice summarize-before-playback controls while preserving legacy persisted settings for compatibility. Also disable Zen model startup validation and make Zen model list routes return empty results.
Update module documentation and tests to describe the retired provider behavior and the remaining compatibility stubs.
1.8 KiB
1.8 KiB
Text Module Documentation
Purpose
This module provides shared text transformation helpers that are not owned by a single product surface. It previously proxied model-backed summarization through the opencode.ai Zen provider; that provider is no longer available for this use, so summarization now returns local sanitized/distilled fallback text only.
Entrypoints and structure
packages/web/server/lib/text/summarization.js: Shared summarize stub + sanitize helpers. It performs no external model calls.
Public exports
Summarization (summarization.js)
summarizeText({ text, threshold, maxLength, zenModel, mode }): Retired summarization entrypoint retained as an API-compatible stub.zenModelis ignored.sanitizeForTTS(text): Sanitizes text for speech output.sanitizeForNotification(text): Sanitizes text for compact notification output.sanitizeForNote(text): Sanitizes text for short note/distillation output.
Modes
tts: Speakable summary for TTS flows.notification: Short plain-text summary for notification bodies.note: Distilled short project-memory note.
Response contract
summarizeText
Returns object with:
summary: Local sanitized/distilled fallback text.summarized: Alwaysfalsewhile the model provider is unavailable.reason: Skip reason, usuallyModel summarization provider unavailablefor text above threshold.originalLength: Optional original text length.summaryLength: Optional final summary length.
Notes for contributors
- Keep this module neutral. Do not re-couple it to TTS-specific naming or routing.
- Add new mode semantics here when multiple product surfaces need the same text pipeline.
- Prefer mode-specific prompt and sanitize behavior over creating duplicated summarizers in unrelated modules.