MCPcopy Create free account
hub / github.com/Noumena-Network/code / buildAPIProviderProperties

Function buildAPIProviderProperties

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

Source from the content-addressed store, hash-verified

363 }));
364}
365export function buildAPIProviderProperties(): Property[] {
366 const apiProvider = getAPIProvider();
367 const properties: Property[] = [];
368 if (apiProvider !== 'firstParty') {
369 const providerLabel = {
370 bedrock: 'AWS Bedrock',
371 vertex: 'Google Vertex AI',
372 foundry: 'Microsoft Foundry'
373 }[apiProvider];
374 properties.push({
375 label: 'API provider',
376 value: providerLabel
377 });
378 }
379 if (apiProvider === 'firstParty') {
380 const noumenaBaseUrl = getNoumenaBaseUrl();
381 if (noumenaBaseUrl) {
382 properties.push({
383 label: 'Noumena base URL',
384 value: noumenaBaseUrl
385 });
386 } else {
387 const anthropicBaseUrl = getAnthropicBaseUrl();
388 if (anthropicBaseUrl) {
389 properties.push({
390 label: 'Legacy Anthropic base URL',
391 value: anthropicBaseUrl
392 });
393 }
394 }
395 } else if (apiProvider === 'bedrock') {
396 const bedrockBaseUrl = process.env.BEDROCK_BASE_URL;
397 if (bedrockBaseUrl) {
398 properties.push({
399 label: 'Bedrock base URL',
400 value: bedrockBaseUrl
401 });
402 }
403 properties.push({
404 label: 'AWS region',
405 value: getAWSRegion()
406 });
407 if (isEnvTruthy(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH)) {
408 properties.push({
409 value: 'AWS auth skipped'
410 });
411 }
412 } else if (apiProvider === 'vertex') {
413 const vertexBaseUrl = process.env.VERTEX_BASE_URL;
414 if (vertexBaseUrl) {
415 properties.push({
416 label: 'Vertex base URL',
417 value: vertexBaseUrl
418 });
419 }
420 const gcpProject = process.env.ANTHROPIC_VERTEX_PROJECT_ID;
421 if (gcpProject) {
422 properties.push({

Callers 2

buildPrimarySectionFunction · 0.85
authStatusFunction · 0.85

Calls 7

isEnvTruthyFunction · 0.90
getAPIProviderFunction · 0.85
getNoumenaBaseUrlFunction · 0.85
getAnthropicBaseUrlFunction · 0.85
getAWSRegionFunction · 0.85
getDefaultVertexRegionFunction · 0.85
getProxyUrlFunction · 0.85

Tested by

no test coverage detected