Checkboxes for prior research
Describe the bug
When sending a request that exceeds the allowed token count:
anthropic.claude-3-haiku-20240307-v1:0 will throw a ValidationException with a descriptive message: ValidationException: Input is too long for requested model.
anthropic.claude-3-opus-20240229-v1:0 will throw a ModelStreamErrorException with a generic message: The system encountered an unexpected error during processing. Try your request again.
SDK version number
@aws-sdk/client-bedrock-runtime@3.602.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.11.0
Reproduction Steps
Sending a request that exceeds the allowed token count and examine the exception thrown.
Observed Behavior
anthropic.claude-3-haiku-20240307-v1:0 will throw a ValidationException with a descriptive message: ValidationException: Input is too long for requested model.
anthropic.claude-3-opus-20240229-v1:0 will throw a ModelStreamErrorException with a generic message: The system encountered an unexpected error during processing. Try your request again.
Expected Behavior
The same exception type for both models, with information that allows us to respond correctly.
Possible Solution
No response
Additional Information/Context
No response
Checkboxes for prior research
Describe the bug
When sending a request that exceeds the allowed token count:
anthropic.claude-3-haiku-20240307-v1:0will throw aValidationExceptionwith a descriptive message:ValidationException: Input is too long for requested model.anthropic.claude-3-opus-20240229-v1:0will throw aModelStreamErrorExceptionwith a generic message:The system encountered an unexpected error during processing. Try your request again.SDK version number
@aws-sdk/client-bedrock-runtime@3.602.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.11.0
Reproduction Steps
Sending a request that exceeds the allowed token count and examine the exception thrown.
Observed Behavior
anthropic.claude-3-haiku-20240307-v1:0will throw aValidationExceptionwith a descriptive message:ValidationException: Input is too long for requested model.anthropic.claude-3-opus-20240229-v1:0will throw aModelStreamErrorExceptionwith a generic message:The system encountered an unexpected error during processing. Try your request again.Expected Behavior
The same exception type for both models, with information that allows us to respond correctly.
Possible Solution
No response
Additional Information/Context
No response