Skip to content

fix(wand): try switching runtime to nodejs#1190

Merged
Sg312 merged 1 commit intostagingfrom
fix/wand
Aug 29, 2025
Merged

fix(wand): try switching runtime to nodejs#1190
Sg312 merged 1 commit intostagingfrom
fix/wand

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Aug 29, 2025

Summary

Switch wand runtime to nodejs

Type of Change

  • Bug fix

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 29, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim Ready Ready Preview Comment Aug 29, 2025 10:17pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 29, 2025 10:17pm

@Sg312 Sg312 changed the base branch from main to staging August 29, 2025 22:17
@Sg312 Sg312 merged commit 1aec32b into staging Aug 29, 2025
4 checks passed
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 makes a single but important configuration change to the wand-generate API endpoint by switching its runtime from 'edge' to 'nodejs'. The wand-generate API is responsible for AI content generation using OpenAI/Azure OpenAI integration, supporting both streaming and non-streaming response modes.

The edge runtime in Next.js is designed for lightweight, fast-executing functions with limited Node.js API access, optimized for simple operations that can run at the edge of the network. However, the wand-generate API requires several Node.js-specific features that are either restricted or incompatible with the edge runtime:

  • AbortController with setTimeout for managing streaming timeouts
  • crypto.randomUUID() for generating unique request identifiers
  • Complex ReadableStream operations for handling AI response streaming
  • Long-running operations for AI content generation

By switching to the nodejs runtime, the API gains full access to Node.js APIs and can handle these operations reliably. This change ensures the wand functionality works properly within the broader Sim platform's workflow automation system, where AI-powered content generation is likely a critical feature for users building automated workflows.

Confidence score: 5/5

  • This PR is extremely safe to merge with virtually no risk of breaking existing functionality
  • Score reflects a simple, well-understood configuration change that addresses clear compatibility issues without modifying business logic
  • No files require special attention as this is a single-line configuration change

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

waleedlatif1 pushed a commit that referenced this pull request Aug 29, 2025
Sg312 added a commit that referenced this pull request Aug 30, 2025
waleedlatif1 pushed a commit that referenced this pull request Sep 1, 2025
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
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