Skip to content

400 "out of extra usage" on all tool-bearing requests (Pi v0.75.4) — classifier triggers on tools presence, not beta headers #516

@SiNaPsEr0x

Description

@SiNaPsEr0x

Environment

  • Meridian: v1.42.1
  • Client: Pi v0.75.4
  • OS: Windows 11
  • Auth: Claude Max subscription

Problem
Every request from Pi fails with:

API Error: 400 You're out of extra usage.

Meridian logs confirm routing works (adapter=pi, session=new), but sdk_termination reason=unknown on every call.

Diagnosis steps

  1. Stripped anthropic-beta header via reverse proxy (confirmed stripped by request log) → Custom betas stderr warning disappeared, but 400 persists.

  2. Plugin onRequest(ctx) does not expose ctx.headers — delete operations were no-ops. The plugin API needs a way to modify incoming HTTP headers before SDK dispatch.

  3. Cross-referencing [Bug]: On a Claude Max 20x subscription with a valid OAuth access token from ~/.claude/.credentials.json, every Hermes request to native Anthropic (provider: anthropic, https://api.anthropic.com/v1/messages) is rejected with HTTP 400 NousResearch/hermes-agent#15080: raw API test with same OAuth token shows:

    • tools=false → 200
    • tools=true → 400 "out of extra usage"

    Anthropic's classifier fires on the presence of tools in the request body, independent of system prompt or headers. Pi sends tools=4 on every request → always triggers.

Impact
Meridian's passthrough mode for agentic clients (Pi, Cline, etc.) is effectively unusable on Max subscriptions — not because of misconfiguration, but because the agentic tool pattern itself triggers extra-usage billing server-side.

Questions for maintainer

  • Does the SDK query() path send tools in a format that bypasses the classifier (vs. raw HTTP)?
  • Is there a no-tool or tool-free mode for non-interactive requests worth investigating?
  • Can onRequest(ctx) be extended to expose incoming HTTP headers for plugin-level stripping?

Workaround
None found. Using local model provider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions