Bug
Related to #21 (now fixed in schema). The blocking batch path (router.transcribe()) still fails when user-provided options contain speech_model (singular, deprecated).
Scenario
Bots created with SDK < 0.8.5 have transcription_custom_params: { "speech_model": "universal" } stored in the database. When retranscribing these bots, the stored params are passed to router.transcribe(). The SDK forwards speech_model to AssemblyAI, which responds:
Invalid endpoint schema, please refer to documentation for examples. — HTTP 400
Root cause
The SDK's internal AssemblyAI adapter in router.transcribe() doesn't map/strip the deprecated speech_model key. Since v0.8.5 removed speech_model from AssemblyAITranscriptionSchema, new bots won't have it — but existing bots with stored params still do.
Expected behavior
The SDK should either:
- Map
speech_model → speech_models: [value] internally (backwards compat), or
- Strip
speech_model and log a deprecation warning
Workaround
We're mapping speech_model → speech_models in our wrapper before calling router.transcribe():
if (provider === "assemblyai" && "speech_model" in unflattened) {
if (!("speech_models" in unflattened)) {
unflattened["speech_models"] = [unflattened["speech_model"]]
}
delete unflattened["speech_model"]
}
Bug
Related to #21 (now fixed in schema). The blocking batch path (
router.transcribe()) still fails when user-provided options containspeech_model(singular, deprecated).Scenario
Bots created with SDK < 0.8.5 have
transcription_custom_params: { "speech_model": "universal" }stored in the database. When retranscribing these bots, the stored params are passed torouter.transcribe(). The SDK forwardsspeech_modelto AssemblyAI, which responds:Root cause
The SDK's internal AssemblyAI adapter in
router.transcribe()doesn't map/strip the deprecatedspeech_modelkey. Since v0.8.5 removedspeech_modelfromAssemblyAITranscriptionSchema, new bots won't have it — but existing bots with stored params still do.Expected behavior
The SDK should either:
speech_model→speech_models: [value]internally (backwards compat), orspeech_modeland log a deprecation warningWorkaround
We're mapping
speech_model→speech_modelsin our wrapper before callingrouter.transcribe():