Skip to content

fix: lazy-init Anthropic client across routes and libs#51

Merged
DealPatrol merged 1 commit into
mainfrom
fix/lazy-anthropic
May 22, 2026
Merged

fix: lazy-init Anthropic client across routes and libs#51
DealPatrol merged 1 commit into
mainfrom
fix/lazy-anthropic

Conversation

@DealPatrol
Copy link
Copy Markdown
Owner

Eager new Anthropic() at module scope breaks Vercel builds when ANTHROPIC_API_KEY is missing during page data collection. Each occurrence is now wrapped in a getAnthropic() helper so cold paths still build.

Eager 'new Anthropic()' at module scope breaks builds when ANTHROPIC_API_KEY is missing during Vercel's page data collection. Wrapping each in a getAnthropic() helper so cold paths still build and runtime errors are scoped to the requesting handler.
@supabase
Copy link
Copy Markdown

supabase Bot commented May 22, 2026

This pull request has been ignored for the connected project bpjftwoiosftvjvxpovz because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
repo-app-architect Ready Ready Preview, Comment May 22, 2026 6:03am
repofuse Ready Ready Preview, Comment, Open in v0 May 22, 2026 6:03am
v0-repo-app-architect Ready Ready Preview, Comment, Open in v0 May 22, 2026 6:03am

Request Review

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