goose
goose copied to clipboard
`text content blocks must contain non-whitespace text` error
Describe the bug
Sometimes the following error can occur:
Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: {"external_model_provider":"amazon-bedrock","external_model_error":{"message":"messages: text content blocks must contain non-whitespace text"}}.
Currently unsure of how or when goose can get into that state.
To Reproduce We can manually reproduce this behavior by directly editing the session file:
goose s --name whitespace- say "hi"
- Open
~/.local/share/goose/sessions/whitespace.jsonlwith your favorite editor - Find the line with
{"role":"user","created":1741285622,"content":[{"type":"text","text":"hi"}]}and replace"text":"hi"with"text":" ". goose s --name whitespace -r- say "hi"
- See the error:
Formatting future frames... 2025-03-06T18:27:33.310829Z ERROR goose::agents::truncate: Error: Request failed: Request failed with status: 400 Bad Request. Message: {"external_model_provider":"amazon-bedrock","external_model_error":{"message":"messages: text content blocks must contain non-whitespace text"}}
at crates/goose/src/agents/truncate.rs:391
Ran into this error: Request failed: Request failed with status: 400 Bad Request. Message: {"external_model_provider":"amazon-bedrock","external_model_error":{"message":"messages: text content blocks must contain non-whitespace text"}}.
Please retry if you think this is a transient or recoverable error.
Screenshots If applicable, add screenshots to help explain your problem.
Please provide following information:
- OS & Arch: [MacOS]
- Interface: [UI & CLI]
- Version: [1.0.8+] - based on user reports
- Extensions enabled: [any]
- Provider & Model: [any]
Additional context Add any other context about the problem here.
Currently unable to replicate in a working session, paused until we can get some session logs to try to determine what sent the only whitespace text blocks.
going to close this due to not being able to reproduce