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 Claude Opus 4.6 rejects assistant message prefill #29760
When using OpenCode with Claude Opus 4.6 on AWS Bedrock, requests can fail with:
undefined: The model returned the following errors: This model does not support assistant message prefill. The conversation must end with a user message.
Environment
Tool: OpenCode
Provider: AWS Bedrock
Model: Claude Opus 4.6
Error: This model does not support assistant message prefill. The conversation must end with a user message.
Expected behavior
OpenCode should avoid sending assistant message prefill when targeting Bedrock Anthropic models that do not support it.
Actual behavior
The Bedrock request is rejected because the conversation appears to end with an assistant message or assistant prefill.
Notes
This may require provider-specific handling for Bedrock Anthropic models, since assistant message prefill is not supported there even if it works with other Anthropic-compatible providers.
The underlying problem (opencode sending a trailing assistant message to providers that don't support prefill) is the same across these reports, though your issue is specific to AWS Bedrock. It may be worth tracking this under one of the existing issues or linking to them.
Activity
github-actions commentedon May 28, 2026
This issue might be a duplicate of existing issues. Please check:
finish=stop, triggering prefill error on claude-opus-4-6 #17982: Same prefill error triggered by the prompt loop on claude-opus-4-6The underlying problem (opencode sending a trailing assistant message to providers that don't support prefill) is the same across these reports, though your issue is specific to AWS Bedrock. It may be worth tracking this under one of the existing issues or linking to them.
github-actions commentedon Jul 28, 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.