Skip to content

chore: migrate AI SDK v7 compatibility#110

Merged
kimhongyeon merged 3 commits into
mainfrom
chore/deps
Jul 5, 2026
Merged

chore: migrate AI SDK v7 compatibility#110
kimhongyeon merged 3 commits into
mainfrom
chore/deps

Conversation

@kimhongyeon

Copy link
Copy Markdown
Member

Affected Package(s)

  • @heripo/pdf-parser
  • @heripo/document-processor
  • @heripo/model
  • @heripo/logger
  • @heripo/shared (internal)
  • demo-web
  • docs
  • Other (root configs, CI, etc.)

Summary

This PR updates the workspace for AI SDK v7 compatibility and aligns packages that depend on AI SDK with its ESM-only runtime requirements. It also refreshes workspace dependencies, updates the pnpm version,
and adapts LLM message construction to the AI SDK v7 prompt/message API.

Changes

  • Bumped pnpm from 11.8.0 to 11.10.0 and refreshed dependency versions in package.json, pnpm-workspace.yaml, and pnpm-lock.yaml.
  • Updated AI SDK catalog packages from v6-era versions to ai@^7.0.14 and matching provider packages (@ai-sdk/*, ai-sdk-ollama).
  • Changed LLMCaller.call() in packages/shared/src/utils/llm-caller.ts to pass system prompts via instructions instead of system.
  • Migrated vision message parts from { type: 'image', image } to { type: 'file', data } in document processing and PDF parser VLM flows.
  • Updated VisionLLMComponent, VisionTocExtractor, PageRangeParser, PdfLanguageDetector, VlmPageProcessor, PostDoclingPageProcessor, and review-assistance VLM calls for AI SDK v7 message parts.
  • Updated tests to assert the new AI SDK v7 file-part shape.
  • Switched AI SDK-dependent packages (@heripo/shared, @heripo/document-processor, @heripo/pdf-parser) to ESM-only build/package metadata by removing CJS exports and emitting ESM output.
  • Applied formatter output to touched files after dependency and migration changes.

Breaking Changes

  • None
  • If any, describe migration steps:
    • @heripo/pdf-parser and @heripo/document-processor no longer expose CommonJS require exports. Consumers should migrate to ESM imports, for example import { PDFParser } from '@heripo/pdf-parser'.
    • Runtime consumers should use Node.js versions compatible with AI SDK v7 and this repository's node >=24 engine requirement.
    • Any direct usage of internal vision message helpers should migrate image content from { type: 'image', image } to { type: 'file', data, mediaType }.

Checklist

  • I followed the Code of Conduct (see CODE_OF_CONDUCT.md)
  • I ran: pnpm lint pnpm typecheck pnpm build pnpm test
  • Tests added/updated; coverage remains 100%
  • Docs/README updated if needed
  • No external side effects (network/file/process/time) in tests — use mocks

Related Issues

@kimhongyeon kimhongyeon self-assigned this Jul 5, 2026
@kimhongyeon kimhongyeon added documentation Improvements or additions to documentation demo-web dependencies labels Jul 5, 2026
@kimhongyeon kimhongyeon merged commit 46655e3 into main Jul 5, 2026
1 check passed
@kimhongyeon kimhongyeon deleted the chore/deps branch July 5, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

demo-web dependencies documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant