feat(logging): add AI API path support for image routes
- Included `/v1/images` in AI API path prefixes. - Introduced tests to validate `/v1/images/generations` and `/v1/images/edits` as AI API paths.
This commit is contained in:
@@ -58,3 +58,12 @@ func TestGinLogrusRecoveryHandlesRegularPanic(t *testing.T) {
|
||||
t.Fatalf("expected 500, got %d", recorder.Code)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsAIAPIPathIncludesImages(t *testing.T) {
|
||||
if !isAIAPIPath("/v1/images/generations") {
|
||||
t.Fatalf("expected /v1/images/generations to be treated as AI API path")
|
||||
}
|
||||
if !isAIAPIPath("/v1/images/edits") {
|
||||
t.Fatalf("expected /v1/images/edits to be treated as AI API path")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user