-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using an AmazonBedrockServerModel as the model for a ToolCallingAgent any inference request will throw an error. The error looks to be from Bedrock due to the tools not being configured correctly.
Code to reproduce the error
import boto3
from smolagents import (
AmazonBedrockServerModel,
ToolCallingAgent,
WikipediaSearchTool,
VisitWebpageTool,
)
client = boto3.client("bedrock-runtime")
bedrock_model = AmazonBedrockServerModel(model_id="us.amazon.nova-lite-v1:0", client=client)
manager_agent = ToolCallingAgent(
tools=[
WikipediaSearchTool(),
VisitWebpageTool(),
],
model=bedrock_model,
max_steps=10,
planning_interval=1,
additional_authorized_imports=[],
managed_agents=[],
)
Error logs (if any)
Error while generating output:
Parameter validation failed:
Unknown parameter in input: "tools", must be one of: modelId, messages, system,
inferenceConfig, toolConfig, guardrailConfig, additionalModelRequestFields,
promptVariables, additionalModelResponseFieldPaths, requestMetadata,
performanceConfig
Unknown parameter in input: "tool_choice", must be one of: modelId, messages,
system, inferenceConfig, toolConfig, guardrailConfig,
additionalModelRequestFields, promptVariables, additionalModelResponseFieldPaths,
requestMetadata, performanceConfig
Expected behavior
ToolCallingAgent should be able to inference with Bedrock models with tool calling capabilities.
Packages version:
1.17.0
Additional context
CodeAgent works as expected.
@leandrodamascena
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working