4x Billing for Custom Agents: Inside the LLM Cost Controversy

    This article examines a billing controversy triggered when a cloud vendor's AI coding tool began charging 4x usage for custom Agent requests without public disclosure. It breaks down the token structure behind the dispute, explains why flat multipliers break cost transparency, and outlines practical steps developers can take—such as call budgets, context layering, observability, and gateway decoupling—to control LLM inference costs and avoid proxy-related account risks.

    1. Background: How a “Loophole” Triggered a Cost Chain Reaction

    Developers discovered a behavior in a cloud vendor’s AI coding tool: when a custom Agent is configured with no instruction content, the platform sends a nearly “clean request” that carries almost no leading prompt. Measured data shows these requests carry only about 720 tokens, while the platform’s default Agent still starts at roughly 12k tokens under the same blank input. The gap between the two is an order of magnitude.

    Some developers quickly turned that gap into an arbitrage opportunity: wrapping platform requests into a bare API, reverse-proxying them, and reselling access for profit. Two factors made this feasible. First, AI subscription plans aimed at developers have a low barrier to entry. Second, the practice did not formally violate the terms of service—the requests were genuinely issued through the official platform path.

    2. The Platform’s Response: Blanket Billing and Missing Disclosure

    To curb resource consumption, the platform introduced a change in a subsequent minor version update: requests using custom Agents are now billed at 4x usage. The problem is that this change was not disclosed in the release notes or through any public channel. The 4x figure was derived by users through their own comparisons and inference.

    One day after the release, a developer filed an issue on a code hosting platform, initially classifying it as a defect. Two days later, a platform maintainer explicitly replied that “this is expected behavior, not a defect” and closed the discussion. The comment thread immediately filled with pushback.

    From the platform’s perspective, the decision logic is not hard to understand: custom Agent users already make up a small share of the base, and normal business scenarios rarely depend on this capability. If a meaningful proportion of accounts using custom Agents out of every hundred are running reverse proxies, a blanket policy can indeed stop the bleeding quickly in the short term. From an engineering governance standpoint, however, this is a typical case of crude risk control that shifts the cost onto user experience.

    3. The Technical Core of the Dispute: Three Conflated Problems

    3.1 Opaque Token Structure in the Agent Call Chain

    The leading prompt, tool descriptions, conversation history, and retrieval results together make up the input of a single request. The default Agent’s 12k tokens essentially pack the system prompt, tool schema, and policy constraints into the context. A blank custom Agent strips that part out, which is how the 720-token “bare request” appears. The fact that developers cannot estimate cost before making a call is where the controversy begins.

    3.2 Billing Metrics Do Not Match Resource Consumption

    Penalizing a certain call pattern with a multiplier, rather than metering actual resource usage, makes the bill lose explainability. A reasonable approach is itemized metering: input tokens, output tokens, tool call counts, and retrieval and vector recall overhead priced separately, with dedicated thresholds for abnormal calls.

    Illustrative cost estimation logic:

    1. def estimate_cost(input_tokens, output_tokens, tool_calls, retrieval_calls):
    2. cost = input_tokens * P_IN + output_tokens * P_OUT
    3. cost += tool_calls * P_TOOL + retrieval_calls * P_RETRIEVAL
    4. return cost

    3.3 Collateral Damage from Risk Control Policies

    Reverse proxies and account pools are characterized by high frequency, batch operation, cross-account activity, and uniform call patterns. Individual developers and normal paying users are characterized by low frequency, interactive sessions, and highly variable context. Using “whether a custom Agent is used” as the sole criterion amounts to giving up on identifying real behavioral signals, making collateral damage almost inevitable.

    4. What Developers and Teams Should Do

    • Set call budgets: define token limits and timeouts for each Agent, with automatic degradation or circuit breaking once thresholds are exceeded.
    • Layer the context: push stable system constraints down into a cacheable prefix and place volatile data at the tail to reduce repeated billing.
    • Prioritize observability: integrate logging services and monitoring alerts, and track token consumption, tool call success rate, and per-request cost on dashboards.
    • Decouple the architecture: funnel model calls through a unified gateway to enable canary releases, rate limiting, and multi-provider switching, avoiding lock-in to a single billing policy.
    • Put compliance first: do not resell proxy access using subscription quotas, which avoids terms-of-service risk and account suspension losses.

    5. Recommendations for the Platform Side

    Billing changes should be announced in advance with a transition period; high-risk calls should be identified through behavioral signals rather than a blanket ban on a call pattern; and affected legitimate users should have an appeals channel and quota compensation. If enterprise teams need a more controllable Agent runtime environment, they can build their own gateway and quota system on top of general-purpose capabilities such as Baidu AI Cloud’s container platform, logging service, and monitoring alerts, keeping cost and risk control under their own control.

    6. Conclusion

    The 4x billing itself is not the original sin—the lack of disclosure, the lack of precision, and the lack of an appeals mechanism are. For developers, treating cost as a first-class citizen in design delivers more long-term value than arguing over any single pricing adjustment.