Skip to content

fix: pin working version for cdk-constructs breaking change#389

Open
weklund wants to merge 2 commits intomainfrom
fix/breaking-fm-endpoints
Open

fix: pin working version for cdk-constructs breaking change#389
weklund wants to merge 2 commits intomainfrom
fix/breaking-fm-endpoints

Conversation

@weklund
Copy link
Member

@weklund weklund commented Jan 13, 2026

Describe your changes

This is short term fix for the bug reported here #388

The @cdklabs/generative-ai-cdk-constructs library introduced an undocumented breaking change in version 0.1.312 that affects how SageMaker deployment constructs are exported. Prior to this version, the library used "barrel exports" (export * from) which allowed consumers to import classes like JumpStartModel, SageMakerInstanceType, and JumpStartSageMakerEndpoint directly from the package root. In version 0.1.312, these exports were changed to "namespaced exports" (export * as sagemaker_deployment from), which means the classes are now only accessible under the sagemaker_deployment namespace.

This change breaks the sagemaker-jumpstart-fm-endpoint module, which uses the direct import pattern. As a temporary workaround, the module has been pinned to version 0.1.311, which still supports direct imports. The sagemaker-hugging-face-endpoint module is also affected but currently works because its lockfile pins an older version (0.1.74). Both modules will eventually need to be migrated to use namespaced imports (import { sagemaker_deployment } from "@cdklabs/generative-ai-cdk-constructs") and then destructure the required classes, allowing them to upgrade to the latest library version and receive future updates.

New package-lock will also fix an issue with a version bump from a previous pull request.

Version Comparison (to show the change):

Issue ticket number and link

Checklist before requesting a review

  • I updated CHANGELOG.MD with a description of my changes
  • If the change was to a module, I ran the code validation script (scripts/validate.sh)
  • If the change was to a module, I have added thorough tests
  • If the change was to a module, I have added/updated the module's README.md
  • If a module was added, I added a reference to the module to the repository's README.md
  • I verified that my code deploys successfully using seedfarmer apply

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

noah-paige
noah-paige previously approved these changes Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants