Open cosbgn opened 2 months ago
Also vertex has a very simply rest API, so most likely the whole ai-sdk/vertex could only depend on built in fetch and work perfectly everywhere.
I wonder if we swap to using dvsekhvalnov/jose-jwt to get it working. IIRC Jose works on the edge
I wonder if we swap to using dvsekhvalnov/jose-jwt to get it working. IIRC Jose works on the edge
Yep, it does according to their README and this PR
Feature Description
The vertex model doesn't work on vercel edge. This is cause by the auth-library not being compatible with the edge. This could be easily replaced by a vanilla js script:
It can easily be used like this:
Use Case
Would be great to decouple vertex and auto so that we can use our custom auth script like the one above or simply add the script above directly in the ai-sdk model so that it would work on vercel edge.
Additional context
No response