It doesn't make any sense for the team to pursue a market value extension with Giles. If Giles is dominant again this season, and if the team isn't in contention, then he should absolutely be traded. It's just going to be a FA contract anyway, which will make him an asset without value at the time of signing. Take the trade return, and the 40-50M or whatever and see what comes up in the offseason.
If December rolls around and the team determines that the best use for that 40-50M is for an elite reliver, then offer the money to... Ken Giles. Or Dellin Betances. Or Kirby Yates. Or Sean Doolittle. Or Blake Treinen if he rebounds.
We just saw this situation handled beautifully with Stroman. Instead of an extended Stroman, we have Ryu + SWR + Kay.