Shared provider auth status formatting.
Return whichever env var name actually carries the resolved value.
Mirrors resolve_env_var's precedence: when the prefixed variant is
present in os.environ (even empty), it wins; otherwise the canonical
name is returned. Useful for UI labels that need to reflect what the
app is actually reading rather than the canonical name.
Format an auth manager badge for a provider.
Used by the /auth manager, where each provider renders a bracketed,
styled badge (e.g. [stored], [env: ANTHROPIC_API_KEY], [missing]).
Format a model selector provider-header indicator.
Used by /model, where the indicator is plain text shown next to the
provider name. Returns an empty string for CONFIGURED providers, which
need no indicator.