fix(网关): 优化 OAuth 请求中 store 参数的处理逻辑

This commit is contained in:
yangjianbo
2026-01-14 09:46:10 +08:00
parent 0abb3a6843
commit 9c567fad92

View File

@@ -92,10 +92,7 @@ func applyCodexOAuthTransform(reqBody map[string]any) codexTransformResult {
// OAuth 走 ChatGPT internal API 时store 必须为 false显式 true 也会强制覆盖。
// 避免上游返回 "Store must be set to false"。
if v, ok := reqBody["store"].(bool); !ok {
reqBody["store"] = false
result.Modified = true
} else if v {
if v, ok := reqBody["store"].(bool); !ok || v {
reqBody["store"] = false
result.Modified = true
}