mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
Unify audit access under the logs experience and add richer active request visibility with sanitized client and provider payload previews. Expose provider warnings from upstream responses in compliance audit logs, surface learned rate-limit header data in health monitoring, and add MCP cache stats and cache flush tools with test coverage. Also add local provider catalog support for SD WebUI and ComfyUI, include video generation in endpoint docs and UI, add eval run storage migrations, and refresh docs and translations to match the expanded feature set.
24 lines
742 B
TypeScript
24 lines
742 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
const providerAudit = await import("../../src/lib/compliance/providerAudit.ts");
|
|
|
|
test("extractProviderWarnings finds sanitizer and warning fields without duplicating entries", () => {
|
|
const warnings = providerAudit.extractProviderWarnings(
|
|
{
|
|
message: "[SANITIZER] Prompt injection detected: prompt_leak",
|
|
warnings: ["[SANITIZER] Prompt injection detected: prompt_leak"],
|
|
},
|
|
{
|
|
detail: {
|
|
warning: "Content was filtered by the upstream safety filter.",
|
|
},
|
|
}
|
|
);
|
|
|
|
assert.deepEqual(warnings, [
|
|
"[SANITIZER] Prompt injection detected: prompt_leak",
|
|
"Content was filtered by the upstream safety filter.",
|
|
]);
|
|
});
|