Skip to content

docs(js): Restructure Vercel AI integration docs - #18925

Merged
vgrozdanic merged 13 commits into
masterfrom
docs/js-vercelai-integration-restructure
Aug 6, 2026
Merged

docs(js): Restructure Vercel AI integration docs#18925
vgrozdanic merged 13 commits into
masterfrom
docs/js-vercelai-integration-restructure

Conversation

@vgrozdanic

@vgrozdanic vgrozdanic commented Aug 3, 2026

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

The Vercel AI integration page now walks setup → enable telemetry → capture I/O → options, with shared guidance once and platform sections only where behavior actually differs (Cloudflare entrypoints, Deno/Edge telemetry, Next.js Edge init).

Readers should get a single clear path per runtime without near-duplicate Cloudflare vs non-Cloudflare snippets. Alerts for version floors, dataCollection, and registerTelemetry are folded into the relevant sections.

Part of TET-2704: Audit Vercel AI on Cloudflare Workers

IS YOUR CHANGE URGENT?

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Organize setup by platform, share telemetry guidance once, and cut
duplicated Cloudflare/non-Cloudflare snippets so readers get one path
per runtime without repeated copy.
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview Aug 6, 2026 10:09am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Aug 6, 2026 10:09am

Request Review

@linear-code

linear-code Bot commented Aug 3, 2026

Copy link
Copy Markdown

TET-2704

@vgrozdanic
vgrozdanic marked this pull request as ready for review August 3, 2026 20:04
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
generateObject was dropped during the page restructure. Users on
Cloudflare, Deno, and Next.js Edge still need experimental_telemetry
on object generation calls for spans to be created.

Co-Authored-By: x-ai/grok-4.5 <noreply@opencode.ai>
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Separate Node and Edge Sentry.init examples so Next.js users know
where to set vercelAIIntegration recordInputs/recordOutputs.

Co-Authored-By: x-ai/grok-4.5 <noreply@opencode.ai>
Clarify that force is Node-only; Cloudflare and Deno run the
integration when added to integrations without module detection.

Co-Authored-By: x-ai/grok-4.5 <noreply@opencode.ai>
Option snippets were standalone factory calls; wrap them so
copy-paste registers the configured integration.

Co-Authored-By: x-ai/grok-4.5 <noreply@opencode.ai>
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Explain re-adding the default integration to configure options, and
show Cloudflare option setup with withSentry instead of Sentry.init.

Co-Authored-By: opencode <noreply@opencode.ai>
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Tell users on auto-enabled platforms how to re-add the integration
when they need options.

Co-Authored-By: opencode <noreply@opencode.ai>
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Hide integration-level recordInputs/recordOutputs examples from Deno
and document per-call experimental_telemetry instead.

Co-Authored-By: opencode <noreply@opencode.ai>
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
The page interleaved runtime caveats through every section, so no reader
ever saw which combination of runtime and option actually works. Restructure
around the two implementations Sentry ships: Node patches the ai module
through OpenTelemetry, while Edge, Cloudflare Workers, and Deno cannot load
it and read the spans the AI SDK emits on its own. A capability table states
each difference once, and the task sections no longer branch per platform.

Correct three claims while restructuring:

- Edge ignores recordInputs and recordOutputs on the integration. Its option
  type accepts enableTruncation only, so the previous sentry.edge.config
  example configured options that do nothing, with no error or warning.
- Precedence ran the other way. The integration option wins over the per-call
  value, not the reverse, so recordInputs: false on the integration cannot be
  re-enabled at a call site.
- AI SDK v7 is unsupported on Edge, which is tracing-channel based.

Also fold the per-call material into one section covering isEnabled,
the recording overrides, and functionId, and list the instrumented functions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated
Comment thread docs/platforms/javascript/common/configuration/integrations/vercelai.mdx Outdated

@coolguyzone coolguyzone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, added some suggestions to fix some title casing issues.

Co-authored-by: Alex Krawiec <alexanderkrawiec@gmail.com>
Gate enableTruncation example for Cloudflare withSentry, and stop
telling Next.js Node users they must pass experimental_telemetry.

Co-Authored-By: opencode <noreply@opencode.ai>
@vgrozdanic
vgrozdanic merged commit 0d4c8cd into master Aug 6, 2026
22 checks passed
@vgrozdanic
vgrozdanic deleted the docs/js-vercelai-integration-restructure branch August 6, 2026 10:32
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