-
Notifications
You must be signed in to change notification settings - Fork 699
Description
Expected Behaviour
When invoking the BedrockFlowsAgent in a Lambda environment, setting enableTrace=False (or not specifying it at all) should result in no enableTrace parameter being sent to Bedrock. If enableTrace=True is supported as per documentation, it should also not cause the request to fail due to unknown parameters.
Current Behaviour
In AWS Lambda, requests to Bedrock Flows fail with the following error, whether enableTrace is not specified or explicitly set to True:
Parameter validation failed: Unknown parameter in input: "enableTrace", must be one of: flowAliasIdentifier, flowIdentifier, inputs
This issue does not occur when running the same code locally. It appears that enableTrace is being injected internally or not recognized by Bedrock, causing the Bedrock API to reject the payload.
Code snippet
from multi_agent_orchestrator.agents import BedrockFlowsAgent, BedrockFlowsAgentOptions
def my_flow_input_encoder(agent, input, **kwargs):
# Minimal input encoder
return {"inputs": {"file_key": input["inputs"]["file_key"]}}
# Tried both with and without enableTrace:
# - Without enableTrace parameter
# - With enableTrace=True as per documentation
sentiment_agent = BedrockFlowsAgent(BedrockFlowsAgentOptions(
name="sentiment-agent",
description="Agent for sentiment analysis",
flowIdentifier="yy",
flowAliasIdentifier="yy",
flow_input_encoder=my_flow_input_encoder,
# enableTrace=True or omitted entirely still causes the error
))Possible Solution
Investigate if a specific library version or global configuration variable injects enableTrace unexpectedly.
Steps to Reproduce
- Deploy the above code to an AWS Lambda function with the multi_agent_orchestrator library.
- Attempt to invoke the function:
- With enableTrace omitted.
- With enableTrace=True included in BedrockFlowsAgentOptions.
- Observe the error indicating enableTrace is an unknown parameter, despite the local environment running the same code without issues.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status