AI Gateway: Implicit authorization via binding not working
Hello, it seems that Cloudflare AI Gateway bindings are broken when used with authenticated gateways.
I have an authorized AI gateway, and until recently, this didn't cause any issues, since I'm never hitting the AI gateway directly (via HTTP requests), but always via Cloudflare Worker bindings.
Now, the Cloudflare worker binding always returns 401 Unauthorized.
It seems that the cf-aig-authorization header is now always necessary, even though the binding should already fully authorize the worker to talk to the AI gateway. What's even worse is that the AIGatewayHeaders type does not include cf-aig-authorization as a valid key, and also doesn't seem to actually forward this to the gateway itself.
So now I'm stuck, completely unable to make any requests to AI gateway via my Cloudflare Worker (written in TypeScript) without disabling the Authenticated Gateway feature first.
Temporary Workaround
Disabling Authenticated Gateway and redeploying the worker does the trick, but it's not a good solution.