Skip to content
Draft
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
239 changes: 88 additions & 151 deletions examples/node/observability-vercel-ai/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/node/observability-vercel-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@opentelemetry/sdk-trace-base": "^1.28.0",
"@opentelemetry/sdk-trace-node": "^1.28.0",
"@opentelemetry/semantic-conventions": "^1.28.0",
"ai": "^4.3.16",
"ai": "^5.0.52",
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 @ai-sdk/openai not bumped to v3.x, incompatible with ai@5.x due to major provider interface mismatch

The ai package is bumped from v4 to v5 (^5.0.52), but @ai-sdk/openai remains at ^1.3.22. These versions are incompatible because they depend on different major versions of the shared @ai-sdk/provider interface:

  • @ai-sdk/openai@1.3.24 depends on @ai-sdk/provider@1.1.3 and @ai-sdk/provider-utils@2.2.8
  • ai@5.0.52 depends on @ai-sdk/provider@2.0.0 and @ai-sdk/provider-utils@3.0.9
Root cause and impact

The model object returned by openai("gpt-4o-mini") from @ai-sdk/openai@1.x implements the @ai-sdk/provider@1.x LanguageModel interface. However, generateText from ai@5.x expects a model conforming to the @ai-sdk/provider@2.x interface. Since @ai-sdk/provider went through a major version bump (1.x → 2.x), the internal contracts between provider and SDK have changed.

The npm registry shows that @ai-sdk/openai v3.x is the version line designed for ai@5.x. The @ai-sdk/openai dependency at examples/node/observability-vercel-ai/package.json:10 should be bumped to ^3.0.0 (or a compatible v3 range) to match the ai@5.x upgrade.

Impact: The example application (app.js:11-27) will fail at runtime when generateText receives an incompatible model object, making this example non-functional.

Prompt for agents
In examples/node/observability-vercel-ai/package.json, bump @ai-sdk/openai from ^1.3.22 to ^3.0.0 (or latest 3.x) on line 10 to match the ai@5.x major version upgrade. The @ai-sdk/openai 1.x line uses @ai-sdk/provider 1.x interfaces which are incompatible with ai 5.x (which uses @ai-sdk/provider 2.x). After updating package.json, regenerate the package-lock.json by running npm install in the examples/node/observability-vercel-ai/ directory.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

"dotenv": "^16.4.7"
}
}