Update chat and validation API routes to handle API key

This commit is contained in:
ElshadHu
2026-01-14 03:06:13 -05:00
parent e5f647171c
commit 3b50c08258
2 changed files with 17 additions and 31 deletions

View File

@@ -189,6 +189,8 @@ async function handleChatRequest(req: Request): Promise<Response> {
awsSecretAccessKey: req.headers.get("x-aws-secret-access-key"),
awsRegion: req.headers.get("x-aws-region"),
awsSessionToken: req.headers.get("x-aws-session-token"),
// Vertex AI credentials (Express Mode)
vertexApiKey: req.headers.get("x-vertex-api-key"),
// Pass cookies for EdgeOne Pages authentication
...(provider === "edgeone" &&
cookieHeader && {