MCPcopy Index your code
hub / github.com/codeaashu/claude-code / buildAPIProviderProperties

Function buildAPIProviderProperties

src/utils/status.tsx:240–353  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

buildPrimarySectionFunction · 0.85
authStatusFunction · 0.85

Calls 6

getAPIProviderFunction · 0.85
getAWSRegionFunction · 0.85
isEnvTruthyFunction · 0.85
getDefaultVertexRegionFunction · 0.85
getProxyUrlFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected