Skip to main content

Module proxy_setup

Module proxy_setup 

Source
Expand description

Install / uninstall LLM-client proxy environment wiring.

Submodules hold per-client setup (Claude, Codex, Grok, Pi, shell). This facade keeps the public API stable as crate::proxy_setup::*.

Functionsยง

anthropic_api_key_available
Returns true when an Anthropic API key is available for the proxy to forward upstream.
cleanup_stale_proxy_env
Removes stale proxy URLs from Claude Code / Codex settings when the proxy is not enabled. Returns the number of stale URLs cleaned up.
default_port
grok_session_auth_available
True when ~/.grok/auth.json holds a session/OIDC access token (subscription).
has_stale_proxy_url
install_proxy_env
install_proxy_env_unchecked
Install proxy env without config guard (used by lean-ctx proxy enable which has already set the flag). force_endpoint: if true, overrides even non-local custom endpoints.
is_local_lean_ctx_url
preview_proxy_cleanup
proxy_timeout
Proxy reachability timeout. Priority: env var > config.toml > 200ms default.
uninstall_proxy_env
xai_api_key_available
True when an xAI API key is available for the API-key rail.