Skip to content

Upgrade dependencies to latest (AI SDK v7) and keep GLM 4.6 + Qwen 3 working (#47) - #51

Merged
hbmartin merged 6 commits into
mainfrom
claude/issue-47-feature-rc5ncq
Oct 12, 2026
Merged

hbmartin merged 6 commits into
mainfrom
claude/issue-47-feature-rc5ncq

Conversation

@hbmartin

@hbmartin hbmartin commented Jul 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Issue #47 asks for GLM 4.6 (Z.ai) and Qwen 3 (Alibaba Cloud) support. Those providers already exist in the tree — ZaiProvider (GLM 4.6 / 4.5 / 4.5 Air) and QwenProvider (Qwen3 Max / Qwen3 Coder Plus / Qwen Plus / Qwen Turbo) — and both are registered in allProviders, exported, documented, and covered by tests/providers.qwenZai.test.ts.

They already do the right thing per the request: each re-uses an existing AI SDK provider (@ai-sdk/openai-compatible, the AI-SDK-recommended path for the OpenAI-compatible DashScope and Z.ai endpoints) and makes no direct API calls. Purpose-built community packages (qwen-ai-provider, zhipu-ai-provider) were evaluated and rejected — they are version-misaligned with this project's AI SDK (one still targets @ai-sdk/provider v1 / LanguageModelV1).

So the substance of this PR is bringing the whole dependency stack up to latest so those providers (and the rest of the library) keep working on current tooling, then verifying the result end-to-end.

Dependency upgrades

  • AI SDK v5 → v7: ai, @ai-sdk/provider (v2 → v4), and every @ai-sdk/* provider, plus @openrouter/ai-sdk-provider, ollama-ai-provider-v2, and ai-sdk-provider-claude-code. v7 providers now emit LanguageModelV4 (specificationVersion: "v4"), so the createInstance contract was renamed LanguageModelV2 → LanguageModelV4 across the base class, all 16 providers, and getSdkLanguageModel. Peer floors were raised to the majors that emit LanguageModelV4.
  • React toolchain: React 19.2.7, react-hook-form 7.81, Vite 8, Vitest 4, @vitejs/plugin-react 6, vite-plugin-dts 5 (rollupTypes → bundleTypes, now needs @microsoft/api-extractor), jsdom 29, Testing Library, prettier 3.9.
  • Linting: ESLint 10, typescript-eslint 8.64, unicorn 71, react-hooks 7, sonarjs 4. Migrated eslint-plugin-import → eslint-plugin-import-x because the former's latest (2.32.0) crashes on ESLint 10 (its order rule calls the removed sourceCode.getTokenOrCommentBefore API).
  • Storybook 9 → 10 (all addons + eslint-plugin-storybook), which also cleared most pnpm audit findings.

Deliberate holds and decisions

  • TypeScript stays on 5.9.x. typescript-eslint's latest still pins its peer to typescript ">=4.8.4 <6.1.0", so TypeScript 7 would break the lint pass.
  • Tailwind stays on 3.x (3.4.19). The library ships a JS tailwind-preset as public API; Tailwind 4's CSS-first rewrite would be a breaking change for consumers and a rewrite of the theming / VSCode-integration layer — out of scope for a dependency bump and best decided on its own.
  • pnpm-workspace.yaml added. pnpm 11 no longer reads settings from the package.json pnpm field. It carries a rollup security override (dev/build tooling only — nothing overridden ships in the published package), an explicit build-script opt-out, and minimumReleaseAge: 0.
  • ⚠️ Breaking for consumers: the AI SDK peer ranges now require the provider majors that emit LanguageModelV4, and createInstance returns LanguageModelV4. Consumers must be on AI SDK v7-era providers. Suggest a minor version bump on the next release (left for the maintainer's np flow).

Verification

Every CI gate passes locally against the upgraded tree:

check result
tsc -b (typecheck) ✅
eslint . ✅
prettier --check ✅
vitest (34 passed, 4 skipped) ✅
vite build + packaging (publint + attw) ✅
pnpm audit --audit-level=moderate ✅ no known vulnerabilities
pnpm install --frozen-lockfile ✅
storybook build ✅

Docs, the package description, and the Storybook intro were updated from "AI SDK v5 / LanguageModelV2" to "AI SDK v7 / LanguageModelV4".

Closes #47

🤖 Generated with Claude Code

https://claude.ai/code/session_015oj8aXYorx82K6sUbvK258


Generated by Claude Code

Review in cubic

claude added 4 commits July 15, 2026 00:46
Bump ai, @ai-sdk/* providers, @openrouter/ai-sdk-provider,
ollama-ai-provider-v2, and ai-sdk-provider-claude-code to their latest
majors. AI SDK v7 providers now emit LanguageModelV4 (specificationVersion
"v4"), so rename the LanguageModelV2 contract to LanguageModelV4 across the
provider base class, all 16 providers, and getSdkLanguageModel.

Raise peerDependency floors for the AI SDK provider packages to the majors
that produce LanguageModelV4, keeping the picker's createInstance contract
consistent with a consumer's AI SDK v7 runtime. Providers continue to reuse
the official AI SDK provider packages (no direct API calls).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015oj8aXYorx82K6sUbvK258
Bump the build/test toolchain and linting stack to their latest versions:

- React 19.2.7, react-hook-form 7.81
- Vite 8, Vitest 4, @vitejs/plugin-react 6, vite-plugin-dts 5, jsdom 29,
  Testing Library, prettier 3.9
- vite-plugin-dts v5 renamed rollupTypes -> bundleTypes and now needs
  @microsoft/api-extractor as an explicit dependency
- ESLint 10, typescript-eslint 8.64, eslint-plugin-unicorn 71,
  eslint-plugin-react-hooks 7, eslint-plugin-sonarjs 4

Migrate eslint-plugin-import -> eslint-plugin-import-x: the former's latest
(2.32.0) crashes on ESLint 10 (its order rule calls the removed
sourceCode.getTokenOrCommentBefore API); import-x is the maintained,
flat-config-native, ESLint 10-compatible successor.

Keep TypeScript on 5.9.x: typescript-eslint's latest still caps its peer at
"<6.1.0", so TypeScript 7 would break the lint pass.

Adjust eslint.config.ts for the upgrades: type-cast the plugin configs that
ESLint 10's stricter defineConfig types reject, and disable the opinionated
rules newly enabled by unicorn 71 / sonarjs 4 (several would rename public
API) to keep this an upgrade rather than a refactor. Address the few genuine
findings that remain: attach `cause` to rethrown errors (ESLint 10
preserve-caught-error), mark ListboxOption props read-only, and drop an
unused React import.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015oj8aXYorx82K6sUbvK258
- Upgrade Storybook and its addons (react-vite, addon-docs,
  addon-onboarding, addon-vitest) and eslint-plugin-storybook to 10.5.0.
  This also clears the bulk of the `pnpm audit` findings, which came from
  Storybook 9's transitive tree.
- Bump Tailwind to the latest 3.x (3.4.19). Tailwind is intentionally kept
  on v3: the library ships a JS `tailwind-preset` as public API, and v4's
  CSS-first rewrite would be a breaking change for consumers and a full
  rewrite of the theming/VSCode-integration layer — out of scope for a
  dependency upgrade and best decided separately.
- Add pnpm-workspace.yaml (pnpm 11 no longer reads settings from the
  package.json "pnpm" field) with a rollup override for the last remaining
  advisory. All overridden packages are dev/build tooling and none ship in
  the published package.

TypeScript is likewise held at 5.9.x because typescript-eslint's latest
still caps its peer at "<6.1.0"; TypeScript 7 would break linting.

`pnpm audit --audit-level=moderate` now reports no known vulnerabilities.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015oj8aXYorx82K6sUbvK258
Reflect the upgraded AI SDK in user-facing text: the picker now targets
AI SDK v7 and its createInstance contract returns LanguageModelV4. Updates
the README, package description, basics guide, provider base-class comment,
and the Storybook intro.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015oj8aXYorx82K6sUbvK258
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 15, 2026
@superagent-security

Copy link
Copy Markdown

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d14c331d-792d-47f5-9cba-23eac774aaac

📥 Commits

Reviewing files that changed from the base of the PR and between 3136340 and 72d64a7.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/deploy-storybook.yml
  • .github/workflows/publish.yml
📝 Walkthrough

Walkthrough

This PR updates the package for Vercel AI SDK v7. Provider factory contracts and getSdkLanguageModel now use LanguageModelV4, while provider dependency ranges are upgraded. ESLint is migrated to eslint-plugin-import-x, the toolchain and workspace settings are refreshed, and declaration bundling uses bundleTypes. Several typings, lint suppressions, URL error causes, tests, and documentation are also updated.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed AI SDK v7 provider updates and preserved Z AI/Qwen support address the linked request.
Out of Scope Changes check ✅ Passed The dependency, tooling, and config changes align with the stated upgrade objective, so no unrelated changes stand out.
Title check ✅ Passed The title accurately summarizes the main change: a dependency upgrade to AI SDK v7 while preserving GLM 4.6 and Qwen 3 support.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-47-feature-rc5ncq

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @emnapi/runtime is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yaml → npm/vite-plugin-dts@5.0.3 → npm/vite@8.1.4 → npm/@emnapi/runtime@1.11.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@emnapi/runtime@1.11.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm @storybook/addon-onboarding is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package.json → npm/@storybook/addon-onboarding@10.5.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@storybook/addon-onboarding@10.5.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm css-tree is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yaml → npm/jsdom@29.1.1 → npm/css-tree@3.2.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/css-tree@3.2.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm data-urls is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yaml → npm/jsdom@29.1.1 → npm/data-urls@7.0.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/data-urls@7.0.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm es-abstract is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yaml → npm/eslint-import-resolver-typescript@4.4.5 → npm/eslint-plugin-import-x@4.17.1 → npm/eslint-plugin-react@7.37.5 → npm/es-abstract@1.24.2

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/es-abstract@1.24.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm jsdom is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package.json → npm/jsdom@29.1.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/jsdom@29.1.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm jsdom is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package.json → npm/jsdom@29.1.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/jsdom@29.1.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Low adoption: npm @humanfs/types

Location: Package overview

From: pnpm-lock.yaml → npm/eslint@10.7.0 → npm/@humanfs/types@0.15.0

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@humanfs/types@0.15.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Low adoption: npm node-exports-info

Location: Package overview

From: pnpm-lock.yaml → npm/eslint-import-resolver-typescript@4.4.5 → npm/eslint-plugin-import-x@4.17.1 → npm/eslint-plugin-react@7.37.5 → npm/node-exports-info@1.6.2

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/node-exports-info@1.6.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

claude added 2 commits July 15, 2026 01:42
pnpm's latest release (installed via pnpm/action-setup version: latest)
requires Node.js >=22.13 and crashes on Node 20 (`node:sqlite` is not a
built-in there), which fails the install step before any check runs. Bump
the CI, publish, and storybook workflows from Node 20 to Node 22.

The library's own engines.node stays at ">=20" — this only changes the
Node version used to build and test the package.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015oj8aXYorx82K6sUbvK258
pnpm 11 removed the `--no-save` flag from `pnpm add`, so the compatibility
job failed with ERR_PNPM_OPTION_NOT_SUPPORTED. Switch to
`pnpm update --latest` for the three providers, which pulls the newest
releases and matches the step's intent without the unsupported flag.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015oj8aXYorx82K6sUbvK258

@superagent-security superagent-security 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.

Superagent found 2 security concern(s) in this PR.

uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0: Publish workflow caches pnpm, enabling cache poisoning into releases

The setup-node step at line 30 and the publish-npm job at line 82 both use cache: 'pnpm'. In a publish workflow triggered by releases, this enables cache poisoning where a compromised cache from another workflow run could inject malicious build artifacts into the release.

Remove cache: 'pnpm' from all setup-node steps in publish.yml.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name=".github/workflows/publish.yml">
<violation number="1" location=".github/workflows/publish.yml:30">
<priority>P0</priority>
<title>Publish workflow caches pnpm, enabling cache poisoning into releases</title>
<evidence>The publish.yml workflow runs on release events and uses cache: 'pnpm' in setup-node actions for both the quality-checks and publish-npm jobs. This enables cache poisoning, where a compromised cache from another workflow run could inject malicious build artifacts into the release.</evidence>
<recommendation>Remove the cache: 'pnpm' input from all actions/setup-node steps in .github/workflows/publish.yml. Continue using pnpm install --frozen-lockfile without the setup-node cache in release workflows.</recommendation>
</violation>
</file>

uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

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: Missing deployment environment on NPM publish job

The publish-npm job does not declare an environment block, bypassing environment-protection rules for releases.

Add environment: { name: npm } to the publish-npm job after runs-on.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name=".github/workflows/publish.yml">
<violation number="1" location=".github/workflows/publish.yml:66">
<priority>P1</priority>
<title>Missing deployment environment on NPM publish job</title>
<evidence>The publish-npm job in .github/workflows/publish.yml publishes packages to the NPM registry but does not declare an environment block. Without a deployment environment, release credentials and deployments are not gated by environment protection rules.</evidence>
<recommendation>Add an environment block to the publish-npm job, e.g. environment: { name: npm }. This enables environment protection rules and scoped secrets for releases.</recommendation>
</violation>
</file>

@superagent-security superagent-security Bot added the pr:flagged Superagent PR security flagged label Jul 15, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 102-113: Add `@ai-sdk/provider` to the package.json peerDependencies
alongside the existing AI SDK provider entries, ensuring the public
LanguageModelV4 type has an explicitly declared consumer dependency while
preserving the existing versioning conventions.

In `@pnpm-workspace.yaml`:
- Around line 11-13: Replace the global minimumReleaseAge: 0 setting in
pnpm-workspace.yaml with the pnpm minimumReleaseAgeExclude configuration scoped
to rollup, preserving the ability to install the patched rollup release
immediately while retaining the default release-age protection for all other
dependencies.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 36031217-9257-4326-9f19-029d1fcd4473

📥 Commits

Reviewing files that changed from the base of the PR and between c72e1ad and 3136340.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (32)
  • README.md
  • docs/basics.md
  • eslint.config.ts
  • package.json
  • pnpm-workspace.yaml
  • src/lib/components/ModelSelect.tsx
  • src/lib/components/ProviderSelectionListbox.tsx
  • src/lib/components/ui/Listbox.tsx
  • src/lib/context/index.ts
  • src/lib/providers/AnthropicProvider.ts
  • src/lib/providers/AzureProvider.ts
  • src/lib/providers/BedrockProvider.ts
  • src/lib/providers/ClaudeCodeProvider.ts
  • src/lib/providers/CohereProvider.ts
  • src/lib/providers/DeepseekProvider.ts
  • src/lib/providers/GoogleProvider.ts
  • src/lib/providers/LmStudioProvider.ts
  • src/lib/providers/MistralProvider.ts
  • src/lib/providers/MoonshotProvider.ts
  • src/lib/providers/OllamaProvider.ts
  • src/lib/providers/OpenAIProvider.ts
  • src/lib/providers/OpenRouterProvider.ts
  • src/lib/providers/QwenProvider.ts
  • src/lib/providers/ZaiProvider.ts
  • src/lib/providers/configuration.ts
  • src/lib/storage/modelRepository.ts
  • src/lib/types/index.ts
  • src/lib/utils/index.ts
  • stories/Introduction.stories.tsx
  • tests/catalog.modelCatalog.test.ts
  • tests/hooks.useModelsWithConfiguredProvider.test.tsx
  • vite.config.ts
💤 Files with no reviewable changes (1)
  • src/lib/components/ModelSelect.tsx

Comment thread package.json
Comment on lines +102 to +113
"@ai-sdk/amazon-bedrock": ">=5.0.0",
"@ai-sdk/anthropic": ">=4.0.0",
"@ai-sdk/azure": ">=4.0.0",
"@ai-sdk/cohere": ">=4.0.0",
"@ai-sdk/deepseek": ">=3.0.0",
"@ai-sdk/google": ">=4.0.0",
"@ai-sdk/mistral": ">=4.0.0",
"@ai-sdk/openai": ">=4.0.0",
"@ai-sdk/openai-compatible": ">=3.0.0",
"@openrouter/ai-sdk-provider": ">=3.0.0",
"ai-sdk-provider-claude-code": ">=4.0.0 <5.0.0",
"ollama-ai-provider-v2": ">=4.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check whether `@ai-sdk/provider` is declared anywhere in package.json peerDependencies/dependencies
jq '.peerDependencies, .dependencies' package.json
# Inspect the generated bundled .d.ts (if present) for unresolved `@ai-sdk/provider` imports
fd -e ts -e d.ts . dist 2>/dev/null | xargs -r rg -n "`@ai-sdk/provider`"

Repository: hbmartin/ai-sdk-react-model-picker

Length of output: 696


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== package.json: relevant sections =="
jq '{peerDependencies, dependencies, devDependencies}' package.json

echo
echo "== vite.config.ts =="
sed -n '1,220p' vite.config.ts

echo
echo "== source references to `@ai-sdk/provider` / LanguageModelV4 =="
rg -n "`@ai-sdk/provider`|LanguageModelV4" .

Repository: hbmartin/ai-sdk-react-model-picker

Length of output: 10567


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== package.json around line 110-130 =="
sed -n '110,130p' package.json

echo
echo "== package.json around line 160-180 =="
sed -n '160,180p' package.json

echo
echo "== public type exports =="
sed -n '1,220p' src/lib/index.ts

echo
echo "== tsconfig.app.json =="
sed -n '1,220p' tsconfig.app.json

Repository: hbmartin/ai-sdk-react-model-picker

Length of output: 5076


🌐 Web query:

vite-plugin-dts bundleTypes unresolved external type imports bundledPackages behavior

💡 Result:

In vite-plugin-dts, the bundleTypes option (previously often referred to as rollupTypes in older versions) enables type bundling by leveraging @microsoft/api-extractor [1][2][3]. When this feature is enabled, the plugin attempts to consolidate type definitions into a single file per entry point [1]. Regarding unresolved external type imports and bundledPackages behavior: 1. Handling of External Types: By default, @microsoft/api-extractor treats external packages (found in node_modules) as external dependencies [4]. This means they are not bundled into your declaration file but are instead referenced via import statements in the generated.d.ts files [1][4]. 2. The Role of bundledPackages: The bundledPackages option in vite-plugin-dts allows you to specify a list of package names that should be bundled (inlined) directly into your declaration file instead of being treated as external references [3][5][6]. This is useful when you want to include transitive type dependencies or specific internal monorepo packages within your bundled output [7]. 3. Unresolved Types and Internal Errors: When using bundleTypes: true, you may encounter "Unable to follow symbol" or "Internal Error" messages [1]. - Common Causes: These often arise from non-standard path aliases in your tsconfig.json, complex cross-file re-exports, or internal types generated by frameworks (e.g., Vue's VLS_EmitsToProps) that api-extractor cannot resolve [1]. - Plugin Mitigation: For certain known issues, such as internal Vue types, the plugin attempts to replace unresolved types with empty objects ({}) to prevent the build from failing [1]. - Recommendations: For libraries with multiple entry points that share significant internal code, it is generally recommended to avoid bundleTypes: true, as it processes each entry independently, which can lead to duplication of shared types in every output file [1]. Instead, leaving bundleTypes disabled allows the plugin to maintain the original module structure, which is typically more efficient for multi-entry projects [1]. To configure bundledPackages, you provide an array of strings corresponding to the package names you wish to inline: { plugins: [ dts({ bundleTypes: true, bundledPackages: ['my-internal-lib'] }) ] } [3][6]

Citations:


Add @ai-sdk/provider to peerDependencies in package.json:102-113. LanguageModelV4 is part of the public API, so leaving it only in devDependencies can leave consumer .d.ts resolution depending on an undeclared transitive install.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 102 - 113, Add `@ai-sdk/provider` to the
package.json peerDependencies alongside the existing AI SDK provider entries,
ensuring the public LanguageModelV4 type has an explicitly declared consumer
dependency while preserving the existing versioning conventions.

Comment thread pnpm-workspace.yaml
Comment on lines +11 to +13
# Install security patches immediately instead of pnpm 11's staged-release
# delay, so the transitive override below can resolve to the patched release.
minimumReleaseAge: 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Scope the release-age exemption to rollup pnpm-workspace.yaml:11-13
minimumReleaseAge: 0 disables pnpm’s 24h supply-chain protection for every dependency. Use minimumReleaseAgeExclude for the patched rollup release instead.

Suggested change
-# Install security patches immediately instead of pnpm 11's staged-release
-# delay, so the transitive override below can resolve to the patched release.
-minimumReleaseAge: 0
+# Keep pnpm's 24h staged-release delay, but let the patched rollup release through.
+minimumReleaseAgeExclude:
+  - rollup
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Install security patches immediately instead of pnpm 11's staged-release
# delay, so the transitive override below can resolve to the patched release.
minimumReleaseAge: 0
# Keep pnpm's 24h staged-release delay, but let the patched rollup release through.
minimumReleaseAgeExclude:
- rollup
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm-workspace.yaml` around lines 11 - 13, Replace the global
minimumReleaseAge: 0 setting in pnpm-workspace.yaml with the pnpm
minimumReleaseAgeExclude configuration scoped to rollup, preserving the ability
to install the patched rollup release immediately while retaining the default
release-age protection for all other dependencies.

@hbmartin
hbmartin merged commit 5f2ac3c into main Oct 12, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. pr:flagged Superagent PR security flagged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Z AI and Alibaba Cloud

2 participants