()
| 289 | } |
| 290 | |
| 291 | export function buildAPIProviderProperties(): Property[] { |
| 292 | const apiProvider = getAPIProvider(); |
| 293 | |
| 294 | const properties: Property[] = []; |
| 295 | |
| 296 | if (apiProvider !== 'firstParty') { |
| 297 | const providerLabel = { |
| 298 | bedrock: 'AWS Bedrock', |
| 299 | vertex: 'Google Vertex AI', |
| 300 | foundry: 'Microsoft Foundry', |
| 301 | gemini: 'Gemini API', |
| 302 | grok: 'Grok API', |
| 303 | openai: 'OpenAI API', |
| 304 | }[apiProvider]; |
| 305 | properties.push({ |
| 306 | label: 'API provider', |
| 307 | value: providerLabel, |
| 308 | }); |
| 309 | } |
| 310 | |
| 311 | if (apiProvider === 'firstParty') { |
| 312 | const anthropicBaseUrl = process.env.ANTHROPIC_BASE_URL; |
| 313 | if (anthropicBaseUrl) { |
| 314 | properties.push({ |
| 315 | label: 'Anthropic base URL', |
| 316 | value: anthropicBaseUrl, |
| 317 | }); |
| 318 | } |
| 319 | } else if (apiProvider === 'bedrock') { |
| 320 | const bedrockBaseUrl = process.env.BEDROCK_BASE_URL; |
| 321 | if (bedrockBaseUrl) { |
| 322 | properties.push({ |
| 323 | label: 'Bedrock base URL', |
| 324 | value: bedrockBaseUrl, |
| 325 | }); |
| 326 | } |
| 327 | |
| 328 | properties.push({ |
| 329 | label: 'AWS region', |
| 330 | value: getAWSRegion(), |
| 331 | }); |
| 332 | |
| 333 | if (isEnvTruthy(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)) { |
| 334 | properties.push({ |
| 335 | value: 'AWS auth skipped', |
| 336 | }); |
| 337 | } |
| 338 | } else if (apiProvider === 'vertex') { |
| 339 | const vertexBaseUrl = process.env.VERTEX_BASE_URL; |
| 340 | if (vertexBaseUrl) { |
| 341 | properties.push({ |
| 342 | label: 'Vertex base URL', |
| 343 | value: vertexBaseUrl, |
| 344 | }); |
| 345 | } |
| 346 | |
| 347 | const gcpProject = process.env.ANTHROPIC_VERTEX_PROJECT_ID; |
| 348 | if (gcpProject) { |
no test coverage detected