Skip to content
Closed
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
2 changes: 1 addition & 1 deletion packages/opencode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@ai-sdk/provider-utils": "3.0.21",
"@ai-sdk/togetherai": "1.0.34",
"@ai-sdk/vercel": "1.0.33",
"@ai-sdk/xai": "2.0.51",
"@ai-sdk/xai": "3.0.67",
Copy link

Choose a reason for hiding this comment

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

Bug: The update to @ai-sdk/xai creates a major version mismatch with its dependency @ai-sdk/provider-utils, which will cause a runtime error when the xAI provider is used.
Severity: HIGH

Suggested Fix

Update the dependencies in package.json to match the requirements of the new @ai-sdk/xai version. Specifically, upgrade @ai-sdk/provider-utils to a compatible v4+ version and @ai-sdk/openai-compatible to a compatible v2+ version, as recommended by the AI SDK migration guides.

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: packages/altimate-code/package.json#L70

Potential issue: The pull request updates the `@ai-sdk/xai` package to version `3.0.67`
but fails to update its peer dependencies. Specifically, `@ai-sdk/xai` v3 requires
`@ai-sdk/provider-utils` v4+, but the project's `package.json` still specifies version
`3.0.21`. If the application is built and deployed despite this conflict, any attempt to
use a model with the xAI provider will call the `createXai` function. This function will
then attempt to use APIs from `@ai-sdk/provider-utils` that do not exist in the older
version, leading to a runtime error due to missing methods or type incompatibilities.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link

Choose a reason for hiding this comment

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

Bug: The update to @ai-sdk/xai@3.0.67 creates a dependency mismatch with @ai-sdk/openai-compatible and @ai-sdk/provider-utils, which will cause runtime errors when using xAI models.
Severity: HIGH

Suggested Fix

Update package.json to use compatible versions of the peer dependencies. Upgrade @ai-sdk/openai-compatible to a 2.x version (e.g., 2.0.35) and @ai-sdk/provider-utils to a 4.x version (e.g., 4.0.19) to match the requirements of @ai-sdk/xai@3.0.67. Then, regenerate the lockfile.

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: packages/opencode/package.json#L71

Potential issue: The `package.json` is updated to use `@ai-sdk/xai@3.0.67`, a major
version bump. However, its peer dependencies, `@ai-sdk/openai-compatible` and
`@ai-sdk/provider-utils`, are not updated and remain pinned to older, incompatible major
versions (`1.0.32` and `3.0.21` respectively). The new version of `@ai-sdk/xai` requires
version `2.x` of `@ai-sdk/openai-compatible` and `4.x` of `@ai-sdk/provider-utils`. This
mismatch in major versions indicates breaking API changes. When a user selects an xAI
model, the `createXai` function will be called, leading to a runtime error or crash due
to incompatible API contracts between the packages.

"@aws-sdk/credential-providers": "3.993.0",
"@clack/prompts": "1.0.0-alpha.1",
"@gitlab/gitlab-ai-provider": "3.6.0",
Expand Down
Loading