diff --git a/internal/logging/gin_logger.go b/internal/logging/gin_logger.go index 605824aa0..689ea13a9 100644 --- a/internal/logging/gin_logger.go +++ b/internal/logging/gin_logger.go @@ -26,7 +26,7 @@ var aiAPIPrefixes = []string{ "/v1/responses", "/v1beta/models/", "/api/provider/", - "/backend-api/codex", + "/backend-api/codex/", } const ( diff --git a/internal/logging/gin_logger_test.go b/internal/logging/gin_logger_test.go index cda806a46..b8ae2c9bd 100644 --- a/internal/logging/gin_logger_test.go +++ b/internal/logging/gin_logger_test.go @@ -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) {