Like get_api_client_from_env but with explicit overrides for every
env-driven knob. Each Some(value) in overrides wins over the
corresponding env var. Used by CLI commands that expose --api-url,
--api-token, --org, --proxy-url flags via crate::utils in the
CLI crate.
Classify an ApiError as a candidate for the auth → proxy
fallback. We only re-route on 401/403 (the stale-credentials
signals). Network errors, rate limits, 404s, and 5xx surface as-is
so they remain visible to the operator.
Return true when the configured token value looks like an
SRI-format hash (sha512-<base64> etc.) rather than a raw API
token. The server stores tokens as this hash; the CLI sometimes
gets configured with the storage representation by mistake (users
copy what they see in the dashboard). Surfacing this as a hint
short-circuits a confusing 401 round-trip.
Inspect a configured SOCKET_API_TOKEN value and return a
human-readable warning when the value doesn’t match the canonical
Socket API token shape (sktsec_<44 chars>_api). Returns None
when the token looks valid, so the caller can ignore the result
without checking length.