Skip to content

Why are my metrics showing a Bedrock FM using InputTokens when it's not configured any longer?

0

I build 2 agents in Bedrock, Agent A is a Supervisor and Agent B analyzes data and returns a response. I started by using Claude Opus 4 for both agents but ran into a problem with cross region rate limits for Claude Opus 4. I switched to using Meta Llama 3.3 so that I was only executing in my region. When I run Agent B by itself, it executes and returns a result and the metrics only show the Llama model's input tokens. When I run Agent A calling Agent B and ask a very simple question only Llama input tokens are used and no limits are hit. When I ask Agent A to explain the answer, I get an error: "Your request rate is too high. Reduce the frequency of requests. Check your Bedrock model invocation quotas to find the acceptable frequency." However I am not coming anywhere close to the Llama 3.3 invocation limits and should not have hit a rate limit. But when I check my CloudWatch metrics it appears that Claude 4 Opus is being invoked even though nothing is configured to be able to do so. I believe the rate limit for cross region tokens is being hit with Claude but why is Claude even being called? It seems like it's not completely eliminated despite not being configured anywhere in Bedrock.

1 Answer
0

The issue you're experiencing with CloudWatch metrics showing Claude Opus 4 token usage despite switching to Meta Llama 3.3 could be related to how Amazon Bedrock Agents work behind the scenes.

When you run Agent A (supervisor) calling Agent B, even though you've configured both to use Llama 3.3, there might still be some internal agent orchestration processes that are using Claude Opus 4. This is particularly likely when you ask Agent A to "explain the answer," which might trigger more complex reasoning capabilities.

Amazon Bedrock Agents may use foundation models for various internal processes like orchestration, reasoning, or planning steps that aren't explicitly visible in your configuration. The throttling error you're receiving ("Your request rate is too high") combined with the CloudWatch metrics showing Claude input tokens suggests that Claude is still being used somewhere in the agent workflow.

To troubleshoot this issue:

  1. Monitor your CloudWatch metrics closely, particularly InputTokenCount and OutputTokenCount for both models to understand the usage patterns.

  2. Check if there are any remaining references to Claude in your agent configurations, knowledge bases, or action groups.

  3. Be mindful that complex agent interactions, especially with features like "explain the answer," can consume more tokens and might be triggering different model usage patterns.

  4. Consider implementing retry logic with exponential backoff in your application to handle these throttling exceptions.

  5. You might need to reduce the complexity of interactions between your agents or further optimize your prompts to stay within the token limits.

If you continue to experience this issue despite confirming all configurations are set to Llama 3.3, you may need to contact AWS Support for further investigation, as there might be an underlying issue with how the agent is processing your requests.
Sources
Monitor Amazon Bedrock Agents using CloudWatch Metrics - Amazon Bedrock
Building Agentic AI app with Strands Agents & MCP | AWS re:Post
Troubleshoot Amazon Bedrock on-demand resource 429 Throttling error | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.