UNPKG

ai-gateway-provider

Version:

AI Gateway Provider for AI-SDK

20 lines (18 loc) 652 B
// src/providers/google-vertex.ts import { createVertex as createVertexOriginal } from "@ai-sdk/google-vertex"; // src/auth.ts var CF_TEMP_TOKEN = "CF_TEMP_TOKEN"; // src/providers/google-vertex.ts var createVertex = (...rest) => { if (!rest || !rest[0]) { return createVertexOriginal({ googleAuthOptions: { apiKey: CF_TEMP_TOKEN } }); } if (rest[0].googleAuthOptions && rest[0].googleAuthOptions.apiKey === void 0 && rest[0].googleAuthOptions.credentials === void 0) { rest[0].googleAuthOptions.apiKey = CF_TEMP_TOKEN; } return createVertexOriginal(...rest); }; export { createVertex }; //# sourceMappingURL=google-vertex.mjs.map