Skip to content

[Bug] Bedrock Runtime Error (400 ValidationException) when using base_url in WSL2 #13811

Closed

Description

@Lh-Ty

Description

Description

I am encountering a 400 ValidationException related to AWS Bedrock Runtime when attempting to use OpenCode. The error indicates that the request sent to the model contains empty text content blocks (text content blocks must be non-empty).

I am running OpenCode inside WSL2, connecting to a custom model provider via base_url.

Steps to Reproduce

  1. Version: OpenCode v1.2.5
  2. Environment: WSL2 (Windows Subsystem for Linux).
  3. Configuration:
    • Model: claude-3-5-sonnet-20241022
    • Setup: Configured using a base_url (Custom OpenAI-compatible endpoint).
  4. Action: Run any command or prompt (e.g., querying model config /model or a simple chat).
  5. Result: The operation fails immediately with the error log below.

Error Log

InvokeModelWithResponseStream: operation error Bedrock Runtime: InvokeModelWithResponseStream, https response error StatusCode: 400, RequestID: 8d37f0eb-3215-47a8-bae8-5603b8bb79b1, ValidationException: messages: text content blocks must be non-empty (request id: 20260216073702136854627CfvE55fd) (request id: 20260216073702104225029NXXEHzVZ)

### Plugins

oh-my-opencode

### OpenCode version

v1.2.5

### Steps to reproduce

_No response_

### Screenshot and/or share link

_No response_

### Operating System

wsl2

### Terminal

_No response_

Activity

  1. github-actions commented on Feb 16, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or related to existing issues involving empty content validation:

    Please check these issues to see if your issue is already being tracked or if there's an existing workaround.

  2. github-actions commented on Apr 18, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions