convex/eleven labs, weird caching issue
hi team, idk if this is on convex
i got "use node" at the top
im using the eleven labs sdk to generate voices
whats weird is that when i update the voice id, everything updates, the db, all logs are right, etc.
but for some reason, even if we're passing the new voice id to the call, its using the old one
5 Replies
what i find so weird is that when restarting the dev server, it then works, it updates the new voice to generate
but then it caches that voice again 😅
im digging into their sdk source code to figure out whats going wrong, but its indeed a strange issue
ive used their sdk in the past, so that should be ok
apologies for the unstructured writing 😄
im thinking out loud
im not sure where or what is going wrong
why would restarting the convex server use the right value from db
---
we begin by restarting convex dev with npx convex dev
Let's say we start with voice id A
its fine
moving to voice B is where im having issues
i see the RIGHT voice id in the logs
but it still uses the wrong one
or better said, the first one
its as if there is a permanent cache happening inside the eleven labs sdk
im wondering if "use node" at the top might be related to it
not sure
im thinking "closures" of some kind in this environment with elevenlabs sdk
so by "restarting the dev server", do you mean the web app? is it a next app? next is known to have some aggressive caching by default (although they made some changes here, not sure if any are meaningful)
reactjs
restarting i mean "npx convex dev"
cancelling that and retsarting
refreshign the web app doesnt help either
imma check soon if it works in production or not
i guess uhhhh how does the ID get determined on the frontend? if convex is caching args i can only think the frontend is accidentally providing it unchanged
like a stale closure
right before i call eleven labs
its ok
so its gotta be something else
we call eleven labs with the updated voice id
which is so weird