Skip to content

Conversation

@jsonbailey
Copy link
Contributor

@jsonbailey jsonbailey commented Oct 31, 2025

The Vercel methods on the aiConfig are being deprecated in favor of the Vercel provider specific package which has package version constraints to make usage more stable. Updating the example to show best practices.


Note

Migrates the Vercel AI example to use VercelProvider with new tracking APIs and adds the provider package, loosening related dependency versions.

  • Examples (packages/sdk/server-ai/examples/vercel-ai/src/index.ts)
    • Replace deprecated aiConfig Vercel helpers with VercelProvider.toVercelAISDK.
    • Switch metrics tracking to tracker.trackMetricsOf/tracker.trackStreamMetricsOf with VercelProvider.getAIMetricsFromResponse and VercelProvider.getAIMetricsFromStream.
    • Add guard for aiConfig.tracker and split non-streaming and streaming examples.
  • Dependencies (packages/sdk/server-ai/examples/vercel-ai/package.json)
    • Add @launchdarkly/server-sdk-ai-vercel.
    • Loosen versions for @ai-sdk/openai, @launchdarkly/node-server-sdk, and @launchdarkly/server-sdk-ai to caret ranges.

Written by Cursor Bugbot for commit 7d594da. This will update automatically on new commits. Configure here.

@jsonbailey jsonbailey requested a review from a team as a code owner October 31, 2025 02:19
@github-actions
Copy link
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 169118 bytes
Compressed size limit: 200000
Uncompressed size: 789399 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 24988 bytes
Compressed size limit: 26000
Uncompressed size: 122411 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 17636 bytes
Compressed size limit: 20000
Uncompressed size: 90259 bytes

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 21721 bytes
Compressed size limit: 25000
Uncompressed size: 74698 bytes

@jsonbailey jsonbailey merged commit dc07917 into main Nov 4, 2025
32 checks passed
@jsonbailey jsonbailey deleted the jb/sdk-1532/update-vercelai-example-with-provider branch November 4, 2025 19:58
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.

3 participants