Skip to content

fix(wand): remove edge runtime for wand#1132

Merged
waleedlatif1 merged 1 commit intostagingfrom
fix/wand
Aug 25, 2025
Merged

fix(wand): remove edge runtime for wand#1132
waleedlatif1 merged 1 commit intostagingfrom
fix/wand

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

remove edge runtime for wand

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 9:21pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Aug 25, 2025 9:21pm

@waleedlatif1 waleedlatif1 merged commit 3372829 into staging Aug 25, 2025
3 of 4 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/wand branch August 25, 2025 21:21
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 removes the Edge Runtime configuration from the wand generation API endpoint (/api/wand-generate/route.ts) by deleting the line export const runtime = 'edge'. This change switches the API from running on Vercel's Edge Runtime to the standard Node.js runtime environment.

The wand generation endpoint is responsible for AI-powered workflow generation using OpenAI and Azure OpenAI clients. It implements streaming responses using ReadableStream and performs complex operations including session validation, prompt generation, and real-time response streaming to clients. The endpoint supports both OpenAI and Azure OpenAI backends based on configuration, with a maximum duration of 60 seconds and forced dynamic rendering.

This runtime change is significant because Edge Runtime operates with a restricted API surface and lacks access to Node.js APIs, while Node.js runtime provides full API access. The streaming implementation (lines 104-159) and the OpenAI/Azure OpenAI client usage likely encountered compatibility issues or limitations within the Edge Runtime constraints, necessitating this change to ensure proper functionality.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it addresses a compatibility issue
  • Score reflects a straightforward configuration change to resolve runtime limitations
  • Pay attention to the streaming response implementation and OpenAI client initialization

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

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