Repository navigation
Conversation
…-libraries gen-ai-libraries already runs chat and tool calls for both SDKs against real OpenRouter through the event proxy. Moves the cases only the send-to-sentry apps had (streaming usage, Responses API, embeddings, the Anthropic stream helper) into it, so they also run on Cloudflare, adds a (latest) variant for both SDKs, and removes node-openai-send-to-sentry and node-anthropic-send-to-sentry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
size-limit report 📦Compared: 9101732 (PR test merge using develop at b382e30) Against: b382e30 (develop) · base run #63998 ✅ Baseline matches: this diff contains only this PR's changes.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a22efbc. Configure here.
| expect(attr(span, 'gen_ai.provider.name')).toBe('openai'); | ||
| expect(attr(span, 'gen_ai.embeddings.input')).toContain('Paris'); | ||
| expect(attr(span, 'gen_ai.usage.input_tokens')).toBeGreaterThan(0); | ||
| }); |
There was a problem hiding this comment.
Hardcoded span attribute names in tests
Low Severity
New extra-route assertions compare span ops and attributes with string literals such as gen_ai.chat and sentry.origin. This was flagged because the review rules require those values to come from @sentry/conventions. The rest of this app's tests use the same local style.
Additional Locations (2)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit a22efbc. Configure here.
Optional E2E testsSome optional checks were not successful. They do not block the merge. 7 not successful, 57 successful. See the run.
Successful checks
|


Why: Whether gen_ai spans arrive in Sentry isn't something we need to test for each AI integration, and
gen-ai-librariesalready sends OpenAI and Anthropic chat and tool calls through real OpenRouter and checks them at the event proxy. The only thing the two send-to-sentry apps still covered was a handful of calls against the real provider: streaming with token usage, the Responses API, embeddings, and the Anthropicmessages.stream()helper. Those move intogen-ai-librariesas provider-specific extras, so they now also run on Cloudflare. The new(latest)variant replaces the latest-SDK coverage the removed apps had.How to review: Start with
tests/extras.test.ts. The[DONE]-frame workaround came over from the Anthropic app, because Anthropic SDK 0.136+ needs it with OpenRouter.Unsure about:
@anthropic-ai/sdk1.x isn't instrumented at all: the orchestrion config only covers<1, so nogen_ai.chatspan is created. The(latest)variant therefore updates Anthropic to the latest 0.x (0.137.0) instead of@latest. The removed app's(latest)variant would have hit this gap. Supporting 1.x should be a separate issue.All three variants (node, cloudflare, latest) pass locally, 15/15 each.
🤖 Generated with Claude Code