@raindrop-ai/ai-sdk 0.0.33 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -55,6 +55,28 @@ await raindrop.users.identify({
55
55
  await raindrop.flush();
56
56
  ```
57
57
 
58
+ ## Payload size limits
59
+
60
+ Text fields (event input/output, tool/LLM span payloads such as `ai.prompt`,
61
+ `ai.toolCall.args`, `ai.toolCall.result`) are capped at **1,000,000 characters
62
+ per field by default** and truncated with a `...[truncated by raindrop]`
63
+ marker. The cap is enforced before (or during) serialization, so a multi-MB
64
+ tool result costs the cap — not the payload — on your event loop, and
65
+ oversized events land truncated instead of being dropped at the ingest size
66
+ limit. Tune it via:
67
+
68
+ ```ts
69
+ const raindrop = createRaindropAISDK({
70
+ writeKey: "...",
71
+ maxTextFieldChars: 250_000,
72
+ });
73
+ ```
74
+
75
+ A stricter `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` env var is honored. The
76
+ bounded helpers are exported (`capText`, `boundedStringify`,
77
+ `TRUNCATION_MARKER`, `DEFAULT_MAX_TEXT_FIELD_CHARS`) for use in custom
78
+ `transformSpan` hooks and `buildEvent` builders.
79
+
58
80
  ## Manual Traces
59
81
 
60
82
  Create trace spans manually alongside, or instead of, auto-instrumented ones.