Skip to content

Conversation

@omeraplak
Copy link
Member

@omeraplak omeraplak commented Dec 27, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

What is the new behavior?

fixes (issue)

Notes for reviewers


Summary by cubic

Upgrade VoltAgent to AI SDK v6 across core and examples. Aligns APIs, updates tests/docs, adds a PlanAgents quickstart, tool approval, and automatic summarization with better observability.

  • New Features

    • PlanAgents example with planning, filesystem tools, subagents, and an observability demo.
    • Tool approval support: preserve approval metadata in messages and buffer; tools can require approval.
    • Message normalizer: filters incomplete tool calls and preserves approval/tool metadata.
    • Observability and summarization: maps new usage fields and emits “summary” spans from automatic conversation summarization.
  • Migration

    • Dependencies: ai ^6.0.0, @ai-sdk/* ^3.0.0, @ai-sdk/provider-utils ^4.x.
    • Tests: switch MockLanguageModelV2 → MockLanguageModelV3; update usage and finishReason shapes.
    • API updates: openai.textEmbeddingModel → openai.embeddingModel; convertToModelMessages is async; guardrail text extractors are async.
    • Types: ToolCallOptions → ToolExecutionOptions; adopt Tool, ToolChoice, and Warning from the SDK.

Written for commit 5408cc6. Summary will update automatically on new commits.

@changeset-bot
Copy link

changeset-bot bot commented Dec 27, 2025

🦋 Changeset detected

Latest commit: 5408cc6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@voltagent/voltagent-memory Major
@voltagent/server-core Major
@voltagent/postgres Major
@voltagent/supabase Major
@voltagent/scorers Major
@voltagent/libsql Major
@voltagent/core Major
@voltagent/a2a-server Major
@voltagent/ag-ui Major
@voltagent/docs-mcp Major
@voltagent/evals Major
@voltagent/internal Major
@voltagent/langfuse-exporter Major
@voltagent/logger Major
@voltagent/mcp-server Major
@voltagent/rag Major
@voltagent/sdk Major
@voltagent/server-hono Major
@voltagent/serverless-hono Major
@voltagent/voice Major
example-with-live-evals Patch
ai-ad-generator Patch
assistant-ui-starter Patch
with-jwt-auth Patch
voltagent-with-copilotkit-server Patch
@voltagent/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@joggrbot

This comment has been minimized.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 27, 2025

Deploying voltagent with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5408cc6
Status: ✅  Deploy successful!
Preview URL: https://34220443.voltagent.pages.dev
Branch Preview URL: https://feat-ai-sdk-v6.voltagent.pages.dev

View logs

@omeraplak omeraplak linked an issue Dec 27, 2025 that may be closed by this pull request
@omeraplak omeraplak marked this pull request as ready for review December 29, 2025 03:04
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 156 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="examples/with-planagents/package.json">

<violation number="1" location="examples/with-planagents/package.json:9">
P3: Dependency versions are inconsistent with other examples. Consider updating `@voltagent/core` to `^1.5.2` and `@voltagent/libsql` to `^1.1.0` to match other examples in the repository.</violation>
</file>

<file name="examples/with-planagents/src/index.ts">

<violation number="1" location="examples/with-planagents/src/index.ts:74">
P2: Using `void` suppresses TypeScript warnings but doesn&#39;t handle errors. If `runSummaryDemo()` fails (file not found, API errors), it will cause an unhandled promise rejection. Consider adding error handling.</violation>
</file>

<file name="examples/with-planagents/src/tools.ts">

<violation number="1" location="examples/with-planagents/src/tools.ts:37">
P2: Missing error handling for `tavilySearch.invoke()`. This API call can throw errors (network failures, rate limits, API errors) that will propagate unhandled. Wrap in try-catch for consistent error handling, similar to the pattern in `examples/with-tavily-search/src/tools.ts`.</violation>
</file>

Reply to cubic to teach it or ask questions. Tag @cubic-dev-ai to re-run a review.

"@ai-sdk/openai": "^3.0.0",
"@langchain/tavily": "^0.1.0",
"@voltagent/cli": "^0.1.17",
"@voltagent/core": "^1.5.1",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 29, 2025

Choose a reason for hiding this comment

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

P3: Dependency versions are inconsistent with other examples. Consider updating @voltagent/core to ^1.5.2 and @voltagent/libsql to ^1.1.0 to match other examples in the repository.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At examples/with-planagents/package.json, line 9:

<comment>Dependency versions are inconsistent with other examples. Consider updating `@voltagent/core` to `^1.5.2` and `@voltagent/libsql` to `^1.1.0` to match other examples in the repository.</comment>

<file context>
@@ -0,0 +1,29 @@
+    &quot;@ai-sdk/openai&quot;: &quot;^3.0.0&quot;,
+    &quot;@langchain/tavily&quot;: &quot;^0.1.0&quot;,
+    &quot;@voltagent/cli&quot;: &quot;^0.1.17&quot;,
+    &quot;@voltagent/core&quot;: &quot;^1.5.1&quot;,
+    &quot;@voltagent/libsql&quot;: &quot;^1.0.14&quot;,
+    &quot;@voltagent/logger&quot;: &quot;^1.0.4&quot;,
</file context>
Fix with Cubic

);
};

void runSummaryDemo();
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 29, 2025

Choose a reason for hiding this comment

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

P2: Using void suppresses TypeScript warnings but doesn't handle errors. If runSummaryDemo() fails (file not found, API errors), it will cause an unhandled promise rejection. Consider adding error handling.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At examples/with-planagents/src/index.ts, line 74:

<comment>Using `void` suppresses TypeScript warnings but doesn&#39;t handle errors. If `runSummaryDemo()` fails (file not found, API errors), it will cause an unhandled promise rejection. Consider adding error handling.</comment>

<file context>
@@ -0,0 +1,74 @@
+  );
+};
+
+void runSummaryDemo();
</file context>
Fix with Cubic

topic,
});

return await tavilySearch.invoke({ query });
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 29, 2025

Choose a reason for hiding this comment

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

P2: Missing error handling for tavilySearch.invoke(). This API call can throw errors (network failures, rate limits, API errors) that will propagate unhandled. Wrap in try-catch for consistent error handling, similar to the pattern in examples/with-tavily-search/src/tools.ts.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At examples/with-planagents/src/tools.ts, line 37:

<comment>Missing error handling for `tavilySearch.invoke()`. This API call can throw errors (network failures, rate limits, API errors) that will propagate unhandled. Wrap in try-catch for consistent error handling, similar to the pattern in `examples/with-tavily-search/src/tools.ts`.</comment>

<file context>
@@ -0,0 +1,39 @@
+      topic,
+    });
+
+    return await tavilySearch.invoke({ query });
+  },
+});
</file context>
Fix with Cubic

@omeraplak omeraplak merged commit ee05549 into main Dec 30, 2025
22 checks passed
@omeraplak omeraplak deleted the feat/ai-sdk-v6 branch December 30, 2025 01:16
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.

[FEAT]Support Vercel AI SDK 6

2 participants