Skip to content

[Bug]: AgentRouter 400 content-blocked under burst traffic; characterize pacing/retry mitigation #1689

Closed as not planned

Description

@rrmlima

Summary

This issue now tracks only the burst-sensitive AgentRouter failure mode.

Providers routed through agentrouter.org can return HTTP 400 with error.code: "content-blocked" after several requests arrive in a short period. Reports indicate the gateway relaxes again after an idle interval.

The language/content-dependent report has been split into #1804 because it has a different cause, evidence requirement, and risk profile. This issue does not authorize rewriting or prefixing user prompts.

Area

Provider adapter / outbound pacing

Reproduction

Provider shape:

{
  "providers": {
    "AGR-CLA": {
      "adapter": "anthropic",
      "baseUrl": "https://agentrouter.org",
      "authMode": "key"
    }
  }
}

Send several otherwise-valid requests rapidly enough to reproduce the gateway's burst behavior, for example a tool-using client generating multiple turns in quick succession.

Observed error shape:

{
  "error": {
    "code": "content-blocked",
    "type": "agent_router_api_error"
  }
}

Current problem

A burst-sensitive 400 content-blocked is terminal to the active turn. OpenCodex currently has no established AgentRouter-specific contract telling it whether this response is safely retryable, how long to delay, or whether normal provider request pacing should absorb the burst before dispatch.

Evidence required

Before adding provider-specific retry semantics, provide a controlled current-dev capture that establishes:

  1. the number/timing of requests before the failure appears;
  2. whether the same unchanged request succeeds after an idle interval;
  3. whether serializing or pacing the same requests prevents the failure;
  4. whether the failure consumes/bills the upstream model request or is rejected before model execution;
  5. authoritative AgentRouter documentation for retryability or pacing, if available.

A third-party implementation can be useful reproduction evidence, but it is not by itself the AgentRouter contract.

Candidate implementation direction after evidence

Prefer the existing generic provider request-pacing/retry architecture over hidden prompt changes or an unrelated adapter fork.

Any accepted mitigation should:

  • be narrowly scoped to the proven failure class;
  • avoid replay when the upstream execution outcome is ambiguous;
  • preserve cancellation and request accounting;
  • use bounded retry/backoff or pre-dispatch pacing rather than an unbounded loop;
  • keep non-AgentRouter providers unchanged.

Exact delays, attempt counts, and retry status classification should come from evidence rather than copying constants from another project.

Out of scope

Relationship

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.
  • Controlled current-dev burst/pacing evidence is still required before implementation.

Activity

  1. added
    bugSomething isn't working
    providerProvider adapters, OpenAI-compat presets, upstream API quirks
    on Aug 14, 2026
  2. coderabbitai commented on Aug 14, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #375 - [WRONG BRANCH] fix(cursor): estimate context after restart [closed]
    #749 - fix(responses): reject expired forward continuations [merged]
    #865 - feat(proxy): opt-in same-target 429 wait-and-retry before key failover (#487) [merged]
    #1020 - fix(anthropic): surface upstream error bodies through sidecar bridges [merged]
    #1195 - fix(routing): keep unbound account quota unknown [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. changed the title [-][Bug]: AgentRouter (agentrouter.org) 400 content-blocked under non-English prompts and burst traffic; no retry or mitigation[/-] [+][Bug]: AgentRouter 400 content-blocked under burst traffic; characterize pacing/retry mitigation[/+] on Aug 16, 2026
  4. lidge-jun commented on Aug 18, 2026

    @lidge-jun
    Owner

    Closing. The requested burst/pacing characterization evidence did not arrive, and the surrounding stack has moved: request pacing on dev now anchors on transport starts, and the Codex patch surface this was filed against has changed. If AgentRouter 400 content-blocks still appear under burst traffic on a current build, reopen with timing captures and it will be treated as a fresh pacing investigation.

  5. Omnls commented on Aug 22, 2026

    @Omnls

    你这个是因为命中关键词导致的,需要上传具体的请求内容才能进行分析

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-infoWaiting on reporter for a concrete spec or reproductionproviderProvider adapters, OpenAI-compat presets, upstream API quirksprovider-compatibilityProvider compatibility reports

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions