chore: migrate AI SDK v7 compatibility#110
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Affected Package(s)
@heripo/pdf-parser@heripo/document-processor@heripo/model@heripo/logger@heripo/shared(internal)demo-webdocsSummary
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
pnpmfrom11.8.0to11.10.0and refreshed dependency versions inpackage.json,pnpm-workspace.yaml, andpnpm-lock.yaml.ai@^7.0.14and matching provider packages (@ai-sdk/*,ai-sdk-ollama).LLMCaller.call()inpackages/shared/src/utils/llm-caller.tsto pass system prompts viainstructionsinstead ofsystem.{ type: 'image', image }to{ type: 'file', data }in document processing and PDF parser VLM flows.VisionLLMComponent,VisionTocExtractor,PageRangeParser,PdfLanguageDetector,VlmPageProcessor,PostDoclingPageProcessor, and review-assistance VLM calls for AI SDK v7 message parts.@heripo/shared,@heripo/document-processor,@heripo/pdf-parser) to ESM-only build/package metadata by removing CJS exports and emitting ESM output.Breaking Changes
@heripo/pdf-parserand@heripo/document-processorno longer expose CommonJSrequireexports. Consumers should migrate to ESM imports, for exampleimport { PDFParser } from '@heripo/pdf-parser'.node >=24engine requirement.{ type: 'image', image }to{ type: 'file', data, mediaType }.Checklist
pnpm lintpnpm typecheckpnpm buildpnpm testRelated Issues