In similar situations I normally leave the working setup alone and test apis separately. It is a bit slower at first, but troubleshooting is much easier. That usually gives a much cleaner signal than changing several things together. The part about "For AI APIs, it helps to think in terms of...