Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/fresh-parks-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@voltagent/server-hono": patch
---

fix: add Zod v3/v4 compatibility layer for @hono/zod-openapi

- Added dynamic detection of Zod version using `toJSONSchema` method check
- Conditionally loads correct @hono/zod-openapi version based on installed Zod
- Fixed route definitions to use enhanced `z` from zod-openapi-compat instead of extending base schemas
- Resolves `.openapi()` method not found errors when using Zod v4
29 changes: 29 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"mode": "exit",
"tag": "next",
"initialVersions": {
"voltagent-example-github-repo-analyzer": "0.1.0",
"voltagent-example-with-composio-mcp": "0.1.0",
"with-jwt-auth": "1.0.1",
"voltagent-example-with-mcp": "0.1.0",
"voltagent-example-with-nextjs": "0.1.0",
"voltagent-example-with-rag-chatbot": "0.0.1",
"voltagent-example-with-zapier-mcp": "1.0.0",
"@voltagent/cli": "0.1.10",
"@voltagent/core": "1.1.6",
"create-voltagent-app": "0.2.9",
"@voltagent/docs-mcp": "1.0.1",
"@voltagent/internal": "0.0.10",
"@voltagent/langfuse-exporter": "1.1.0",
"@voltagent/libsql": "1.0.2",
"@voltagent/logger": "1.0.1",
"@voltagent/postgres": "1.0.2",
"@voltagent/sdk": "0.1.6",
"@voltagent/server-core": "1.0.6",
"@voltagent/server-hono": "1.0.4",
"@voltagent/supabase": "1.0.1",
"@voltagent/vercel-ai-exporter": "1.0.0",
"@voltagent/voice": "1.0.0"
},
"changesets": ["fresh-parks-exist", "thin-lions-win-2", "thin-lions-win"]
}
27 changes: 27 additions & 0 deletions .changeset/thin-lions-win-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"@voltagent/core": patch
"@voltagent/server-core": patch
---

feat: add Zod v4 support (backwards-compatible with v3)

What’s new

- Core + server now support `zod` v4 while keeping v3 working.
- Peer ranges expanded to `"zod": "^3.25.0 || ^4.0.0"`.
- JSON Schema → Zod conversion handles both versions:
- Uses `zod-from-json-schema@^0.5.0` when Zod v4 is detected.
- Falls back to `zod-from-json-schema@^0.0.5` via alias `zod-from-json-schema-v3` for Zod v3.
- Implemented in MCP client (core) and object handlers (server-core).

Why

- Zod v4 introduces changes that require a version-aware conversion path. This update adds seamless compatibility for both major versions.

Impact

- No breaking changes. Projects on Zod v3 continue to work unchanged. Projects can upgrade to Zod v4 without code changes.

Notes

- If your bundler disallows npm aliasing, ensure it can resolve `zod-from-json-schema-v3` (alias to `zod-from-json-schema@^0.0.5`).
27 changes: 27 additions & 0 deletions .changeset/thin-lions-win.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"@voltagent/server-hono": patch
"@voltagent/docs-mcp": patch
---

feat: add Zod v4 support (backwards-compatible with v3)

What’s new

- Core + server now support `zod` v4 while keeping v3 working.
- Peer ranges expanded to `"zod": "^3.25.0 || ^4.0.0"`.
- JSON Schema → Zod conversion handles both versions:
- Uses `zod-from-json-schema@^0.5.0` when Zod v4 is detected.
- Falls back to `zod-from-json-schema@^0.0.5` via alias `zod-from-json-schema-v3` for Zod v3.
- Implemented in MCP client (core) and object handlers (server-core).

Why

- Zod v4 introduces changes that require a version-aware conversion path. This update adds seamless compatibility for both major versions.

Impact

- No breaking changes. Projects on Zod v3 continue to work unchanged. Projects can upgrade to Zod v4 without code changes.

Notes

- If your bundler disallows npm aliasing, ensure it can resolve `zod-from-json-schema-v3` (alias to `zod-from-json-schema@^0.0.5`).
6 changes: 3 additions & 3 deletions examples/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/github-repo-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@octokit/rest": "^21.0.0",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/sdk-trace-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"author": "",
"dependencies": {
"@voltagent/logger": "^1.0.1",
"@voltagent/sdk": "^0.1.6",
"@voltagent/server-hono": "^1.0.4"
"@voltagent/sdk": "^0.1.7-next.0",
"@voltagent/server-hono": "^1.0.5-next.2"
},
"devDependencies": {
"@types/node": "^24.2.1",
Expand Down
6 changes: 3 additions & 3 deletions examples/with-amazon-bedrock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"@ai-sdk/amazon-bedrock": "^3.0.0",
"@aws-sdk/credential-providers": "~3.799.0",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-anthropic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/anthropic": "^2.0.6",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-chroma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"@chroma-core/ollama": "^0.1.7",
"@chroma-core/openai": "^0.1.7",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"chromadb": "^3.0.4",
"zod": "^3.25.76"
Expand Down
6 changes: 3 additions & 3 deletions examples/with-composio-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-custom-endpoints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-dynamic-parameters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-dynamic-prompts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-google-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/google": "^2.0.13",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-google-vertex-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/google-vertex": "^3.0.25",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-groq-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/groq": "^2.0.18",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-hugging-face-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
9 changes: 9 additions & 0 deletions examples/with-jwt-auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# with-jwt-auth

## 1.0.2-next.0

### Patch Changes

- Updated dependencies [[`77a3f64`](https://github.com/VoltAgent/voltagent/commit/77a3f64dea6e8a06fbbd72878711efa9ceb90bc3)]:
- @voltagent/[email protected]
- @voltagent/[email protected]
- @voltagent/[email protected]

## 1.0.1

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions examples/with-jwt-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "with-jwt-auth",
"version": "1.0.1",
"version": "1.0.2-next.0",
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/core": "^1.1.0",
"@voltagent/libsql": "^1.0.0-next.2",
"@voltagent/core": "^1.1.7-next.0",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.0",
"@voltagent/server-hono": "^1.0.2",
"@voltagent/server-hono": "^1.0.5-next.0",
"ai": "^5.0.12",
"jsonwebtoken": "^9.0.2",
"zod": "^3.25.76"
Expand Down
8 changes: 4 additions & 4 deletions examples/with-langfuse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/langfuse-exporter": "^1.1.0",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/langfuse-exporter": "^1.1.1-next.0",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
6 changes: 3 additions & 3 deletions examples/with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"@libsql/client": "^0.15.0",
"@tailwindcss/postcss": "^4.1.4",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"import-in-the-middle": "^1.14.2",
"next": "15.3.1",
Expand Down
6 changes: 3 additions & 3 deletions examples/with-peaka-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"dependencies": {
"@ai-sdk/openai": "^2.0.2",
"@voltagent/cli": "^0.1.10",
"@voltagent/core": "^1.1.6",
"@voltagent/libsql": "^1.0.2",
"@voltagent/core": "^1.1.7-next.1",
"@voltagent/libsql": "^1.0.3-next.0",
"@voltagent/logger": "^1.0.1",
"@voltagent/server-hono": "^1.0.4",
"@voltagent/server-hono": "^1.0.5-next.2",
"ai": "^5.0.12",
"zod": "^3.25.76"
},
Expand Down
Loading
Loading