You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bedrock: file extension included in DocumentBlock name causes validation error #19964
When sending a message with a PDF attachment through the Bedrock provider, the file extension (e.g., .pdf) is included in the DocumentBlock.name field sent to the Bedrock Converse API. The dot character in the extension violates Bedrock's validation rules, which reject the request with:
The document file name can only contain alphanumeric characters, whitespace characters, hyphens, parentheses, and square brackets. The name can't contain more than one consecutive whitespace character.
Expected behavior
When constructing a DocumentBlock for the Bedrock Converse API, OpenCode should strip the file extension from the filename before using it as the name field. The extension/format should only be conveyed via the separate format field.
For example, given a file part with filename: "filename.pdf":
Activity
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.