Possible Bug with Worker + Worker AI + AI Gateway & Caching?
Hello,
I been racking my head on why my I was not getting any audio from Aura 1. For context, I use a AI Gateway to monitor and cache my Worker AI responses, for audio I send it via Websocket to the Client which plays it via blob url as source. Every time i tried to use the response there was invalid data.
At first, I thought I had just been coding bad and causing some issues, but as I started to run out of options, I purged my AI Gateway cache, in hopes that this might of just been a bad response CF end. I made a fresh request for Audio and it played straight away. Happy, that i got the audio, did the same request again just to check it cached and suddenly, no audio? Going back and forth with AI to find out why. For some reason, the first request has correct data, but the second cached request had invalid parts.
Here is what gets shown
=== FIRST REQUEST (should work) ===
First request bytes: ff f3 60 c4 00 1d 29 aa 2c 00 c1 90 98 81 d1 00
=== SECOND REQUEST (should be cached, might be corrupted) ===
Second request bytes: ef bf bd ef bf bd 60 ef bf bd 00 1d 29 ef bf bd
Is there a bug here in the caching, is there some sort of header added to the response that i need to account for? Any help will be appreciated. Thanks
0 Replies