You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,17 @@
1
1
# @opensea/tool-sdk
2
2
3
+
## 0.21.0
4
+
5
+
### Minor Changes
6
+
7
+
- 6c1be9c: `createToolHandler` now fires the usage report through a platform `waitUntil` (keep-alive-after-response) when one is available, instead of awaiting it inline. This removes reporting latency from every successful call and closes a billing edge case: because x402 settlement runs before the report, awaiting the report meant a function freeze in that window could charge a paid caller without returning a result. With `waitUntil` the response flushes first and the report runs after.
8
+
9
+
It's automatic for most tools: the Vercel request-context `waitUntil` is auto-detected (no dependency on `@vercel/functions`), and `toCloudflareHandler` now wires the per-request `ctx.waitUntil` (its `fetch` signature gains the optional `ctx` argument). A new optional `waitUntil` option on `ToolHandlerConfig` lets you override detection or support another runtime. When no `waitUntil` is available (long-running servers, or serverless lacking it), the report is awaited as before so it still fires before any freeze.
10
+
11
+
### Patch Changes
12
+
13
+
- 09f20a7: The `init` Vercel template now sets `export const maxDuration = 60` on the tool entrypoint. Tools that call an LLM or other slow upstream routinely exceed Vercel's 10s Hobby default, which returns a 502 to the caller; because x402 settlement runs after the handler succeeds, a timeout in the settle/report window can also charge the caller without returning a result. 60s is the Hobby maximum and valid on Pro/Enterprise.
0 commit comments