Skip to content

Add tag for cost management #1167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: v5
Choose a base branch
from
Open

Add tag for cost management #1167

wants to merge 16 commits into from

Conversation

kazuhitogo
Copy link
Collaborator

@kazuhitogo kazuhitogo commented Jul 2, 2025

Description of Changes

Apply an Application Inference Profile to Bedrock models to tag model inferences.
Also apply tags to the entire CDK asset

Checklist

  • Modified relevant documentation
  • Verified operation in local environment
  • Executed npm run cdk:test and if there are snapshot differences, execute npm run cdk:test:update-snapshot to update snapshots
  • Check whether updates from a tag-free environment will result in breaking changes. If they would cause breaking changes, make them optional.
    • It's breaking change so optional if available knwoledgebase
  • Check if cost management is possible

Related Issues

#702 #650

// NOTE: InvokeModelWithBidirectionalStreamCommand currently does not support Inference Profile Arn.
// When AWS adds support, uncomment the code block below and change 'const' to 'let' for modelIdOrArn.

const modelIdOrArn = event.model.modelId; // Fallback to modelId for now
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InvokeModelWithBidirectionalStreamCommand が Inference Profile Arn (タグ) は対応していないが将来的な対応及び他との実装に合わせるため

for (const modelId of modelIds) {
// Inference Profile is not supported Cross Region Inference
if (
modelId.region === currentRegion &&
Copy link
Collaborator Author

@kazuhitogo kazuhitogo Jul 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cross region inference は inference profile を2025/7/6 時点作成できないため

@kazuhitogo kazuhitogo changed the title [WIP] Add tag for cost management Add tag for cost management Jul 6, 2025
wadabee and others added 2 commits July 18, 2025 19:41
Co-authored-by: remote-swe-app[bot] <123456+remote-swe-app[bot]@users.noreply.github.com>
Copy link
Contributor

@wadabee wadabee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kazuhitogo
Copy link
Collaborator Author

@wadabee
Thank you! LGTM!
If there is no problem, please merge

@tbrand tbrand changed the base branch from main to v5 July 30, 2025 06:01
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