Conversation
🦋 Changeset detectedLatest commit: 9e42604 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Have you ran the tests on those plugins? |
Yes — I re-ran the plugin tests and checks after the latest fixes. What I validated:
I also added a regression test for the stream options race-condition and fixed the STT/TTS typed-array buffer window handling from review feedback. |
…nts and update llm/tts
…t/unhandled rejection
|
|
||
| if (!response.ok) { | ||
| const errorText = await response.text().catch(() => 'unknown error'); | ||
| throw new BlazeHttpError(response.status, `Blaze STT error ${response.status}: ${errorText}`); |
There was a problem hiding this comment.
🟡 STT throws non-framework BlazeHttpError instead of APIStatusError on HTTP failures
The STT _recognize method throws BlazeHttpError (a plain Error subclass defined in plugins/blaze/src/config.ts:86) for HTTP error responses, while the LLM (plugins/blaze/src/llm.ts:208-211) and TTS (plugins/blaze/src/tts.ts:392-395) implementations correctly throw APIStatusError from the framework. BlazeHttpError does not extend APIError, so any caller that checks error instanceof APIError to distinguish API failures from other errors will misclassify STT HTTP errors. The framework's error handling infrastructure (e.g., the retryable property on APIError, error classification in the voice pipeline) expects APIError subtypes. After all internal retries exhaust, this non-framework error type escapes to the caller.
Prompt for agents
In plugins/blaze/src/stt.ts, the _recognize method throws BlazeHttpError (from config.ts, which extends Error directly) on HTTP error responses (line 195). This is inconsistent with the LLM and TTS implementations in the same plugin, which throw APIStatusError (a framework-provided APIError subclass). The fix is to replace the BlazeHttpError throw with an APIStatusError throw, matching the pattern used in llm.ts:208-211 and tts.ts:392-395. The isRetryableError check in the retry loop (line 202) should then check for APIStatusError.retryable or APIStatusError.statusCode instead of BlazeHttpError.status. This may also allow removing BlazeHttpError and isRetryableError from config.ts entirely if they are no longer needed.
Was this helpful? React with 👍 or 👎 to provide feedback.
No description provided.