My cosmo had a inflated battery as well. I searched for a third batttery which fits into the cosmo (soldering is fine for me), but the biggest problem was the required thinness of the battery (original name: SXX600, original size: 13.6 x 6.2 x 0.3 cm, original capacity: 4220 mAh)
Eventually, I stumbled over
https://www.ampul.eu/de/batterie/4452-li-pol-akku-3000mah-37v-306090, which is 9.0 x 6.0 x 0,3 cm and has 3000mAh. The size is almost perfect - 2 dimensions are fitting completely, the other being about 4 cm less. Which is actually rather good, because this way I have some space for the cable. soldering etc.
Both batteries - the old and the new - have a tiny pcb with 2 (dual) mosfets and a tiny controller. On the original pcb, there is not only P+/P- on the connector, but also an ID and a "Test" line (is written on the connector cable). I used both PCBs - the old one for satisfying the id+test lines, the new for a additional safety layer. And because it was the easiest way :-D
My biggest fear was that the pcb locks itself if there is no voltage anymore on the battery cell side as a safety measure (quite common on laptop batteries). To avoid that, you have 2 choices: temporary connect an external power supply ( 4,4V, 100...200 mA will do), or connect the old and new battery in parallel. I went the second way, which is easier, but needs a bit of preparation.
The main problem is to prevent a high current at the moment of connecting the both batteries.
Luckily, my old battery had already a quite big impedance because of its defect. If you have a power supply with adjustable voltage and current (or a current limit of max. about 2A): Measure the voltage of the battery (in my case: 2.9V) Then apply a voltage of 0.1 V (max. 4.4V) more than that. If the current is less than about 1 A (typically: _much_ less, 50 mA is a typical value): Go up to 4.4V (or, if you have already the new battery: 0.1V more than that, should be about 3,7... 4.2V, mine had 3,9V). If the current stays under 1 A the old battery is either full or has an high impedance. Both is good.
If the old battery has an _higher_ voltage: discharge it until the voltage is a bit under the new battery.
The old cell was connected to its PCB via contact welding the connectors. Luckily, soldering right on the connectors works fine. So I soldered first the black wire of the new battery on the old PCB (mind the polarity, there is also a "B-" on the PCB). Then I hold the red wire on the B+ connector on the old PCB. No smoke ( :-D ), so I soldered the red wire on it as well. Then I disconnected the alu connector of the old cell with a scissor (please do not short anyshing :-) ). Then I isolated everything, taped it with duad side tabe and screw everything together again.
Result:
1. Cosmo started, displaying a SoC of 64% and 3.9V
2. It charged fine and linearly up to 100%
3. It discharged fine and linearly up to 0%, lasted the predicted time (about 11 hours with quite a load - hint: disabling the cover connection with the app and the cover in the "quick selection" area helps ;-) )
4. It chaged finde and linearly up to 100% again, with an internal measured (with AIDA64) energy of 2946 mAh - perfect strike :-)
Pictures:
P.S. This should work on the gemini as well.