fix(logging): tighten Codex backend request ID prefix

This commit is contained in:
shoucandanghehe
2026-06-10 01:29:42 +08:00
parent e1864fbf33
commit dc3152d2e3
2 changed files with 4 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ var aiAPIPrefixes = []string{
"/v1/responses",
"/v1beta/models/",
"/api/provider/",
"/backend-api/codex",
"/backend-api/codex/",
}
const (

View File

@@ -84,6 +84,9 @@ func TestIsAIAPIPathIncludesCodexBackend(t *testing.T) {
t.Fatalf("expected %s to be treated as AI API path", path)
}
}
if isAIAPIPath("/backend-api/codex-status") {
t.Fatalf("expected /backend-api/codex-status not to be treated as AI API path")
}
}
func TestGinLogrusLoggerAddsRequestIDForCodexBackend(t *testing.T) {