bedrock-claude-chat icon indicating copy to clipboard operation
bedrock-claude-chat copied to clipboard

[BUG] You're NOT Crazy the Published API Doesn't Support Inference models and Returns false success

Open Peter-Lankton opened this issue 8 months ago β€’ 3 comments

🚨 Please Note 🚨

To ensure efficient investigation of the issue, please fill out the fields below with as much detail as possible. Reports that do not follow this template may be closed without notification. We appreciate your cooperation.

🐞Describe the bug

The published API code uses 'ConverseStream' operation which is not supported by Anthropic Models

Image

πŸ”„ To Reproduce

Steps to reproduce the behavior:

  1. Create a bot
  2. Publish it
  3. POST to the '/conversation' endpoint with any anthropic model, my screenshots use claude-v3.5-sonnet-v2
  4. The response will lie and say 'success' here's your ConversationId and MessageID
  5. Go to SQS queue and see that there's no messages waiting and there's none in flight
  6. Go to DynamoDB and see that nothing was created

πŸ“· Screenshots

1. ERROR with Anthropic Model

1.a POST Message with Model Image

1.b Error Logs on SQS Handler Lambda Image

2. Success with non anthropic model

2.a POST Message with Amazon Nova model Image

2.b SUCCESS Logs on SQS Handler Lambda

Image

πŸ”Ž Logs for Chat Issues

n.a.

πŸ”Ž Logs for Bot Creation/Update Issues

n.a.

πŸ“ Additional context

This was a tough bug to hunt down with the response saying it was successful on endpoint, but failing during the execution of the SQS Lambda which is a container image, so can't look at code in a straightforward manner.

Peter-Lankton avatar Mar 11 '25 20:03 Peter-Lankton

Not sure on how to update the SQSLambda code but if you point me in the correct direction I don't mind giving a try :-).

Peter-Lankton avatar Mar 12 '25 19:03 Peter-Lankton

Thanks for reporting this issue. Your detailed debugging helped identify this problem.

The initial 200 response is expected (API is asynchronous), but you're right that the backend is failing silently if the model is not activated.

possible solution:

  • Update schema to return proper error messages when error happens

Do you think update the implementation with keeping backward compatibility in terms of schema?

statefb avatar Mar 12 '25 19:03 statefb

I think it is fair to update the schema to let users know the lambda is failing. For the SQS Handler code is it possible to know which file(s) in the project are related to making the container image that it runs as so that I can try to debug it? From online the solution is here: AWS Invoke Error e.g. in the code it should reference us.anthropic.claude-3-5-haiku-20241022-v1:0 (I tried passing that to the API Endpoint and didn't have any luck) instead of claude-3-5-haiku.

Peter-Lankton avatar Mar 12 '25 20:03 Peter-Lankton

#862 merged. Please check if the problem resolved. Thank you

statefb avatar May 15 '25 00:05 statefb

This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 14 days after last commented by someone). And it will be closed automatically 14 days later if not responded.

github-actions[bot] avatar May 29 '25 01:05 github-actions[bot]

This issue has been closed due to no response within 14 days after labeled as "stale", 14 days after last reopened, and 14 days after last commented.

github-actions[bot] avatar Jun 13 '25 01:06 github-actions[bot]