{"record":{"id":"bd9e0d934db61521","repo":"BigPizzaV3/CodexPlusPlus","slug":"llm-bridge-post","errorCode":null,"errorMessage":"LLM Bridge 仅支持 POST 请求","messagePattern":"LLM Bridge 仅支持 POST 请求","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/routes.rs","lineNumber":703,"sourceCode":"    let settings = crate::stepwise::settings_with_payload(result?, &payload);\n    crate::stepwise::test_connection(&settings).await\n}\n\nasync fn llm_proxy_value(payload: Value) -> anyhow::Result<Value> {\n    let url = validate_llm_proxy_url(\n        payload\n            .get(\"url\")\n            .and_then(Value::as_str)\n            .unwrap_or_default(),\n    )?;\n    let method = payload\n        .get(\"method\")\n        .and_then(Value::as_str)\n        .map(str::trim)\n        .filter(|value| !value.is_empty())\n        .unwrap_or(\"POST\");\n    if !method.eq_ignore_ascii_case(\"POST\") {\n        anyhow::bail!(\"LLM Bridge 仅支持 POST 请求\");\n    }\n\n    let timeout_ms = payload\n        .get(\"timeout_ms\")\n        .and_then(Value::as_u64)\n        .unwrap_or(60_000)\n        .clamp(1_000, 60_000);\n    let body = payload\n        .get(\"body\")\n        .and_then(Value::as_str)\n        .unwrap_or_default()\n        .to_string();\n    if body.len() > 1_048_576 {\n        anyhow::bail!(\"LLM Bridge 请求体过大\");\n    }\n\n    let client = reqwest::Client::builder()\n        .timeout(std::time::Duration::from_millis(timeout_ms))","sourceCodeStart":685,"sourceCodeEnd":721,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/routes.rs#L685-L721","documentation":"Thrown by llm_proxy_value (reached from stepwise_test_value/handle_bridge_request) when the request's method field — defaulting to POST — is anything other than POST case-insensitively. The LLM Bridge proxy deliberately forwards only POST requests; the offending input is payload.method supplied by the bridge caller.","triggerScenarios":"Thrown at crates/codex-plus-core/src/routes.rs:703 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["把请求方式改为 POST"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}