mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
@@ -54,10 +54,12 @@ export class VertexExecutor extends BaseExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Gemini on Vertex: always use global publishers endpoint
|
// 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}`;
|
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;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user