Need to implement error handling for tool calls. Sometimes it passes incorrect arguments, example below
BadRequestError: Error code: 400 - {'error': {'message': 'tool call validation failed: parameters for tool list_runs_tool did not match schema: errors: [`/order_by`: expected string, but got array, `/order_by`: expected null, but got array]', 'type': 'invalid_request_error', 'code': 'tool_use_failed', 'failed_generation': '<function=list_runs_tool>{"experiment_ids": ["3"], "max_results": 100, "order_by": ["metrics.train_loss ASC"], "status": ["FINISHED"]}</function>\n\n'}}
Need to implement error handling for tool calls. Sometimes it passes incorrect arguments, example below
Reference for fix : LangChain Docs