Blank content causing issue with AWS Bedrock
Before submitting your bug report
- [x] I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- [x] I'm not able to find a related conversation on GitHub discussions that reports the same bug
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS:macOS
- Continue version: 1.2.11
- IDE version:VSCode 1.106.2
- Model: Claude Opus 4.5
- config:
name: Local Assistant
version: 1.0.0
schema: v1
models:
- name: chat.hollowtreedev
provider: openai
model: global.anthropic.claude-opus-4-5-20251101-v1:0
env:
useLegacyCompletionsEndpoint: false
apiBase: https://chat.hollowtreedev.com/api
apiKey: sk-6f039bd986f2455ca10f690f8e08eae1
roles:
- chat
- edit
defaultCompletionOptions:
contextLength: 132000
maxTokens: 32000
promptCaching: true
context:
- provider: code
- provider: docs
- provider: diff
- provider: terminal
- provider: problems
- provider: folder
- provider: codebase
OR link to agent in Continue hub:
Description
Hello,
When using AWS Bedrock, every few message, I get this error and any following message will trigger this.
400: An error occurred (ValidationException) when calling the ConverseStream operation: The text field in the ContentBlock object at messages.11.content.0 is blank. Add text to the text field, and try again.
If I start new chat, it'll be ok for a little bit, and then kind of randomly, that error will pop up again.
I did check the log and saw some contents with blank messages (the index didn't match, so I'm not actually sure which out of these..)
{
"role": "user",
"content": " "
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": ""
}]
}
The knowledgebase AI mentions that this is known issue,
Based on my search results, I couldn't find specific documentation about this exact Bedrock ValidationException error in Continue's docs. However, this is a known type of issue that can occur with the Bedrock ConverseStream API.
And also that
This appears to be a bug in how Continue constructs messages for Bedrock. Consider reporting it on [GitHub Issues](https://github.com/continuedev/continue/issues) with reproduction steps.
Please review and advise.
Thanks
To reproduce
My setup is openwebui, AWS Bedrock and connecting from VS Code to use it as coding agent.
Log output
400: An error occurred (ValidationException) when calling the ConverseStream operation: The text field in the ContentBlock object at messages.11.content.0 is blank. Add text to the text field, and try again.
Related Issues
Found several related issues:
Empty/Blank Message Issues:
- #2852 - Empty messages - Anthropic etc.
- #894 - LMstudio error from empty content on assistant message
- #750 - LMstudio errors on empty assistent message
- #4141 - Unable to submit request because it must have a text parameter
- #5091 - 400 Invalid 'messages[2].tool_calls[0].function.name': empty string
- #900 - Empty messages can break the markup of continued AI replies and might confuse the AI
AWS Bedrock Related:
- #8408 - Error: Error processing Bedrock stream: Truncated event message received (closed)
- #4893 - Agent mode failing with Bedrock due to Tool (closed)
- #1938 - Recent bedrock integration throwing an error about system role message getting passed (closed)
- #8297 - Amazon Bedrock Invalid Beta Flag Issue (open)
- #3342 - AWS Bedrock Always Returns MaxTokens Error (open)
Validation Errors:
- #1660 - ValidationException: stop_sequences: each stop sequence must contain non-whitespace (closed)
- #2296 - Bedrock fails autocomplete: 'inferenceConfig.stopSequences' failed to satisfy constraint (closed)
- #2538 - 'inferenceConfig.stopSequences' failed to satisfy constraint: Member must have length less than or equal to 4 (closed)
@hoilchoi thank you for the in depth report!
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!