Skip to content
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

feat: Added support for region-prefixed Bedrock models #2937

Conversation

Bkmakwana2002
Copy link

Added feature to Node agent to match cross-region inference model names in Bedrock

Description

This PR adds support to the Node agent for matching cross-region inference model names in Bedrock. Some newer Bedrock models use region-prefixed names (e.g., us.anthropic.claude-xyz) for cross-region inference optimization. The Node agent now correctly identifies and reports these models.

How to Test

  1. Run the Node application with the Node agent configured.
  2. Navigate to the AI Response section in the New Relic dashboard.
  3. Verify that the response metadata now includes the full, region-prefixed model name. A screenshot
    demonstrating this is attached.
Screenshot 2025-02-11 at 2 31 45 PM

@CLAassistant
Copy link

CLAassistant commented Feb 11, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bizob2828 bizob2828 changed the title feat: #NR-361592 feat: Added support for region-prefixed Bedrock models Feb 11, 2025
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (NR-361592-OE-Node-agent-does-not-match-cross-region-inference-model-names-in-Bedrock@aa2781f). Learn more about missing BASE report.

Additional details and impacted files
@@                                                   Coverage Diff                                                   @@
##             NR-361592-OE-Node-agent-does-not-match-cross-region-inference-model-names-in-Bedrock    #2937   +/-   ##
=======================================================================================================================
  Coverage                                                                                        ?   88.55%           
=======================================================================================================================
  Files                                                                                           ?      313           
  Lines                                                                                           ?    48059           
  Branches                                                                                        ?        0           
=======================================================================================================================
  Hits                                                                                            ?    42557           
  Misses                                                                                          ?     5502           
  Partials                                                                                        ?        0           
Flag Coverage Δ
integration-tests-cjs-18.x 72.31% <0.00%> (?)
integration-tests-esm-18.x 49.62% <0.00%> (?)
integration-tests-esm-20.x 49.63% <0.00%> (?)
integration-tests-esm-22.x 49.68% <0.00%> (?)
versioned-tests-18.x 79.21% <100.00%> (?)
versioned-tests-20.x 79.21% <100.00%> (?)
versioned-tests-22.x 79.22% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@jsumners-nr jsumners-nr merged commit 2c11aea into newrelic:NR-361592-OE-Node-agent-does-not-match-cross-region-inference-model-names-in-Bedrock Feb 12, 2025
24 checks passed
@bizob2828
Copy link
Member

bizob2828 commented Feb 12, 2025

@Bkmakwana2002 this wasn't targetting main so this will never get released. I've opened #2947 so it can get into main and be released. In the future please make sure you target main for all PRs, otherwise it'll just hang out in a branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

4 participants