Plugin Name
NeuralTrust TrustGuard
Description
Add NeuralTrust TrustGuard as a bidirectional guardrail plugin for the Portkey Gateway.
TrustGuard evaluates LLM input and output via POST /v1/evaluate and returns allow, block, report, or transform (redact). The plugin maps those verdicts onto Portkey's hook engine: block fails the check (HTTP 446 when deny: true), report records findings without blocking, and transform rewrites chat messages, completion prompt, or Anthropic Messages (including top-level system and tool_use).
What it adds
- Check id
neuraltrust.evaluate on beforeRequestHook and afterRequestHook
- Credentials on the check (
apiKey, optional collectorKey / apiBase), not in gateway conf.json
- Fail-closed by default when TrustGuard is unreachable, with an opt-in
unreachableFallback: fail_open
- Unit tests that mock the shared
utils.post helper
Implementation is ready (manifest, handler, tests). A PR will reference this issue.
Plugin Name
NeuralTrust TrustGuard
Description
Add NeuralTrust TrustGuard as a bidirectional guardrail plugin for the Portkey Gateway.
TrustGuard evaluates LLM input and output via
POST /v1/evaluateand returns allow, block, report, or transform (redact). The plugin maps those verdicts onto Portkey's hook engine: block fails the check (HTTP 446 whendeny: true), report records findings without blocking, and transform rewrites chatmessages, completionprompt, or Anthropic Messages (including top-levelsystemandtool_use).What it adds
neuraltrust.evaluateonbeforeRequestHookandafterRequestHookapiKey, optionalcollectorKey/apiBase), not in gatewayconf.jsonunreachableFallback: fail_openutils.posthelperImplementation is ready (manifest, handler, tests). A PR will reference this issue.