@raindrop-ai/ai-sdk 0.0.33 → 0.0.35
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 +22 -0
- package/dist/{chunk-FIX66Y7M.mjs → chunk-XPZBPNLC.mjs} +475 -77
- package/dist/{index-Dcf4FPZL.d.mts → index-DFLIiW1D.d.mts} +136 -2
- package/dist/{index-Dcf4FPZL.d.ts → index-DFLIiW1D.d.ts} +136 -2
- package/dist/index.browser.d.mts +136 -2
- package/dist/index.browser.d.ts +136 -2
- package/dist/index.browser.js +478 -76
- package/dist/index.browser.mjs +475 -77
- package/dist/index.node.d.mts +1 -1
- package/dist/index.node.d.ts +1 -1
- package/dist/index.node.js +478 -76
- package/dist/index.node.mjs +1 -1
- package/dist/index.workers.d.mts +1 -1
- package/dist/index.workers.d.ts +1 -1
- package/dist/index.workers.js +478 -76
- package/dist/index.workers.mjs +1 -1
- package/package.json +2 -2
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.
|