1 Answer
- Newest
- Most votes
- Most comments
0
Correct. Message completion is handled internally without needing explicit stop sequences in the OpenAI OSS models. To fix the error, you will want to use stop instead of stopSequences, as you mentioned.
To remedy this error, you will want to remove or replace the stopSequences field from your prompt override configuration then update your agent configuration to not include stop sequences when using these particular models.
Source: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-openai.html
Relevant content
asked 4 months ago

Seems like there is no easy way to get around this issue without implementing custom orchestration strategy which is huge pain in order to just not make bedrock invoke_agent not to use stopSequences. (seems like this default of the way bedrock invoking agent, and i have no way to override it) is there any good solution for this?
Correct, Minji. AWS Bedrock handles agent invocation stop sequences this way by default. Here are a few potential solutions for you to explore: