So, in tool use agent, we have a fallback in place when Sonnet 3.5 fails. Can you make sure the fallback is in the order that Sonnet 3.5 fails? Then we have Gemini 2.0 flash, then we have Gemini 1.5 Pro, and then we have GBT 4.0. This should be the order.
Use cargo check to verify the work that the code compiles.