Skip to main content

anthropic_windowed_probe

Function anthropic_windowed_probe 

Source
pub async fn anthropic_windowed_probe(
    client: &Client,
    user_agent: &str,
    base_url: Option<&str>,
    access_token: &str,
) -> Result<OauthUsage, OauthUsageError>
Expand description

One round-trip against /api/oauth/usage with the windowed request shape: ACCEPT + content-type + the oauth-beta header + claude-code/<version> UA + Bearer. Status classification: 200 / 401 / 403-with-oauth_scope_insufficient-body / 429 + Retry-After / other. The client and UA arrive injected; building them is the host port’s job.