aws-samples / aws-samples/bedrock-chat
[BUG] Published API Token limit
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 535
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 10
Description
## Describe the bug
When doing a POST to a published API with a large message, we run into this error:
[ERROR] ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: Malformed input request: #/texts/0: expected maxLength: 2048, actual: 8575, please reformat your input and try again.
## To Reproduce
API POST to a published API with a message larger than 2048 tokens.
## Screenshots
## Additional context
Is there any solution to this or workaround? For example I could split up the message in different chunks - however I would like to send it all as 1 message so that I get 1 response to the full message.
Contributor guide
Research direction
The issue names no files, tests, or implementation entry point. Start by tracing the published API POST path to the AWS InvokeModel call and checking the documented input limit; done would require a confirmed supported behavior or workaround for messages exceeding 2048 tokens.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- api, backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100