SAM Doctor

ERROR REFERENCE

Bedrock received an empty system prompt

The Converse request was rejected before it reached a model because a system content block contains empty text. Remove that block when no system instruction is present; do not change IAM first.

WHAT IT MEANS

The request shape is invalid

ParamValidationError: Invalid length for parameter system[0].text, value: 0, valid min length: 1

Botocore validates the request locally and rejects a system content block whose text is empty. This is not a model-access, Region, or permission failure; the service call may not have been sent at all.

NEXT CHECK

Omit empty system content

  1. Find the request builder. Trace the code that turns the system prompt into the Converse or ConverseStream system array.
  2. Skip blank prompts. When the generated value is empty or whitespace-only, leave out the entire system field instead of sending {"text": ""}. Keep non-empty system instructions unchanged.
  3. Retry the same call. Validate the serialized payload in a test or sanitized debug log, then investigate model access or identifier errors only if the request reaches Bedrock.

AUTOMATE THE TRIAGE

Keep the check in your normal workflow

SAM Doctor recognizes the exact empty-system-block validation marker with medium confidence and points at the request builder. Runs locally; no AWS access, no log upload.

python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown

RELATED