Merge pull request #6068 from okbexx/fix/codex-guardian-parent-affinity

fix(openai): keep auto-review on parent account
This commit is contained in:
Wesley Liddick authored and GitHub committed 2026-08-22 13:41:42 +08:00
commit d45135d87d
7 files changed
+734 -17

No files matched your search

@@ -514,6 +514,9 @@ func (h *OpenAIGatewayHandler) Responses(c *gin.Context) {
if h.rejectIfCyberSessionBlocked(c, apiKey, sessionHashBody, reqModel, cyberBlockFormatResponses) {
return
}
c.Request = c.Request.WithContext(service.WithOpenAIGuardianParentAffinity(
c.Request.Context(), c, sessionHashBody, reqModel,
))
requireCompact := legacyCompact
maxAccountSwitches := h.maxAccountSwitches
@@ -2004,6 +2007,7 @@ func (h *OpenAIGatewayHandler) ResponsesWebSocket(c *gin.Context) {
firstMessage,
openAIWSIngressFallbackSessionSeed(subject.UserID, apiKey.ID, apiKey.GroupID),
)
ctx = service.WithOpenAIGuardianParentAffinity(ctx, c, firstMessage, reqModel)
maxAccountSwitches := h.maxAccountSwitches
switchCount := 0
profitVetoCount := 0