BigPizzaV3/CodexPlusPlus · error · anyhow::Error
LLM Bridge 请求体过大
Error message
LLM Bridge 请求体过大
What it means
Thrown by llm_proxy_value when the request body string exceeds 1 MiB (1_048_576 bytes). This is the inbound size cap of the LLM Bridge proxy; the offending input is payload.body, and the guard fires before the outbound HTTP client is even built.
Source
Thrown at crates/codex-plus-core/src/routes.rs:717
.map(str::trim)
.filter(|value| !value.is_empty())
.unwrap_or("POST");
if !method.eq_ignore_ascii_case("POST") {
anyhow::bail!("LLM Bridge 仅支持 POST 请求");
}
let timeout_ms = payload
.get("timeout_ms")
.and_then(Value::as_u64)
.unwrap_or(60_000)
.clamp(1_000, 60_000);
let body = payload
.get("body")
.and_then(Value::as_str)
.unwrap_or_default()
.to_string();
if body.len() > 1_048_576 {
anyhow::bail!("LLM Bridge 请求体过大");
}
let client = reqwest::Client::builder()
.timeout(std::time::Duration::from_millis(timeout_ms))
.redirect(reqwest::redirect::Policy::none())
.build()?;
let response = client
.post(url)
.headers(llm_proxy_headers(&payload)?)
.body(body)
.send()
.await?;
let http_status = response.status().as_u16();
let ok = response.status().is_success();
let content_type = response
.headers()
.get(reqwest::header::CONTENT_TYPE)
.and_then(|value| value.to_str().ok())View on GitHub (pinned to f2074595a2)
Solutions
- 精简请求体后重试
- 分片或改用直连方式发送大负载
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/routes.rs:717 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/8d9709958c3b8822.
Report an issue: GitHub.