feat(AIC-3408): add Vercel AI SDK messages and agents adapters - #103
andrewklatzke wants to merge 4 commits into
Conversation
Route LaunchDarkly AI Configs through the official Python ai runtime and AI Gateway, including native graph execution and a direct-model opt-out. Co-authored-by: Cursor <cursoragent@cursor.com>
Use the shared span helpers in production, trace tool execution, and emit provider-compatible strict schemas for messages output.
…cel-adapter # Conflicts: # .release-please-manifest.json
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c4ef4b8. Configure here.
| span.set_attribute("launchdarkly.stream.abandoned", True) | ||
| if not failed: | ||
| model_span.end() | ||
| span.end() |
There was a problem hiding this comment.
Cancelled runs miss cancelled flag
Medium Severity
CancelledError is not an Exception, so the handlers skip fail_span and leave failed false. The stream finally then sets launchdarkly.stream.abandoned and ends the spans, while the blocking path ends them with no launchdarkly.run.cancelled. The same package’s native graph sets that flag on cancel, so cancelled Vercel runs will not match other handlers or the graph path.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit c4ef4b8. Configure here.
| ) -> Any: | ||
| async def transfer() -> str: | ||
| selected[source] = target | ||
| return target |
There was a problem hiding this comment.
Handoff tool rejects model arguments
Medium Severity
transfer takes no arguments, unlike regular AgentTool executors that accept **kwargs. A model that passes any payload—common even for an empty-object schema, such as a reason—raises TypeError and aborts the graph instead of recording the handoff.
Reviewed by Cursor Bugbot for commit c4ef4b8. Configure here.


Summary
launchdarkly-ai-vercel-messagesandlaunchdarkly-ai-vercel-agentspackages that map LaunchDarkly AI Configs onto the official Pythonairuntime and AI Gatewaycreator/modelids.Test plan
make format-check && make lint && make typecheck && make testinpython/uv run python main.py vercel-agents launch-darkly-documentation-summarizer "..."and confirm a non-empty response, non-zero usage, and a judge scorevercel-messagesandvercel-directsuccess/failure keys fromintegration-config.jsonnative-graph-vercelfails cleanly if the Gateway free tier still blocks the graph modelMade with Cursor