You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AI_JSONParseError during SSE streaming is not retried (falls to NamedError.Unknown) #13579
When SSE streams from providers return malformed JSON (e.g., corrupted chunks from Kimi K2.5 via Kilo Gateway), the Vercel AI SDK throws AI_JSONParseError. In the current message-v2.ts:fromError() error classification chain, this error:
Is NOT an APICallError (skips that branch)
Is NOT a LoadAPIKeyError or DOMException (skips those branches)
Falls through to case e instanceof Error: → becomes NamedError.Unknown
Since NamedError.Unknown is not recognized as retryable by retry.ts:retryable(), the session terminates immediately instead of retrying.
Activity
docs: redo case study analysis, file upstream issues #169
github-actions commentedon Apr 16, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
fix(opencode): retry JSONParseError from malformed SSE streams
fix(opencode): retry JSONParseError from malformed SSE streams