Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Agent Composer Using AWS Bedrock Proxy in Cursor IDE #84

Open
2 tasks
rafu07 opened this issue Dec 20, 2024 · 3 comments
Open
2 tasks

Issue with Agent Composer Using AWS Bedrock Proxy in Cursor IDE #84

rafu07 opened this issue Dec 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rafu07
Copy link

rafu07 commented Dec 20, 2024

Describe the bug
I am using the AWS Bedrock Proxy to integrate a custom AWS Bedrock API key into the Cursor IDE. Since the Cursor IDE does not directly support AWS Bedrock API keys, I configured the AWS Bedrock Access Gateway URL as an OpenAI-compatible server URL within the IDE.

This setup works well for most features in Cursor IDE. However, I encounter a persistent issue with the Agent Composer feature. Specifically, after the agent completes its second request, the following error occurs:

0:41,678 [INFO] Using Bedrock model: us.anthropic.claude-3-5-sonnet-20241022-v2:0
2024-12-20 08:40:41,679 [INFO] Request completed: Path: /api/v1/chat/completions | Method: POST | Status: 200 | Processing time: 0.002s
INFO:     10.250.0.111:10756 - "POST /api/v1/chat/completions HTTP/1.1" 200 OK
2024-12-20 08:40:41,738 [ERROR] Validation Error: An error occurred (ValidationException) when calling the ConverseStream operation: The number of toolResult blocks at messages.2.content exceeds the number of toolUse blocks of the previous turn.
ERROR:    Exception in ASGI application
  ...

The error appears to stem from a mismatch between the toolResult blocks in the agent’s response and the toolUse blocks from the previous turn. This discrepancy seems to disrupt the interaction flow within the Agent Composer.

Please complete the following information:

  • Which API you used: /chat/completions
  • Which model you used: us.anthropic.claude-3-5-sonnet-20241022-v2:0

To Reproduce

  1. Configure Cursor IDE to use the AWS Bedrock Access Gateway URL as an OpenAI-compatible endpoint.
  2. Use the Agent Composer feature.
  3. Observe that the first request is processed successfully.
  4. Notice the error after the second request.

Expected behavior
The Agent Composer should process requests and responses seamlessly without encountering validation errors.

Additional context
Add any other context about the problem here.

@rafu07 rafu07 added the bug Something isn't working label Dec 20, 2024
@rafu07
Copy link
Author

rafu07 commented Dec 20, 2024

@daixba Are you able to help here?

@fuhcq3
Copy link

fuhcq3 commented Jan 22, 2025

@rafu07 How did you do it and has this been fixed? Have you found any workarounds?

The default model doesn't seem to exist #95 so I am getting 502 Bad Gateway when trying to verify on cursor.

@daixba any ETA on proper fix please?

@Justinandjohnson
Copy link

Damn, yea my job won't let me use cursor unless i can use aws bedrock. I feel like this should be a urgent add lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants