MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _setup_env_display

Function _setup_env_display

uncommon_route/cli.py:1668–1680  ·  view source on GitHub ↗

Return (upstream_val, key_display, status_msg) from current env.

()

Source from the content-addressed store, hash-verified

1666
1667
1668def _setup_env_display() -> tuple[str, str, str]:
1669 """Return (upstream_val, key_display, status_msg) from current env."""
1670 upstream = os.environ.get("UNCOMMON_ROUTE_UPSTREAM", "")
1671 api_key = os.environ.get("UNCOMMON_ROUTE_API_KEY", "")
1672 upstream_val = upstream or "https://api.commonstack.ai/v1"
1673 key_display = f"{api_key[:12]}..." if len(api_key) > 12 else (api_key or "csk-your-key-here")
1674 if upstream and api_key:
1675 status = "upstream and key already configured — ready to go."
1676 elif upstream:
1677 status = "upstream set, but UNCOMMON_ROUTE_API_KEY is missing."
1678 else:
1679 status = "UNCOMMON_ROUTE_UPSTREAM and UNCOMMON_ROUTE_API_KEY need to be set."
1680 return upstream_val, key_display, status
1681
1682
1683def _setup_claude_code(args: list[str]) -> None:

Callers 3

_setup_claude_codeFunction · 0.85
_setup_codexFunction · 0.85
_setup_openaiFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected