Upgrade dependencies to latest (AI SDK v7) and keep GLM 4.6 + Qwen 3 working (#47)
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, andai-sdk-provider-claude-code. v7 providers now emitLanguageModelV4(specificationVersion: "v4"), so thecreateInstancecontract was renamedLanguageModelV2 → LanguageModelV4across the base class, all 16 providers, andgetSdkLanguageModel. Peer floors were raised to the majors that emitLanguageModelV4. - React toolchain: React 19.2.7, react-hook-form 7.81, Vite 8, Vitest 4,
@vitejs/plugin-react6,vite-plugin-dts5 (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-xbecause the former's latest (2.32.0) crashes on ESLint 10 (itsorderrule calls the removedsourceCode.getTokenOrCommentBeforeAPI). - Storybook 9 → 10 (all addons +
eslint-plugin-storybook), which also cleared mostpnpm auditfindings.
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-presetas 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.yamladded. pnpm 11 no longer reads settings from the package.jsonpnpmfield. It carries arollupsecurity override (dev/build tooling only — nothing overridden ships in the published package), an explicit build-script opt-out, andminimumReleaseAge: 0.- ⚠️ Breaking for consumers: the AI SDK peer ranges now require the provider majors that emit
LanguageModelV4, andcreateInstancereturnsLanguageModelV4. Consumers must be on AI SDK v7-era providers. Suggest a minor version bump on the next release (left for the maintainer'snpflow).
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