new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

raindrop/options

10 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Raindrop telemetry option: functionId

Use the telemetry option with functionId field for function-level settings when calling generateText or other AI SDK functions. Example: telemetry: { functionId: 'welcome-message' }

Raindrop context fields for per-request configuration

Raindrop context supports userId, convoId, and eventName fields. These can be set globally when registering raindrop({ context: { userId } }) or per-request via telemetry.integrations.

Raindrop requires userId for event recording

Raindrop records an event once a userId is available. Without a userId, Raindrop still records a trace for the call but does not emit an event.

Per-request Raindrop telemetry via integrations array

Pass a Raindrop integration through telemetry.integrations for individual calls when userId, convoId, or eventName change per request. Per-call telemetry.integrations replace globally registered integrations for that call.

Raindrop telemetry.integrations example with request-specific context

Example showing per-request Raindrop context: import { generateText } from 'ai'; import { openai } from '@ai-sdk/openai'; import { raindrop } from '@raindrop-ai/ai-sdk'; const userId = 'user_123'; const convoId = 'chat_456'; const raindropTelemetry = raindrop({ context: { userId, convoId, eventName: 'support-chat' }, }); const { text } = await generateText({ model: openai('gpt-5-mini'), prompt: 'Summarize the latest support ticket.', telemetry: { functionId: 'support-summary', integrations: [raindropTelemetry], }, }); await raindropTelemetry.flush();

Raindrop flush method for streaming

For streaming calls, call raindropTelemetry.flush() when the stream finishes to complete telemetry recording. This is especially important for AI SDK UI routes.

Raindrop streaming example with flush

Example of using Raindrop with streamText in a Next.js route: import { convertToModelMessages, createUIMessageStreamResponse, streamText, toUIMessageStream, type UIMessage, } from 'ai'; import { openai } from '@ai-sdk/openai'; import { raindrop } from '@raindrop-ai/ai-sdk'; export async function POST(req: Request) { const { id, messages, userId } = (await req.json()) as { id: string; messages: UIMessage[]; userId: string; }; const raindropTelemetry = raindrop({ context: { userId, convoId: id, eventName: 'chat' }, }); const result = streamText({ model: openai('gpt-5-mini'), messages: await convertToModelMessages(messages), telemetry: { functionId: 'chat-route', integrations: [raindropTelemetry], }, onEnd: async () => { await raindropTelemetry.flush(); }, }); return createUIMessageStreamResponse({ stream: toUIMessageStream({ stream: result.stream }), }); }

Raindrop recordInputs and recordOutputs options

Use recordInputs and recordOutputs flags in the telemetry option to control whether prompts and responses are attached to trace spans. These flags only affect span attributes; Raindrop's event payload still records input and output.

Raindrop privacy: disable events to prevent all input/output recording

To keep sensitive content out of Raindrop entirely, disable event capture by registering with raindrop({ events: { enabled: false } }). This records only traces without event data.

Raindrop redaction of credential-shaped values in traces

Credential-shaped values in provider options are stripped from traces by default. Customize this behavior with traces.transformSpan or traces.disableDefaultRedaction options.

Give your agent this brain