Skip to content

feat(AIC-3408): add Vercel AI SDK messages and agents adapters - #103

Open
andrewklatzke wants to merge 5 commits into
mainfrom
aklatzke/AIC-3408/vercel-adapter
Open

andrewklatzke wants to merge 5 commits into
mainfrom
aklatzke/AIC-3408/vercel-adapter

Conversation

@andrewklatzke

Copy link
Copy Markdown
Contributor

Summary

  • Add launchdarkly-ai-vercel-messages and launchdarkly-ai-vercel-agents packages that map LaunchDarkly AI Configs onto the official Python ai runtime and AI Gateway creator/model ids.
  • Execute tool loops, structured output, usage accumulation, and native graph handoffs instead of reading nonexistent stream fields or stopping at the first tool call.
  • Include runnable examples for gateway, injected-OpenAI, and native-graph paths, plus release-please and workspace wiring.

Test plan

  • make format-check && make lint && make typecheck && make test in python/
  • Run uv run python main.py vercel-agents launch-darkly-documentation-summarizer "..." and confirm a non-empty response, non-zero usage, and a judge score
  • Run vercel-messages and vercel-direct success/failure keys from integration-config.json
  • Confirm native-graph-vercel fails cleanly if the Gateway free tier still blocks the graph model

Made with Cursor

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>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread .sdk_metadata.json
Comment thread packages/vercel-messages/src/launchdarkly_ai_vercel_messages/handler.py Outdated
Comment thread packages/vercel-agents/src/launchdarkly_ai_vercel_agents/handler.py Outdated
Use the shared span helpers in production, trace tool execution, and emit provider-compatible strict schemas for messages output.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread packages/vercel-agents/src/launchdarkly_ai_vercel_agents/handler.py
CancelledError is not an Exception, so those spans were ending unmarked or as abandoned. Handoff tools now ignore extra model arguments instead of raising TypeError.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants