Skip to content

Support Claude Code server-side auto-mode classifier billing #1504

Open

Description

@Cassiel-girl

Description
When Claude Code uses Auto mode through CCH at 127.0.0.1:23000, it reports:
This session isn't eligible because your requests go through 127.0.0.1:23000, which isn't compatible with this update.

Auto mode continues to work, but classifier requests are billed as before.
Claude Code now supports server-side Auto mode classification, where classifier requests are not charged. CCH should preserve the required fields when proxying Anthropic Messages requests.
Requested changes
Please implement pass-through support for:

  • The safeguards field in request bodies.
  • The safeguard_results field in normal responses.
  • The safeguard_results field in streaming response events.
  • Tool-use IDs referenced by safeguard_results; these must not be rewritten.
  • Unknown fields and relevant headers required by the Claude Code gateway protocol.
    The fields should be forwarded unchanged between Claude Code and the upstream Anthropic-compatible provider.
    CCH does not need to implement its own classifier for this request. Preserving and forwarding the protocol fields should allow the upstream server to perform the checks.
    Expected result
    After this change, Claude Code sessions routed through CCH should be eligible for server-side Auto mode classification, and /status should show:
    Auto mode server: Enabled
    Classifier requests should no longer be billed separately.
    References
  • https://code.claude.com/docs/en/auto-mode-classifier-billing
  • https://code.claude.com/docs/en/llm-gateway-protocol#feature-pass-through
    Environment
  • Claude Code: 2.1.278 or later
  • Gateway: CCH
  • Gateway address: http://127.0.0.1:23000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions