Skip to content

fix: pin AI SDK versions to exact versions for stability - #11

Merged
kwakayama merged 2 commits into
mainfrom
fix/pin-ai-sdk-versions
Dec 10, 2025
Merged

kwakayama merged 2 commits into
mainfrom
fix/pin-ai-sdk-versions

Conversation

@kwakayama

Copy link
Copy Markdown
Contributor

Summary

  • Pin AI SDK dependencies to exact versions for consistent behavior across installations
  • ai: 5.0.76
  • @ai-sdk/openai: 2.0.1
  • @ai-sdk/anthropic: 2.0.1
  • @ai-sdk/react: 2.0.1

Test plan

  • Published veryfront@0.0.66 to npm with pinned versions
  • Verify npm install installs exact versions

Pin ai@5.0.76, @ai-sdk/openai@2.0.1, @ai-sdk/anthropic@2.0.1, @ai-sdk/react@2.0.1
Copilot AI review requested due to automatic review settings December 10, 2025 10:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/build-npm.ts
Comment on lines +554 to +558
// Note: We inject deno-env.ts shim to handle Deno.env.get properly
// Simple replacement doesn't work because Deno.env.get(key) != process.env(key)
"Deno.cwd": "process.cwd",
},
inject: [pathHelper.resolve(PROJECT_ROOT, "src/_shims/deno-env.ts")],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Provide deno-env shim referenced by esbuild inject

The new esbuild config injects src/_shims/deno-env.ts, but that file does not exist anywhere in the repo (rg deno-env only finds this reference and ls src/_shims shows only std shims). Running the scripts/build-npm.ts workflow will now fail when esbuild tries to resolve the injected path, so the npm build/publish pipeline is broken until a shim is added or the inject is removed.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/build-npm.ts
Comment on lines +554 to +558
// Note: We inject deno-env.ts shim to handle Deno.env.get properly
// Simple replacement doesn't work because Deno.env.get(key) != process.env(key)
"Deno.cwd": "process.cwd",
},
inject: [pathHelper.resolve(PROJECT_ROOT, "src/_shims/deno-env.ts")],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Injects missing shim file in npm build

The new esbuild config injects src/_shims/deno-env.ts to handle Deno.env.get, but there is no such file anywhere under src/_shims (only std-front-matter.ts, std-fs.ts, std-path.ts). When scripts/build-npm.ts runs, esbuild will fail resolving the injected path before bundling, breaking the npm package build rather than improving stability.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR pins AI SDK dependencies to exact versions for consistent behavior across installations. The main changes update four AI SDK packages from version ranges to specific versions: ai@5.0.76, @ai-sdk/openai@2.0.1, @ai-sdk/anthropic@2.0.1, and @ai-sdk/react@2.0.1.

Key changes:

  • Removed semver ranges (e.g., ^5.0.0) in favor of exact version specifications
  • Updated version to 0.0.66 in both npm/package.json and deno.json
  • Added unrelated build configuration changes for Deno environment handling

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
scripts/build-npm.ts Pins AI SDK versions to exact values and adds deno-env.ts shim injection (unrelated to version pinning)
npm/package.json Updates package version to 0.0.66 and pins AI SDK dependencies to exact versions
deno.json Updates package version to 0.0.66 and pins AI SDK import URLs to exact versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/build-npm.ts
// Simple replacement doesn't work because Deno.env.get(key) != process.env(key)
"Deno.cwd": "process.cwd",
},
inject: [pathHelper.resolve(PROJECT_ROOT, "src/_shims/deno-env.ts")],

Copilot AI Dec 10, 2025

Copy link

Choose a reason for hiding this comment

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

The injected file src/_shims/deno-env.ts does not exist in the repository. This will cause the build to fail. Either create this file or remove the inject configuration if it's not needed for this PR.

Copilot uses AI. Check for mistakes.
Comment thread deno.json
Comment on lines +113 to +114
"ai/react": "https://esm.sh/@ai-sdk/react@2.0.1?deps=react@18.3.1,react-dom@18.3.1",
"@ai-sdk/react": "https://esm.sh/@ai-sdk/react@2.0.1?deps=react@18.3.1,react-dom@18.3.1",

Copilot AI Dec 10, 2025

Copy link

Choose a reason for hiding this comment

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

This change downgrades @ai-sdk/react from version 2.0.59 to 2.0.1. While pinning to exact versions provides stability, downgrading may lose bug fixes and features from versions 2.0.2 through 2.0.59. Consider pinning to a more recent version (e.g., 2.0.59) unless there's a specific compatibility issue.

Suggested change
"ai/react": "https://esm.sh/@ai-sdk/react@2.0.1?deps=react@18.3.1,react-dom@18.3.1",
"@ai-sdk/react": "https://esm.sh/@ai-sdk/react@2.0.1?deps=react@18.3.1,react-dom@18.3.1",
"ai/react": "https://esm.sh/@ai-sdk/react@2.0.59?deps=react@18.3.1,react-dom@18.3.1",
"@ai-sdk/react": "https://esm.sh/@ai-sdk/react@2.0.59?deps=react@18.3.1,react-dom@18.3.1",

Copilot uses AI. Check for mistakes.
Comment thread deno.json
"@ai-sdk/react": "https://esm.sh/@ai-sdk/react@2.0.1?deps=react@18.3.1,react-dom@18.3.1",
"@ai-sdk/openai": "https://esm.sh/@ai-sdk/openai@2.0.1",
"@ai-sdk/anthropic": "https://esm.sh/@ai-sdk/anthropic@2.0.4",
"@ai-sdk/anthropic": "https://esm.sh/@ai-sdk/anthropic@2.0.1",

Copilot AI Dec 10, 2025

Copy link

Choose a reason for hiding this comment

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

This change downgrades @ai-sdk/anthropic from version 2.0.4 to 2.0.1. While pinning to exact versions provides stability, downgrading may lose bug fixes and features from versions 2.0.2 through 2.0.4. Consider pinning to a more recent version (e.g., 2.0.4) unless there's a specific compatibility issue.

Suggested change
"@ai-sdk/anthropic": "https://esm.sh/@ai-sdk/anthropic@2.0.1",
"@ai-sdk/anthropic": "https://esm.sh/@ai-sdk/anthropic@2.0.4",

Copilot uses AI. Check for mistakes.
@kwakayama
kwakayama merged commit 23c9c01 into main Dec 10, 2025
1 check passed
@kwakayama
kwakayama deleted the fix/pin-ai-sdk-versions branch December 10, 2025 11:09
@kwakayama
kwakayama restored the fix/pin-ai-sdk-versions branch December 10, 2025 13:07
@kwakayama
kwakayama deleted the fix/pin-ai-sdk-versions branch December 10, 2025 13:07
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.

2 participants