chore(baseten): remove dead BasetenSttOptions fields and their defaults - #2391
Conversation
|
| environment?: string; | ||
| encoding?: string; | ||
| sampleRate?: number; | ||
| bufferSizeSeconds?: number; |
There was a problem hiding this comment.
🟡 Public option removal breaks consumers
TypeScript applications using any removed BasetenSttOptions property fail excess-property checks after upgrading. Public no-op options require deprecation before removal.
Prompt for agents
Preserve source compatibility for the exported BasetenSttOptions interface in plugins/baseten/src/types.ts. Restore bufferSizeSeconds, partialTranscriptIntervalS, finalTranscriptMaxDurationS, prompt, and languageDetectionOnly as optional deprecated properties for a deprecation cycle, while leaving them unused at runtime. Regenerate plugins/baseten/etc/agents-plugin-baseten.api.md and add the required changeset documenting their deprecation. Remove them only in a planned breaking release.
Was this helpful? React with 👍 or 👎 to provide feedback.
Description
Removed five unused fields from
BasetenSttOptionsinplugins/baseten/src/types.ts(
bufferSizeSeconds,partialTranscriptIntervalS,finalTranscriptMaxDurationS,prompt,languageDetectionOnly) and the corresponding entries indefaultSTTOptionsinplugins/baseten/src/stt.ts. The auto-generatedetc/agents-plugin-baseten.api.mdwas regenerated to match.Changes Made
bufferSizeSeconds,partialTranscriptIntervalS,finalTranscriptMaxDurationS,prompt, andlanguageDetectionOnlyfrom theBasetenSttOptionsinterface — none had any production reader anywhere in the repo.defaultSTTOptions(bufferSizeSeconds: 0.032,partialTranscriptIntervalS: 0.5,finalTranscriptMaxDurationS: 5,languageDetectionOnly: false); they were only merged into#optsbut neverread back.
plugins/baseten/etc/agents-plugin-baseten.api.mdviapnpm api:updateso the public API report no longer lists the removed members.Pre-Review Checklist
Testing
pnpm vitest runfor baseten;pnpm build,pnpm typecheck,pnpm lint, andpnpm api:checkall green)restaurant_agent.tsandrealtime_agent.tswork properly (for major changes) — N/A, baseten-only type cleanupAdditional Notes
bufferSizeSecondswas born dead: it was added in the original baseten plugincommit but never had a production reader.
partialTranscriptIntervalS,finalTranscriptMaxDurationS,prompt, andlanguageDetectionOnlywere orphaned by PR Add aligned transcript support with word-level timing #984 ("Add aligned transcript supportwith word-level timing"), which dropped the
streaming_params/whisper_paramsblocks in
stt.tsthat previously read them — the reads were removed but thetype fields and defaults were left behind.
BasetenSttOptionsfields (including the@deprecatedmodelId, whichstill has a live fallback code path in
getWsUrl) and allBasetenLLMOptions/BasetenTTSOptionsmembers were verified as living and kept.History
Dead Code PRs can be configured here.