Repository navigation
Conversation
size-limit report 📦Compared: f610bbf (PR test merge using develop at f1e8e61) Against: ec88aef (develop) · base run #64752
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 6 not successful, 47 successful. See the run.
Successful checks
|
7f58fd6 to
91831f6
Compare
91831f6 to
c5e394f
Compare
| langChainIntegration(), | ||
| langGraphIntegration(), | ||
| mastraIntegration(), | ||
| piAiIntegration(), |
There was a problem hiding this comment.
Turning this on by default means one pi-ai request turns off the OpenAI / Anthropic / Google GenAI / Workers AI integrations for the whole process. So an app that uses pi-ai and also e.g. calls openai directly loses spans for its direct calls.
Could we make the skip apply only to requests pi-ai sends? The provider integrations already check the skip on every request, and the pi-ai chat span is active while pi-ai's request goes out. So they could skip only when they're inside a pi-ai span, and leave other calls alone.
| consoleSandbox(() => { | ||
| // eslint-disable-next-line no-console | ||
| console.warn( | ||
| '[Sentry] Flue model calls are not being traced: `@earendil-works/pi-ai` was not instrumented, so ' + | ||
| 'Flue agents record agent and tool spans but no `gen_ai.chat` spans. Model calls are traced by the ' + | ||
| "pi-ai integration, which needs Sentry's module hook or bundler plugin. On Node, load Sentry with " + | ||
| '`--import` (for example `node --import ./instrument.mjs app.mjs`). On Cloudflare, add ' + | ||
| '`sentryCloudflareVitePlugin()`. On Bun, build with `@sentry/bun/plugin`.', | ||
| ); | ||
| }); | ||
| } |
There was a problem hiding this comment.
l: We could detect the runtime and just print the according warning
…ibraries (#25947) **Why:** The `gen-ai-libraries (latest)` variant installs `together-ai@latest`, which is now 1.0.0. That release moved `/v1` from the SDK's default base URL into the request paths, so with our `https://openrouter.ai/api/v1` base URL it requests `/api/v1/v1/chat/completions` and both Together cases fail with a 500 (e.g. on #25940). Against a local server, 0.54.0 hits `/api/v1/chat/completions` with the `/v1` base and 1.0.0 hits `/api/v1/v1/chat/completions`; with the base URL minus `/v1`, 1.0.0 hits the right path. The default variant keeps 0.54.0, so the client picks the base URL from `together-ai/version`, which both versions export. Verified against a local server for both versions, and the import and expression type-check against both. **How to review:** One line in `src/libraries.ts`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Enables `piAiIntegration` by default. Flue and pi-durable send their model calls through pi-ai, so they no longer open chat spans of their own: Flue drops its turn spans and hands the conversation id to the pi-ai span through the scope, and pi-durable drops its `models` proxy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flue's model calls are now traced by the pi-ai integration, which needs the module hook or bundler plugin, while `instrument()` does not. Without them a Flue app would silently lose its `gen_ai.chat` spans; it now gets a warning on its first model call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c5e394f to
52faa76
Compare
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.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 52faa76. Configure here.
| key: FLUE_INSTRUMENTATION_KEY, | ||
|
|
||
| interceptor: async (operation, ctx, next) => { | ||
| skipProviders(); |
There was a problem hiding this comment.
Flue options no longer cover chats
Medium Severity
createFlueInstrumentation({ recordInputs, recordOutputs }) no longer controls model I/O on gen_ai.chat spans. Those spans now come from piAiIntegration, which only reads its own options and dataCollection.genAI. An existing Flue opt-out no longer suppresses prompts and completions, and an existing opt-in no longer records them. The JSDoc still says message content is gated on these Flue options.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 52faa76. Configure here.


Why: Flue and pi-durable both send their model calls through pi-ai, and each had its own chat-span code (Flue's turn observations, pi-durable's
modelsproxy). WithpiAiIntegration(#25937) enabled by default, pi-ai becomes the single source ofgen_ai.chatspans, and ~1.1k lines of duplicated span code go away. Flue now hands its conversation id to the pi-ai span through the scope.Stack: #25932 → #25937 → this. #25935 must be merged before #25937 and this: without it, instrumenting pi-ai makes the Cloudflare Flue worker crash at startup. Supersedes #25869.
How to review: The first commit is the switch. The second adds a one-time warning when Flue runs but pi-ai was not instrumented; it's separate so it can be dropped or split off.
Unsure about:
auto.ai.flue/auto.ai.pi_durabletoauto.ai.pi_ai.instrument(createFlueInstrumentation())keeps agent and tool spans but loses chat spans, hence the warning. Setups following our docs are unaffected.flue.turn.purpose(compaction vs. agent turn) is dropped, since pi-ai cannot see it. A possible follow-up is to record compaction the way feat(attributes): Add gen_ai conversation compaction conventions sentry-conventions#723 proposes, once it merges: Flue emitscompaction_start(with amanual/threshold/overflowreason) andcompactionobservations, so it could open agen_ai.compactspan with the summarizinggen_ai.chatnested under it.modelsobject created with pi-ai'screateModels().Release note:
🤖 Generated with Claude Code