不完整的 x-arch-state 元数据会导致提示网关崩溃
作者: chenshj73创建于 2026年9月1日更新于 2026年9月1日
// crates/common/src/api/open_ai.rs 15 pub const CHAT_COMPLETIONS_PATH: &str = "/v1/chat/completions"; 16 pub const OPENAI_RESPONSES_API_PATH: &str = "/v1/responses"; 17 pub const MESSAGES_PATH: &str = "/v1/messages"; 18 pub const HEALTHZ_PATH: &str = "/healthz"; 19 pub const X_ARCH_STATE_HEADER: &str = "x-arch-state"; 20 pub const X_ARCH_API_RESPONSE: &str = "x-arch-api-response-message"; 21 pub const X_ARCH_TOOL_CALL: &str = "x-arch-tool-call-message"; 22 pub const X_ARCH_FC_MODEL_RESPONSE: &str = "x-arch-fc-model-response";
In on_http_request_body, the gateway only checks whether the key exists, then parses the string with unwrap():
内容来源: katanemo/plano