What amount of HSA can I contribute in the year one of us hits medicare?

I am self employed, and up till August 2023, both of us were covered by an HDHP.  I am yet to contribute 2023 HSA since I have till April 15th to do so.   My wife hit medicare age in August, and I hit it this month so I was covered for all of 2023 by the HDHP, she was covered for 7 months.

I have read that I can contribute a pro rated amount. which is fine for an individual, that would be 7/12 x individual amount. But what about a family plan?  And in our case a family plan with the makeup contribution of $1000?    Do I simply take the $8750 divide this by two than multiply her portion by 7/12?  

So $4375x1.583 = $6927.

 

Or is it more complicated than that?