Skip to content

OAuth-proxied requests metered as 'extra usage' instead of included plan usage #2599

@thomaswillner

Description

@thomaswillner

Summary

OAuth-proxied requests through CLIProxy are being metered by Anthropic as "extra usage" (billed at API rates against a spending cap) instead of counting against the plan's included usage limits. This defeats CLIProxy's core design purpose of proxying OAuth tokens so that requests are indistinguishable from native app usage.

Environment

  • CLIProxy version: 6.9.15 (HEAD-c8b7e2b, built from source)
  • Plan: Claude Max (individual)
  • Auth method: OAuth tokens via ~/.cli-proxy-api/ auth files
  • OS: macOS (Homebrew install)

Observed Behavior

With the same claude.ai account, authenticated via OAuth:

Channel Metering Status
Claude Desktop (Cowork) Included plan usage Works (5-hour limit at 37%)
CLIProxy OAuth proxy Extra usage (API-rate billing) Blocked (spending cap exceeded)

Both channels use the same OAuth account. The plan's included rate limits still have capacity:

5-hour limit:    37%
7-day limit:     70%
7-day Sonnet:    80%
Extra Usage:     EXCEEDED — blocking CLIProxy only

Error from Anthropic

{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "You're out of extra usage. Add more at claude.ai/settings/usage and keep going."
  }
}

This error hits all Claude models routed through CLIProxy (Sonnet 4.6, Opus 4.6) while the same models work fine through the native Claude Desktop app on the same account at the same time.

Expected Behavior

Requests proxied through CLIProxy using OAuth tokens should count against the plan's included usage limits (5-hour, 7-day, Sonnet-specific), not against the extra usage spending cap. The whole point of OAuth-based proxying is to share the same metering bucket as the native app.

Suspected Cause

Anthropic's backend appears to classify CLIProxy's POST /v1/messages requests differently from native Claude Desktop requests, even though both use the same OAuth session. Possible distinguishing factors:

  • Request path / endpoint differences
  • User-Agent or other header differences
  • Auth presentation format (Bearer token vs session cookie)
  • Anthropic backend routing based on client type

Impact

High-frequency automated use cases (cron jobs, agent loops) burn through the extra usage spending cap rapidly, while the included plan usage sits mostly unused. This makes CLIProxy economically unviable for its intended purpose — you end up paying API rates for usage that should be covered by your plan.

Reproduction

  1. Set up CLIProxy with OAuth token from a Max plan account
  2. Set a modest extra usage spending cap (e.g. $20)
  3. Run automated workloads through CLIProxy (e.g. cron jobs)
  4. Observe that the extra usage cap fills up while included plan limits remain partially unused
  5. Simultaneously confirm that Claude Desktop still works on the same account (proving included limits have capacity)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions