diff --git a/lib/crewai/src/crewai/llms/providers/bedrock/completion.py b/lib/crewai/src/crewai/llms/providers/bedrock/completion.py index 5932b66f0..54c222c85 100644 --- a/lib/crewai/src/crewai/llms/providers/bedrock/completion.py +++ b/lib/crewai/src/crewai/llms/providers/bedrock/completion.py @@ -17,10 +17,7 @@ from crewai.utilities.agent_utils import is_context_length_exceeded from crewai.utilities.exceptions.context_window_exceeding_exception import ( LLMContextLengthExceededError, ) -from crewai.utilities.pydantic_schema_utils import ( - generate_model_description, - sanitize_tool_params_for_bedrock_strict, -) +from crewai.utilities.pydantic_schema_utils import generate_model_description from crewai.utilities.types import LLMMessage @@ -173,7 +170,6 @@ class ToolSpec(TypedDict, total=False): name: Required[str] description: Required[str] inputSchema: ToolInputSchema - strict: bool class ConverseToolTypeDef(TypedDict): @@ -1988,21 +1984,10 @@ class BedrockCompletion(BaseLLM): "description": description, } - func_info = tool.get("function", {}) - strict_enabled = bool(func_info.get("strict")) - if parameters and isinstance(parameters, dict): - schema_params = ( - sanitize_tool_params_for_bedrock_strict(parameters) - if strict_enabled - else parameters - ) - input_schema: ToolInputSchema = {"json": schema_params} + input_schema: ToolInputSchema = {"json": parameters} tool_spec["inputSchema"] = input_schema - if strict_enabled: - tool_spec["strict"] = True - converse_tool: ConverseToolTypeDef = {"toolSpec": tool_spec} converse_tools.append(converse_tool)