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
8 changes: 5 additions & 3 deletions bun.lock

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@ai-sdk/openai": "2.0.80",
"@ai-sdk/react": "2.0.109",
"@ai-sdk/react": "2.0.112",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The direct ai dependency is 5.0.109, but @ai-sdk/react requires 5.0.110. This will cause two versions to be installed, leading to inconsistent behavior.
Severity: HIGH | Confidence: High

🔍 Detailed Analysis

The package.json specifies a direct dependency on ai@5.0.109, while the updated @ai-sdk/react package requires ai@5.0.110. This mismatch will cause the package manager to install both versions. Code that directly imports from ai, such as convertToModelMessages in src/app/api/chat/route.ts, will use version 5.0.109. Meanwhile, components like useChat from @ai-sdk/react will internally use version 5.0.110. This can lead to inconsistent behavior, particularly with features like providerMetadata preservation in tool calls, which was fixed in ai@5.0.105+. Using two different versions simultaneously could cause subtle bugs and data inconsistencies.

💡 Suggested Fix

Update the direct dependency for ai in package.json to match the version required by @ai-sdk/react. Change "ai": "5.0.109" to "ai": "5.0.110" to ensure a single, consistent version is used across the application.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L19

Potential issue: The `package.json` specifies a direct dependency on `ai@5.0.109`, while
the updated `@ai-sdk/react` package requires `ai@5.0.110`. This mismatch will cause the
package manager to install both versions. Code that directly imports from `ai`, such as
`convertToModelMessages` in `src/app/api/chat/route.ts`, will use version `5.0.109`.
Meanwhile, components like `useChat` from `@ai-sdk/react` will internally use version
`5.0.110`. This can lead to inconsistent behavior, particularly with features like
`providerMetadata` preservation in tool calls, which was fixed in `ai@5.0.105+`. Using
two different versions simultaneously could cause subtle bugs and data inconsistencies.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7015606

"@next/third-parties": "16.0.8",
"@radix-ui/react-accordion": "1.2.12",
"@radix-ui/react-collapsible": "1.1.12",
Expand Down
Loading