Skip to content

Conversation

@DayuanJiang
Copy link
Owner

Summary

  • Add error prop to ChatInput to detect error state
  • Update isDisabled logic to allow retry when there's an error
  • Pass combined error (SDK error + streamingError) to ChatInput

When Bedrock returns 503 ServiceUnavailableException before streaming starts, AI SDK's onError fires but status may not transition to "ready". This fix ensures the input is re-enabled when an error occurs, allowing users to retry their request.

Changes

  • components/chat-input.tsx: Added error prop, updated isDisabled to (status === "streaming" || status === "submitted") && !error
  • components/chat-panel.tsx: Pass error={error || streamingError} to ChatInput

- Add error prop to ChatInput to detect error state
- Update isDisabled logic to allow retry when there's an error
- Pass combined error (SDK error + streamingError) to ChatInput

When Bedrock returns 503 ServiceUnavailableException before streaming
starts, AI SDK's onError fires but status may not transition to "ready".
This fix ensures the input is re-enabled when an error occurs, allowing
users to retry their request.
@vercel
Copy link

vercel bot commented Dec 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
next-ai-draw-io Building Building Preview Comment Dec 5, 2025 7:22am

@DayuanJiang DayuanJiang merged commit c805277 into main Dec 5, 2025
2 of 4 checks passed
@DayuanJiang DayuanJiang deleted the fix/bedrock-503-error-ui-recovery branch December 5, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants