UPDATE: My original Ryobi 40v 14 inch chainsaw had a fixed battery compartment on top of the unit. That limited me to using their largest, at the time, 40v 4Ah battery. I was OK with that, but now there are other options larger than the 4Ah battery which would provide longer run times.
You can see the battery inserted into the top of my old chainsaw in this picture....
There are times that it would be nice to have more than 15-20 minutes of cutting time with my single 4Ah battery chainsaw. So, I jumped on a pre-winter sale of the Ryobi 40v Snow Shovel kit that came with another 4Ah battery. I was thinking that I would have at least doubled my runtime with 2 4Ah batteries.
Now, I really did not care about the snow shovel itself. I have a big 2 stage 26 inch gas snow blower for cleaning the driveway. This small snow shovel is never going to replace my gas snow blower here in northern Minnesota. However, I got the entire kit, on sale, for less than the price of a new 4Ah battery. Basically, I was getting the new 4Ah battery for less money than it cost to buy it alone, plus I was getting and new powerhead, a new charger, and the snow shovel attachment for free. Seemed like a no brainer for me to jump on that deal!
As you have probably guessed, it did not work out that way. The new 40v 4Ah battery did not fit into the fixed battery compartment of my older Ryobi chainsaw.
I immediately contacted Ryobi customer service and told them that their new 40v 4Ah batteries were about 1/4 inch larger than the older versions of the Ryobi 40 4Ah battery and that it would not fit into my chainsaw. So, I requested to swap out my new 4Ah battery with another Ryobi 4Ah battery that would fit my original chainsaw.
That turned out to be impossible for Ryobi. First of all, they said cannot replace a battery in the kit with a different battery. To which I replied, you would send me out a different battery if this one failed, so what's the big deal? Then they responded that all their 40v batteries work with all their 40v tools. Again, I said, I have the original chainsaw and the new battery here, and the battery does not fit into the fixed battery compartment. They replied that I was wrong and that all their batteries were compatible and would work in my chainsaw.

I am thinking customer service used to be much better.
Anyways, I packed up everything and went into town to our local Home Depot. I asked to talk to a manager. I told him that I was getting nowhere with Ryobi customer support, and asked him to show me how their new 40v 4Ah battery fits into my original chainsaw. I handed him my original 4Ah battery which fit, no problem. Then I gave him the new 4Ah battery and asked him to show me how it fits. Of course, he could not get it to fit either. The newer case is about 1/4 inch too big.
To his credit, the local HD manager was willing to swap out a battery for me. He took 3 different 4Ah batteries he had in the store, opened each package, and none of them fit!
At that point, I stated that I had no problem with my Ryobi chainsaw, but I was very concerned that Ryobi no longer has a battery that will fit into my chainsaw and essentially, I have an orphaned tool. And, I added, to make it even worse, this chainsaw is still under warranty.

To cut to the quick, the local HD manager swapped out my old chainsaw under warranty replacement with a brand new chainsaw kit, with battery and charger and said he was going to talk to their regional Ryobi rep when they come around the next quarter.
The new version of the chainsaw comes with an open battery compartment on the underside, so you can use any battery including the newer higher 5 and 6Ah batteries.

In the end, thanks to the local HD manager, I came out ahead on this deal. The new chainsaw kit costs about twice the price I paid for my original tool only purchase of this chainsaw. I only had 6 months left on the original warranty, but I am hoping that the new chainsaw will last much longer. I did not get a new 3 year warranty, but, all things considered, I am not going to push that point.
I have many Ryobi tools, and by and large they have served me well, but their customer service is really no longer responsive, or maybe just not well informed. How can they tell me that their new batteries fit into my old chainsaw? Do they just read from a script? Nobody from customer service seemed to understand, or care, about my issue. I am glad that this was not my first experience with Ryobi.
A few weeks later, I got an email from a "manager" at Ryobi who stated that they were going to pass my issue up to some technical support team. They asked me for the S/N of the old Ryobi chainsaw and the S/N of the new battery. That's the last I heard from them - about 3 months ago.