fix(firestore-genai-chatbot): stop importing a non-exported subpath - #2962
Merged
Merged
Conversation
`@genkit-ai/google-genai` only declares `"."` in its `exports` map, so the deep import of `lib/vertexai` fails to resolve under `moduleResolution: nodenext`. Derive `VertexPluginOptions` from the exported `vertexAI` plugin instead, since the package does not re-export the type from its root. This unbreaks the repo-wide build in postinstall, which currently fails the test job on every PR targeting `kits`.
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the import of VertexPluginOptions in genkit.ts. Instead of importing the type from a deep internal path of @genkit-ai/google-genai which is not re-exported from the package root, it is now dynamically extracted using TypeScript's utility types from the vertexAI function parameters. There are no review comments, and I have no feedback to provide.
IzaakGough
marked this pull request as ready for review
August 20, 2026 10:14
cabljac
approved these changes
Aug 20, 2026
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.
The
node.js_22_testjob fails for every PR targetingkits. The repo-wide build runs in postinstall, so one kit failing to compile kills the job regardless of what the PR touches:@genkit-ai/google-genaionly declares"."in itsexportsmap. The oldnoderesolution ignoredexports, so the deeplib/vertexaiimport resolved;nodenexthonours it, so the subpath no longer resolves. The package does not re-exportVertexPluginOptionsfrom its root, so this derives the type from the exportedvertexAIplugin instead.Verified:
tsc -b --forceon the kit goes from the error above to clean, 21 tests pass, andprettier --checkis clean on the changed file.