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
{{ message }}
Repository navigation
fix(client): latch configure() on direct handler calls and vercelEvaluate #191
Follow-up from #190 (review nit, non-blocking for that PR).
Problem
Spec §3.9a says configure() may replace the options until the first AI invocation, "a ProviderHandler call or the start of its stream". After that, a different value must be rejected.
In #190 the lock (noteAiInvocation() in packages/client/src/sdk-options.ts) is set only on SDK-owned paths:
After either one, configure({ options: { captureContent: false } }) is accepted instead of throwing. No content leaks either way. The process default just changes quietly when it should fail loudly.
Suggested fix
In createHandlerInternal, wrap the blocking call the same way #190 wraps stream: call noteAiInvocation(), then the real handler. Each provider handler already captures const handler = createHandlerInternal(...), so its handler.captureContent reads keep working. Call noteAiInvocation() at the start of vercelEvaluate as well.
Tests
A directly called createHandler handler latches: a later configure with a different value throws.
vercelEvaluate latches the same way.
Graph nodes don't need a change: graph.ts goes through executeAndStream, which already latches.
Activity
jeffdupont commentedon Oct 29, 2026
Moved to Jira: https://launchdarkly.atlassian.net/browse/AIC-3703