Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • remove openai and anthropic sdk's from serverExternalPackages

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 Dec 13, 2025

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Dec 13, 2025 2:09am

@waleedlatif1 waleedlatif1 merged commit d27f7c2 into staging Dec 13, 2025
4 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/next branch December 13, 2025 02:09
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 13, 2025

Greptile Overview

Greptile Summary

Removed @anthropic-ai/sdk and openai from the serverExternalPackages configuration in Next.js. These SDKs were mistakenly added in PR #2340 and don't require external bundling.

  • The OpenAI and Anthropic SDKs are standard npm packages that bundle well with webpack/turbopack
  • Keeping them in serverExternalPackages prevents Next.js from bundling them, which can lead to larger deployment sizes and potential runtime issues
  • These packages are used extensively in provider implementations throughout the codebase (apps/sim/providers/*)
  • This fix allows Next.js to properly bundle these dependencies, improving build optimization

Confidence Score: 5/5

  • This PR is safe to merge - it corrects an unnecessary configuration that was preventing proper bundling
  • The change removes two packages from serverExternalPackages that don't require external bundling. The @anthropic-ai/sdk and openai packages are standard JavaScript SDKs without native bindings or dynamic requires that would necessitate external bundling. This fix improves the build process by allowing Next.js to properly bundle these dependencies
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/next.config.ts 5/5 Removed @anthropic-ai/sdk and openai from serverExternalPackages - these SDKs don't need external bundling

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Next as Next.js Build
    participant Bundle as Webpack/Turbopack
    participant Deploy as Deployment

    Note over Dev,Deploy: Before: SDKs in serverExternalPackages
    Dev->>Next: Build application
    Next->>Bundle: Bundle application code
    Bundle-->>Next: Skip bundling @anthropic-ai/sdk & openai
    Next->>Deploy: Deploy with external dependencies
    Note over Deploy: Larger bundle, runtime dependency resolution

    Note over Dev,Deploy: After: SDKs removed from serverExternalPackages
    Dev->>Next: Build application
    Next->>Bundle: Bundle application code + SDKs
    Bundle->>Bundle: Optimize and tree-shake SDKs
    Bundle-->>Next: Bundled application with SDKs
    Next->>Deploy: Deploy optimized bundle
    Note over Deploy: Smaller bundle, better optimization
Loading

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.

1 file reviewed, no comments

Edit Code Review Agent 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.

2 participants