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