| 498 | ? 'https://aiplatform.googleapis.com' | 498 | ? 'https://aiplatform.googleapis.com' |
| 499 | : `https://${region}-aiplatform.googleapis.com`; | 499 | : `https://${region}-aiplatform.googleapis.com`; |
| 500 | url = projectId | 500 | url = projectId |
| 501 | ? `https://aiplatform.googleapis.com/v1/projects/${projectId}/locations/${region}/publishers/google/models/${model}:generateContent?key=${keyParam}${stream ? '&alt=sse' : ''}` | 501 | ? `https://aiplatform.googleapis.com/v1/projects/${projectId}/locations/${region}/publishers/google/models/${model}:${responseType}?key=${keyParam}${stream ? '&alt=sse' : ''}` |
| 502 | : `${baseUrl}/v1/publishers/google/models/${model}:generateContent?key=${keyParam}${stream ? '&alt=sse' : ''}`; | 502 | : `${baseUrl}/v1/publishers/google/models/${model}:${responseType}?key=${keyParam}${stream ? '&alt=sse' : ''}`; |
| 503 | } else if (authType === 'full') { | 503 | } else if (authType === 'full') { |
| 504 | // For Full mode (service account authentication), use project-specific URL | 504 | // For Full mode (service account authentication), use project-specific URL |
| 505 | // Get project ID from Service Account JSON | 505 | // Get project ID from Service Account JSON |