What model, provider, API type are you using?
We merged some big refactors to that path for PDF support recently.