Possible to combine AI Gateway Caching into Workers?

For Workes & Pages, what is the name of the domain?

none

What is the issue or error you’re encountering

building a Worker to dispatch LLM API requests to certain endpoints base on own rules

What steps have you taken to resolve the issue?

you see, I’m building a Worker to dispatch LLM API requests to certain endpoints base on own rules. But AI Gateway provides a great feature of LLM Caching, which would save lots of traffic and cost, also best for user experiences. Though I cannot use AI Gateway directly because I need to apply some dispatching rules to the original request at edge side, i.e. CF Worker side.
Is there any workaround for this?