()
| 240 | return properties; |
| 241 | } |
| 242 | export function buildAPIProviderProperties(): Property[] { |
| 243 | const apiProvider = getAPIProvider(); |
| 244 | const properties: Property[] = []; |
| 245 | if (apiProvider !== 'firstParty') { |
| 246 | const providerLabel = { |
| 247 | bedrock: 'AWS Bedrock', |
| 248 | vertex: 'Google Vertex AI', |
| 249 | foundry: 'Microsoft Foundry' |
| 250 | }[apiProvider]; |
| 251 | properties.push({ |
| 252 | label: 'API provider', |
| 253 | value: providerLabel |
| 254 | }); |
| 255 | } |
| 256 | if (apiProvider === 'firstParty') { |
| 257 | const anthropicBaseUrl = process.env.ANTHROPIC_BASE_URL; |
| 258 | if (anthropicBaseUrl) { |
| 259 | properties.push({ |
| 260 | label: 'Anthropic base URL', |
| 261 | value: anthropicBaseUrl |
| 262 | }); |
| 263 | } |
| 264 | } else if (apiProvider === 'bedrock') { |
| 265 | const bedrockBaseUrl = process.env.BEDROCK_BASE_URL; |
| 266 | if (bedrockBaseUrl) { |
| 267 | properties.push({ |
| 268 | label: 'Bedrock base URL', |
| 269 | value: bedrockBaseUrl |
| 270 | }); |
| 271 | } |
| 272 | properties.push({ |
| 273 | label: 'AWS region', |
| 274 | value: getAWSRegion() |
| 275 | }); |
| 276 | if (isEnvTruthy(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)) { |
| 277 | properties.push({ |
| 278 | value: 'AWS auth skipped' |
| 279 | }); |
| 280 | } |
| 281 | } else if (apiProvider === 'vertex') { |
| 282 | const vertexBaseUrl = process.env.VERTEX_BASE_URL; |
| 283 | if (vertexBaseUrl) { |
| 284 | properties.push({ |
| 285 | label: 'Vertex base URL', |
| 286 | value: vertexBaseUrl |
| 287 | }); |
| 288 | } |
| 289 | const gcpProject = process.env.ANTHROPIC_VERTEX_PROJECT_ID; |
| 290 | if (gcpProject) { |
| 291 | properties.push({ |
| 292 | label: 'GCP project', |
| 293 | value: gcpProject |
| 294 | }); |
| 295 | } |
| 296 | properties.push({ |
| 297 | label: 'Default region', |
| 298 | value: getDefaultVertexRegion() |
| 299 | }); |
no test coverage detected