1 parent
2f0fd348c5
commit
5e308e8ff2
1 file changed
+4
-2
@@ -54,10 +54,12 @@ export class VertexExecutor extends BaseExecutor {
|
||||
}
|
||||
|
||||
// Gemini on Vertex: always use global publishers endpoint
|
||||
const action = stream ? "streamGenerateContent" : "generateContent";
|
||||
// ?alt=sse is required for proper SSE streaming (matches every other Gemini executor)
|
||||
const action = stream ? "streamGenerateContent?alt=sse" : "generateContent";
|
||||
let url = `https://aiplatform.googleapis.com/v1/publishers/google/models/${model}:${action}`;
|
||||
|
||||
if (rawKey) url += `?key=${rawKey}`;
|
||||
// rawKey goes as a query param; use & because ?alt=sse already starts the query string
|
||||
if (rawKey) url += `&key=${rawKey}`;
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user