Skip to content

fix(wand): remove unstable__noStore and remove, add additional logs for wand generation#1133

Merged
waleedlatif1 merged 2 commits intostagingfrom
fix/wand
Aug 25, 2025
Merged

fix(wand): remove unstable__noStore and remove, add additional logs for wand generation#1133
waleedlatif1 merged 2 commits intostagingfrom
fix/wand

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

remove unstable__noStore and remove, add additional logs for wand generation

Type of Change

  • Bug fix

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Aug 25, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim Building Building Preview Comment Aug 25, 2025 11:20pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 25, 2025 11:20pm

@waleedlatif1 waleedlatif1 merged commit 1f9b4a8 into staging Aug 25, 2025
3 of 4 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/wand branch August 25, 2025 23:20
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR improves the reliability and observability of the wand generation streaming API endpoint by making several key architectural changes. The most significant change is the removal of the deprecated unstable_noStore function, which was previously used to prevent caching but is no longer needed since dynamic = 'force-dynamic' already handles this. The PR adds Edge Runtime support with export const runtime = 'edge', which should improve performance and reduce cold start times for AI generation operations.

The PR introduces comprehensive timeout and cancellation handling using AbortController, implementing a 30-second timeout to prevent hanging streams and proper client-side cancellation support. This addresses potential resource leaks and improves user experience when operations are cancelled. The streaming implementation is enhanced with detailed logging throughout the process, tracking chunk counts, usage data, and stream lifecycle events. These logs provide better visibility for debugging streaming operations and monitoring the health of AI generation requests.

The changes integrate well with the existing codebase architecture, following established patterns for API routes and leveraging the existing logging infrastructure. The Edge Runtime configuration aligns with Next.js best practices for AI/streaming endpoints that benefit from faster startup times.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk of breaking existing functionality
  • Score reflects solid improvements to error handling and observability without touching core business logic
  • Pay close attention to the streaming timeout behavior in production to ensure 30 seconds is appropriate for all use cases

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…or wand generation (simstudioai#1133)

* feat(wand): added additional logs for wand generation

* remove unstable__noStore
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.

1 participant