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
Improper processing of a Bedrock error message causes failures. #13040
I'm using an internal OpenAI-compliant gateway to reach Bedrock, to access Opus 4.5. I got the following error message asking the model to do some fairly involved code transformations.
AI_TypeValidationError: Type validation failed: Value: {"id":"4ec75945-9e25-47e0-9c6f-81f7d91a32fb","error":"Error occured during streaming: 'us.anthropic.claude-opus-4-5-20251101-v1:0-cac-cr'"}.
Error message: [{"code":"invalid_union","errors":[[{"expected":"array","code":"invalid_type","path":["choices"],"message":"Invalid input: expected array, received undefined"}],[{"expected":"object","code":"invalid_type","path":["error"],"message":"Invalid input: expected object, received string"}]],"path":[],"message":"Invalid input"}]
As I understand it, this is probably an underlying error message returned by Bedrock, which is not being processed correctly by the Bedrock provider (demanding a JSON object, not tolerating a string under the "error" key.)
Plugins
None
OpenCode version
Locally built, pulled from GH a week ago.
Steps to reproduce
Configure a local gateway to point at Bedrock.
Specify the Opus 4.5 model.
Ask to do a lot of simple transformations on a lot of fairly simple classes.
Activity
github-actions commentedon Apr 12, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.