So is there any kind of technical cooperation between the two? They might not share design, but do they share technology at least?
I am not 100% sure, but I strongly doubt it with what I know about how research institutes work in China.
They are all state funded, but they compete directly with each other for those state grants as well as orders from the air force, navy and foreign customers.
In addition, the higher ups in Beijing recognize the value of competition, so they will not normally force rival companies to pool resources. Without pressure from up top, there is just no reason for them to co-operate in that way. If both companies had failed to come up with a decent 5th gen proposal, then Beijing might have stepped in and made them work together to make sure the PLAAF got something decent, but since both managed to come up with their own designs, I think Beijing would see that as evidence that the current competitive set up is working just fine and see no reason to change it.
Having said that, it is worth remembering that neither CAC or SAC does everything in-house themselves. A lot of the subsystems are contracted out to other specialist companies, like the engines and radar for example.
Now, as far as I understand it, both companies are responsible for selecting their own subcontractors when they are putting together a fighter for the air force, and obviously for security, they try to pick different sub-contractors. But if there is one subcontractor that is obviously head and shoulders above everyone else, then both companies will use them. The engines is a good example despite the possible SAC backroom shenanigans as we are seeing J10Bs powered by WS10As now.
At the end of the day, everyone follows the money and authority. If CAC got the PLAAF contract and SAC had the better radar subcontractors during the bidding process, you can bet the radar guys would want to jump ship to get the big orders, and if their wares are really better than CAC's radar guys' offerings, CAC would take them up.
At the end of the say, SAC and CAC just develop the airframes, whoever wins that has their pick of the best subcontractors so there isn't really an issue with one company blocking access to critical technology or systems (unless they happened to be air frame related, but in which case, such a technological lead would help them to win the contract in the first place) so the PLAAF will always get the best available.