You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Description
This PR fixes the issue when running a agent using tools with
application inference profile of Claude Sonnet 3.7 as input. Note that
using regional inference profile is working well, and only application
inference profile (AIP) will not return any tools use information.
### Root Cause
Langchain needs to identify the model id of the foundation model but
fails to detect the foundation model from the input AIP ARN (e.g.,
`arn:aws:bedrock:us-east-1:111111484058:application-inference-profile/c3myu2h6fllr`),
while regional inference profile contains the foundation model name
`us.anthropic.claude-3-7-sonnet-20250219-v1:0` and can be easily used to
identify the base model id. Therefore, regional inference profile is
working well while AIP is not.
### Solution
To identify the foundation model used in AIP, we need to call Bedrock
`get_inference_profile` control plane
[API](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock/client/get_inference_profile.html),
and parse the model id from the response.
### Issue
#535
0 commit comments